I am working on a code that work from Monday to Friday. I will open on Monday and will close on Friday unless the code reach x profit or y losses.
To modify the strategyprofit for just one day, Roberto showed a nice piece of code that I have just changed to a weekly strategy profit. I just wanted to have confirmation that it is correct.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// STRATEGYPROFIT per WEEK. It resets the variable each new week
IFdayofweek=1ANDINTRADAYBARINDEX=0THEN
stratprofit=STRATEGYPROFIT//saves the previous week Profit
nomoretrading=0
ENDIF
//Finishing WEEKLY operations when reaching target profit/loss
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.