Hi,
I have the following strategy for sell. Condition1 needs to occur first and then condition2
Condition1 : MACD bearish crossover in previous bar
Condition2: current bar Low is below previous bar low
Once condition1 is met then I don't care about condition1. Once Condition1
is met I am only concerned about Condition2 irrespective of whether condition1 is still true or not for the current bar.
When I write
Buy=condition1 and condition2;
Lets say on the 10thbar the macd bearish crossover happens but on 12 th bar again macd bullish crossover happen. Now on 12 th bar condition2 is met but condition1 is false so Sell is not triggered.
I want that once condition1 becomes true then the same is held till sell is triggered. Is this possible? I would prefer to not use loop
Thankyou
I have the following strategy for sell. Condition1 needs to occur first and then condition2
Condition1 : MACD bearish crossover in previous bar
Condition2: current bar Low is below previous bar low
Once condition1 is met then I don't care about condition1. Once Condition1
is met I am only concerned about Condition2 irrespective of whether condition1 is still true or not for the current bar.
When I write
Buy=condition1 and condition2;
Lets say on the 10thbar the macd bearish crossover happens but on 12 th bar again macd bullish crossover happen. Now on 12 th bar condition2 is met but condition1 is false so Sell is not triggered.
I want that once condition1 becomes true then the same is held till sell is triggered. Is this possible? I would prefer to not use loop
Thankyou