Here is a turtletrader code I have been playing around with. It not perfect as there are huge drawbacks, but it has even larger profits. It also need a decent amount of capital to begin with- a lot of patience and stomach ice.
There are many 0-bar trades but only on the stoploss. Profit bars is 5 so I think the trades are valid and not subjected to the zerobar trade issue so many have written about here.
It makes a trade on 2nd day breakout and adds a trade every day with a minimum SL- many get stopped out but some get going.
I also added some extra trades if there was a trend. I hope you like it. I didn’t clean up the code, so you would see some of the alternative things I have been optimizing.
Comments and improvement are as always welcome.
//==================DAX Daily Timeframe==========================
// Definition of code parameters
DEFPARAM CumulateOrders = true // Cumulating positions deactivated
// calculate daily high/low
Capital = 20000
Risk = 0.005
StopLoss = 20// Could be our variable XREM Calculate contracts
equity = Capital + StrategyProfit
maxrisk = round(equity*Risk)
PositionSize = abs(round((maxrisk/StopLoss)/PointValue)*pipsize)
if PositionSize>=1000 then
if PositionSize<=3 then
if not shortonmarket and high>c1 then
BUY Positionsize CONTRACTS AT MARKET
//if open>pris+x5 then
if open>tradeprice+x5 then
buy Positionsize CONTRACTS AT MARKET
if longonmarket then
if CountDays>=x2 then
sell at market
set stop loss SL//your SL code
//graph (positionsize/equity)*100 COLOURED(0,255,0) AS "RISK"//GREEN
//graph (positionsize*SL/equity)*100 COLOURED(0,255,255) AS "MAXRISK"//Aqua
//GRAPH tradeprice COLOURED(50,50,75) AS "monthlyHigh"
//GRAPH pris COLOURED(50,0,75) AS "pris"
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.ProRealTime ITF files and other attachments :