Hi,
I am writing code for generating buy & sell signals. Buy signals are generated for golden cross over and sell for dead cross overs.
However, I want the buy & sell to actually happen on the next bar, when higher high or lower low is made.
Now, in the code I have written:
Buy = <condition met for buy>;
Sell = <condition met for sell>;
Buy = <buy-condition-signal> AND (H > ValueWhen(<buy-conditon-signal>));
However, when I debug I find that, <buy-condition-signal> and (H>ValueWhen...) is true, BUT Buy is NOT true
I am at my wits end to debug this.
Please help me in debugging this and figure out the root cause for such strange behavior.
Thanks in advance,
Prash
I am writing code for generating buy & sell signals. Buy signals are generated for golden cross over and sell for dead cross overs.
However, I want the buy & sell to actually happen on the next bar, when higher high or lower low is made.
Now, in the code I have written:
Buy = <condition met for buy>;
Sell = <condition met for sell>;
Buy = <buy-condition-signal> AND (H > ValueWhen(<buy-conditon-signal>));
However, when I debug I find that, <buy-condition-signal> and (H>ValueWhen...) is true, BUT Buy is NOT true
I am at my wits end to debug this.
Please help me in debugging this and figure out the root cause for such strange behavior.
Thanks in advance,
Prash