AbzParticipant
Veteran
Hello
is it possible to limit the program to do only one trade for buy and short in one day.
// 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
CKWParticipant
Veteran
Hi Abz,
You can simply refer to strategy shared by Reiner, about Limit to number of trades per day
http://www.prorealcode.com/prorealtime-trading-strategies/lift-up-down-trading-strategy-dax-5m/
br,
CKW