I’ve been using this code to quit trading from the forum (thank you!), but figured it would be “even better”, if it could be adjusted so it only quits for trades lost in succession on the same day/period. I’m less worried about losses over multiple days as “stuff happens”, but on the same day its usually not going to be good for my algo!
I had a go with using Today, but couldnt figure out how to work out what the day was 🙁
Haha, im an idtiot, was pretty simple in the end 🙂
1
2
3
4
5
6
7
8
9
10
11
12
// QUIT Trading Strat
ifstrategyprofit<>strategyprofit[1]then
ifpositionperf(1)<0andDay=Day[1]then
Count=Count+1
else
Count=0
endif
endif
ifCount>=3then
QUIT
endif
just changed line 3, idk if this is the best way, but it did what I wanted, also open to smarter ideas, or ideas where we can define more specific periods . thanks!
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue