|
las vegas
Experience: Intermediate
Platform: Sierra Chart
Broker: Velocity/IB
Trading: 6E
Posts: 1,145 since Feb 2010
Thanks Given: 304
Thanks Received: 845
|
I understand, but you can't change this fact. You have to set the stoploss using other criteria, specifically whether the strategy itself is open or flat, not whether your account is open or flat.
For example the logic would be something like,
if entry criteria met then state[0] = 1 else state[0] = state[1]
if state[1] == 0 && state[0] == 1 then set stoploss
if stoploss hit then state[0] = 0
Hopefully that makes sense or someone who knows easy language can help you with the specific code.
|