Support Board
Date/Time: Sun, 24 Nov 2024 21:26:50 +0000
Post From: Trading System Based on Moving Average Crossover
[2024-10-27 14:44:42] |
Sawtooth - Posts: 4120 |
You would need to create a persistent TRUE at the 9/21 cross, and then reference that in your entry signal. This is done using two IF statements, one to create the persistent TRUE, and another to release it. The 9/21 cross is the event to initiate it, and you'll need to use another event to release it, which could be the Buy exit, or something else. Use the Spreadsheet Formula study to create the persistent TRUE, like this for a Buy entry: =IF(CROSSFROMBELOW(ID1.SG1,ID1.SG2),1,IF(ReleaseCondition,0,ID3.SG1[-1])) where ID3 is this Spreadsheet Formula study. Then reference ID3 in your Buy entry formula: =AND(ID3.SG1=1,CROSSFROMBELOW(C,ID2.SG1)) Use another instance of the Spreadsheet Formula study for the Sell entry. Date Time Of Last Edit: 2024-10-27 14:45:09
|