Half a position (0.5) on DAX 10 minutes – MTF strategy
Forums › ProRealTime English forum › ProOrder support › Half a position (0.5) on DAX 10 minutes – MTF strategy
- This topic has 19 replies, 8 voices, and was last updated 3 years ago by eckaw.
-
-
01/17/2021 at 11:48 AM #158141
I’m fed up of waiting for @xrpboss to come back, so I’m putting attached on Demo Forward Test tomorrow! 🙂
There is scope for improvement if only I knew how it worked! 🙂
There are loads of trades that exit at £2 profit after having an MFE of > £100!
1 user thanked author for this post.
01/17/2021 at 1:33 PM #15815401/17/2021 at 1:55 PM #158157A Trailing Stop might improve it and catch trades with a good MFE before the > £100 profit dribbles away and turns into an exit at £2 profit.
Attached is the .itf thus far.
Please post any improvments.
2 users thanked author for this post.
01/17/2021 at 5:14 PM #158179I don’t know why but this code prompted me to look for a solution … look at lines 4, 15 and 23.
It seems to work..the sharpe ratio is enough you think! lolhelp welcome
OKMoonPerso123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116DEFPARAM CumulateOrders = FalseDEFPARAM PreLoadBars = 2000DEFPARAM FLATBEFORE = 000000divh, divb, ignored = CALL "Divergence RSI with lookback"[11, 76, 1, 1](close)//14-70/30/30one = 1if intradaybarindex=0 thentwo = 0endifif onmarket and three<>tradeindex thentwo=two+1three=tradeindexendifTIMEFRAME (default)//four = CALL "O"four = (divh < 1) //1000 //aa ici c est divb <TIMEFRAME (2 minute, updateonclose)//90 minIF Not OnMarket THENfive = 0ELSEfive = five + 1ENDIF//six = CALL "K"six = (divb < 1)//1 //aa ici c est divh <TIMEFRAME (default)ONCE seven = 1IF IntraDayBarIndex = 0 THENseven = 1ENDIFeight = fiveIF Not OnMarket AND eight <> eight[1] THENseven = 1ENDIFIF six AND seven ANd two<one and four THENBUY 10 CONTRACT AT MARKETseven = 0ENDIF//SET TARGET pPROFIT 400//SET STOP pLOSS 170nine = 300ten = 240IF NOT ONMARKET THENeleven=0ENDIFIF LONGONMARKET AND close-tradeprice(1)>=nine*pipsize THENeleven = tradeprice(1)+ten*pipsizeENDIFIF eleven>0 THENSELL AT eleven STOPENDIFtwelve = 2//12fourteen = 1//2IF NOT ONMARKET THENfifteen=0ENDIFIF LONGONMARKET AND close-tradeprice(1)>=twelve*pipsize THENfifteen = tradeprice(1)+fourteen*pipsizeENDIFIF fifteen>0 THENSELL AT fifteen STOPENDIF//SET TARGET pPROFIT 4//2//SET STOP pLOSS 100// 10//https://www.prorealcode.com/topic/breakeven-with-a-technical-indicator/// BUY//if ConditionsPurchase AND Not OnMarket then//BUY 1 lot AT market//endif// BREAKEVEN//SMA20 = Average [aa](close)//20//once flag = (close >= SMA20)//if OnMarket AND flag =1 then//SELL 1 lot AT TRADEPRICE +1 LIMIT//endif////// TP = HIGH BOLLINGER//BBH = BollingerUp [bb](close)//20//C3 = (high >= BBH)////MyConditionsCloture = C3////if MyConditionsCloture AND OnMarket then//SELL 1 lot AT market//endif//SET TARGET pPROFIT 6//SET STOP pLOSS 200//------------------------------------------------------//trailing stop functiontrailingstart = 10//4//20 //trailing will start @trailinstart points profittrailingstep = 4//10//5 //trailing step to move the "stoploss"//reset the stoploss valueIF NOT ONMARKET THENnewSL=0ENDIF//manage long positionsIF LONGONMARKET THEN//first move (breakeven)IF newSL=0 AND close-tradeprice(1)>=trailingstart*pipsize THENnewSL = tradeprice(1)+trailingstep*pipsizeENDIF//stop order to exit the positionsIF newSL>0 THENSELL AT newSL STOPEXITSHORT AT newSL STOPENDIFendif1 user thanked author for this post.
02/18/2021 at 12:30 PM #161910 -
AuthorPosts
Find exclusive trading pro-tools on