Support Board
Date/Time: Sun, 24 Nov 2024 05:00:08 +0000
Post From: Trigger a Trade When Another Condition is TRUE Several Bars Earlier
[2024-07-02 21:25:48] |
Rich_B - Posts: 31 |
Hi I am using the Trading System Based on Alert Condition Study. I can get the following two formulas working correctly independently of each other ... =ID12.SG2 ... triggers a trade entry when the study becomes TRUE =C>H[-1] ... triggers a trade when the candle closes higher than the high of the previous bar I am trying to combine the two but struggling. I think it is because the formula requires both conditions to be true on the same bar. I used this ... =AND(ID12.SG2,(=C>H[-1])) ... but it does not work because both conditions never occur on the same bar. What I want to achieve is ... when the first condition is met, then the first instance of the second condition occurring after that event should trigger the trade entry. This may be several bars later. The formula needs to remember that the first condition has been met and then remain on standby for the second condition to be met, however long that takes. When both are met, the trade entry executes. I'm pretty confident that the above is possible. Any pointers in the right direction much appreciated. Thank you |