Trying to get boolean variable stay ON after condition was reached and not changed when condition do not exists anymore.
Trying StaticVarSet but it didnt work for me:
temp = StaticVarGet("mystaticarray" );
temp = C>10;
StaticVarSet("mystaticarray", temp );
Short = tradeCondition and temp
temp = Hold(C>10, BarCount);
Short = temp;
AFL Function Reference - HOLD
||Hold( EXPRESSION, periods )
||Holds a "true" result of EXPRESSION for the specified number of periods . This true result is held true over the number of periods specified even if a "false" result is generated.
||hold( cross(rsi(14),70),5 )