Prescott AZ USA
Experience: Advanced
Platform: SierraChart
Broker: Stage5, FCM:Dorman, Data:Denali, Routing:Teton
Trading: YM ES NQ
Posts: 474 since Nov 2009
Thanks Given: 219
Thanks Received: 603
|
Try this:
=OR(AND(C[-1]>O[-1],O>C[-1]),AND(C[-1]<O[-1],O<C[-1]))
You can learn to do this yourself:
With Simple Alert syntax, the OHLC of a bar is:
Open = O
High= H
Low= L
Close=C
Previous bars are located with a [-1] suffix:
previous Open = O[-1]
previous High= H[-1]
previous Low= L[-1]
previous Close=C[-1]
OR and AND functions are opened and closed with parentheses ().
The Close of a [previous] candle is at one side of the candle body, either at the upper or lower.
If it is at the upper, then: C[-1]>O[-1] and the current open must be greater than the previous close: O>C[-1]
If it is at the lower, then: C[-1]<O[-1] and the current open must be less than the previous close: O<C[-1]
Since either can happen, they are combined with OR.
To make it visually easier, you can use spaces to separate sections:
=OR( AND( C[-1]>O[-1], O>C[-1] ), AND( C[-1]<O[-1], O<C[-1] ) )
|