Yo creo que te puede servir esto. Determina la ganancia o perdida diaria que tendrías pensado soportar. Cuando llegue a tu beneficio o perdida determinada se cierran todas las operaciones y ya no opera más durante el día.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// STRATEGYPROFIT per DAY //////////////////////////////////////////////////////////////////////////////
// It resets the variable each new day
IFINTRADAYBARINDEX=0THEN
stratprofit=STRATEGYPROFIT//saves the previous day Profit
nomoretrading=0
ENDIF
// Finishing DAILY operations when reaching target profit/loss