Breakout Strategy for the Dax and Dow Open – Trader Tom
Forums › ProRealTime English forum › ProOrder support › Breakout Strategy for the Dax and Dow Open – Trader Tom
- This topic has 53 replies, 12 voices, and was last updated 3 years ago by
GraHal.
-
-
11/10/2021 at 9:45 AM #181359
Yes, phoentzs is right, you should use a Trailing Stop code snippet,you can search this forum or the Snippet Library.
11/10/2021 at 11:58 AM #181365Hi, murre87 I thought I would write you a tweaked BOT, modified around stop and entry to improve with a little 5 min direction to help!
Anyone feel free to use or improve, I am going to post this to the library
My results are a little bit diffrent. The spread in that program is wrong. Spread is 1.2 (for german user). But also with 1p spread, the results are diffrent.
11/10/2021 at 3:10 PM #181380Thanks for the feedback, guys. I reviewed and adjusted the code to include a 1.2 spread (Thanks, VinzentVega for the reminder), so don’t add more spread when testing!
I have reduced the losses, improved the risk management.
Again tested on V10.3 using 100,000 units
Test pic of tick by tick on and off
Early Bird DAX Breakout v1.2123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990//Early Bird Breakout Strategy v1.0, updated with active risk code v1.2//November 10th 2021//www.harkoltd.com//==========================================================// Definition of code parametersDEFPARAM CumulateOrders = False // Cumulating positions deactivated// Cancel all pending orders and close all positions at the "FLATAFTER" timeDEFPARAM FLATAFTER = 120000// Prevents the system from placing new orders to enter the market or increase position size after the specified timenoEntryAfterTime = 110000timeEnterAfter = time < noEntryAfterTime//==========================================================// Prevents the system from placing new orders on specified days of the weekdaysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0//==========================================================//Stake limited to 1.0% bank risk and topping at 1.7% return using active risk management code. Bank Risk Stop =1% and Target >2% (based on £10k account)Stake=16Spread=1.2maxstop=6Takeprofit=15//==========================================================//Limit to one tradeTrade = Barindex - TradeIndex(1) > IntradayBarIndex//==========================================================//Trading spread, entry of half spreadIf Spread = 1.2 THENSpreadEntry = 0.6ELSESpreadEntry = SpreadENDIF//==========================================================//Active Risk management rules (To help the longs, shorts when wrong go straigh stop)BreakevenAt =6takeprofit =12startBreakeven = takeprofit *(BreakevenAt/80)PointsToKeep =4IF NOT ONMARKET THENbreakevenLevel=0ENDIFIF ONMARKET AND close-tradeprice(1)>=startBreakeven THENbreakevenLevel = tradeprice(1)+PointsToKeep*pipsizeENDIFIF breakevenLevel>0.5 THENSELL AT breakevenLevel STOPENDIF//==========================================================//Leading breakout directionTimeframe (5 MINUTE)EMA1 = ExponentialAverage[22](close)EMA2 = ExponentialAverage[3](close)IF EMA1 > EMA2 AND EMA1 > EMA1[1] AND EMA2 > EMA2[1] THENLongNotShort = 1ENDIFIF EMA1 < EMA2 AND EMA1 < EMA1[1] AND EMA2 < EMA2[1] THENLongNotShort = 0ENDIFIF abs(EMA1 - EMA2) < 1 THENLongNotShort = 0.5ENDIF//==========================================================//Entry timeframeTimeframe (1 minute)OpenUK = 080000Start = time >=OpenUKif openTime = 070000 thenmyHighest = highmyLowest = lowendifif openTime >= 070000 and openTime <=075955 thenmyHighest = max (myHighest,high)myLowest = min (myLowest,low)endif//==========================================================If Start and Trade and timeEnterAfter and not daysForbiddenEntry then// Conditions to enter long positions (0.5pt break)IF LongNotShort = 1 THENBuyPrice = myHighest + SpreadEntry + 0.6BUY stake PERPOINT AT BuyPrice stopENDIF// Conditions to enter short positionsIF LongNotShort = 0 THENSellPrice = myLowest - SpreadEntry - 0.6SELLSHORT stake PERPOINT AT SellPrice stopENDIFSET STOP LOSS MaxstopSET TARGET pPROFIT TakeProfitendif11/10/2021 at 4:36 PM #1813861m bar backtest, stake = 1 (for easier comparison to other algos)
TBT, no additional spread
1 user thanked author for this post.
11/10/2021 at 4:52 PM #18139311/10/2021 at 5:09 PM #18139611/10/2021 at 5:24 PM #181397It also looks good in 2m
11/10/2021 at 5:29 PM #181399I don’t see that as relevant at all. Risk and therefore should be based on the bank size and not on pip size. My bench for testing is £10k bank size and my base risk is 1% of the bank. The 1% is a constant.
Yes, but for backtesting and for the comparability its allays better to use 1 pip/point. I can immediately see how many points the setup is generating, and don´t have to convert. Its more usefull for all viewers
11/10/2021 at 6:04 PM #18140111/10/2021 at 6:57 PM #181403That’s not what the back says. Plus your hypothesis is flawed, sorry. It’s all-around risk management and ROI.
The correct backtesting identifies over a 69% hit rate with a return of over 1:1.7
If I gave someone £1 and they gave me back £2.7 I would take that all day (don’t forget the £1 you risk you don’t spend
The strategy is from someone else, it did not work and so I wrote a programme to deliver one that would work and based on the loose requirement – let’s not forget this.
Personally, my BOTs deliver… worst case 20% *12 trades per year (88% win rate) to high frequently BOTs delivering 45% per year. Mixing these bots (over 12 active BOTs these do very nicely)
This early bird bot potentially trades 144 per year (roughly) with a potential outturn of 80%+ On a £10k account that’s £8k or £55 per trade! No matter what you are doing
Can you trade manually, and consistently with these ratios, most cannot!
11/10/2021 at 6:58 PM #181404VinzentVega 2 minutes does look good 👍🏻
I never looked at that time frame
11/10/2021 at 7:04 PM #18140711/10/2021 at 8:18 PM #1814092 mins, interesting. Can you post your code as MTF does not support 2 mins
It would be interesting to see what you have done?
Pls find attached the file.
11/10/2021 at 10:40 PM #181413Thanks for the file. The strategy actually loses money!
Also, it’s a completely different strategy! The strategy is a break put of 8:00, not 9 am! We are discussing the 8:00 breakout using the 7am to 8am timeframe, and not the 8am to 9am as you have! I thought something was wrong.! Thanks for sharing anyway.
I wrote a 9am breakout also like yours and has 100% trading record at 5 trades per 3-month cycle, happy to stick with this
Thanks for sharing though
11/10/2021 at 10:46 PM #181414For those that are not afraid of slippage, take a look at Hang Seng at the open
Did some breakouts testing on that beast, but gave it up
Too brutal for me
1 user thanked author for this post.
-
AuthorPosts