Hello
is it possible to limit the program to do only one trade for buy and short in one day.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Definition of code parameters
DEFPARAM CumulateOrders = False // Cumulating positions deactivated
DEFPARAM FLATAFTER = 220000
// Conditions
a2 = RSI [ 14 ] (close )
a3 = Average [ 14 ] (close )
a4 = dclose (1 ) - dopen (1 )
// Conditions to enter Long position
a5 = open > a3
a6 = a2 > 40
a7 = a4 > 25
IF not onmarket and a5 and a6 and a7 then
sellshort 2 SHARES AT MARKET
SET TARGET pPROFIT 50
ENDIF
// Conditions to enter Short positions
a8 = open < a3
a9 = a2 < 30
a10 = a4 < - 25
IF not onmarket and a8 and a9 and a10 then
buy 2 SHARES AT MARKET
SET TARGET pPROFIT 50
ENDIF