Login Page - Create Account

Support Board


Date/Time: Wed, 15 Jan 2025 16:16:51 +0000



Post From: Simple auto trading buy/sell crossover SMA

[2017-08-09 17:29:16]
Sawtooth - Posts: 4152
1) Use column P to count the bars since a crossover of ID3 where the close is less than ID3:
P3:
=IF(O3=0,0,IF(AND(O3,E3<ID3.SG1@3),P4+1,P4))

2) Enter a numeric value in cell K1 as the triggering bar count value.
If you change this, you'll need to go to Chart >> Recalculate to update the arrows.

3) Change the formula in K3 to this:
=AND(O3,P4<$K$1,P3=$K$1)
where the value of K1 is the triggering bar count value. Edit as needed.

4) Use column Q to create a persistent variable of the new entry signal:
Q3:
=IF(K3,1,IF(O3=0,0,Q4))

5) Change the formula in M3 to this:
=AND(Q4,Q3=0)
Date Time Of Last Edit: 2017-08-09 17:33:11