Support Board
Date/Time: Sun, 24 Nov 2024 04:28:03 +0000
Post From: Trigger a Trade When Another Condition is TRUE Several Bars Earlier
[2024-07-02 23:35:33] |
Sawtooth - Posts: 4118 |
Any pointers in the right direction much appreciated.
The ID12.SG2 TRUE condition needs to be made persistent, until C>H[-1], then released with another condition.Since you are not using a spreadsheet study, use the Spreadsheet Formula study, like this in its Formula field: =IF(ID12.SG2,1,IF(ReleaseCondition,0,ID13.SG1[-1])) where ID13 is this Spreadsheet Formula study. This will return 1 at every bar since ID12.SG2 was TRUE, until it is released, then it will return 0. Then use this formula for your trade entry: =AND(ID13.SG2,C>H[-1]) |