Support Board
Date/Time: Sat, 23 Nov 2024 02:07:20 +0000
Post From: Programmatically distinguishing a wick vs a Body on a current candle
[2024-09-22 17:45:37] |
John - SC Support - Posts: 36238 |
The following is using the Alert syntax. 1. To alert if the bar two bars back had a wick of a certain minimum length on the upside, you would use a formula like the following: =IF(O[-2] > C[-2], (H[-2] - O[-2]) > 5, (H[-2] - C[-2]) > 5) Where 5 is the wick size in points. If you want to test in ticks, change 5 to "5 * TICKSIZE". 2. To check if the bar 1 bar back is engulfing the bar 2 bars back, you would use the following: =AND(H[-1] > H[-2], L[-1] < L[-2], To check if the bar 1 bar back is in the opposite direction of the bar 2 bars back you would use a formula like the following: =OR(AND(O[-2] > C[-2], O[-1] < C[-1]), AND(O[-2] < C[-2], O[-1] > C[-1])) To check if the bar 1 bar back has no wick either up or down, you would use a formula like the following: OR(AND(O[-1] > C[-1], H[-1] = O[-1], L[-1] = C[-1]), AND(O[-1] < C[-1], H[-1] = C[-1], L[-1] = O[-1])) 3. We would need more information on exactly what you are looking for regarding this. We do not have enough information to know how to put this together. You would then need to put all of these items together using AND() and/or OR() functions. For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |