time-based DAX trading system
Forums › ProRealTime English forum › ProOrder support › time-based DAX trading system
- This topic has 8 replies, 4 voices, and was last updated 1 year ago by justisan.
-
-
08/23/2023 at 6:52 AM #219512
I found this system for the DAX and it sounds very interesting. Can someone code this for me please? Here are the trading rules:
Morning Weakness
– Entry short position: 8:40 am
– Time stop: 10:30 a.m
– Take Profit: 15 points
– Stop loss: 45 points
– Note: Once the markets become more volatile, it makes sense the
Add condition that the lecture was strong.Noon Strength
– Entry long position: 10:30 a.m
– Time stop: 2:35 p.m
– Take Profit: 80 points
– Stop loss: 60 points
– 1st condition: previous day’s closing price below GD 10
– 2nd condition: previous day’s closing price above GD 250Afternoon weakness
– Entry short position at 14:35
– Time stop: 18:20
– Take Profit: 15 points
– Stop loss: 50 points
– 1st condition: Price at entry is below the opening price of the
Cash market at 9 a.mOvernight Anomaly
– Entry long position at 18:20
– Time stop: Next day at 8:40 am
– Take Profit: 100 points
– Stop loss: 100 points
– 1st condition: previous day’s closing price above GD 250https://ninjacademy.traderfox.de/handelssysteme/intraday-charlie-intraday-dax-zyklen/id-2675
08/23/2023 at 5:48 PM #219582What does GD mean?
08/23/2023 at 5:55 PM #219584This is the code (without the NOTE and the GD explanations):
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485DEFPARAM CumulateOrders = true//IF Not OnMarket THENID = 0ENDIF//IF Time = 090000 THENPriceAt9 = closeENDIF//-----------------------------------------------------------------------------------------------------/*Morning Weakness- Entry short position: 8:40 am- Time stop: 10:30 a.m- Take Profit: 15 points- Stop loss: 45 points- Note: Once the markets become more volatile, it makes sense the Add condition that the lecture was strong.*/IF Time = 084000 THEN //What does you note mean?SELLSHORT 1 Contract at MarketSET TARGET pPROFIT 15SET STOP pLOSS 45ID = 1ENDIFIF OnMarket AND ID = 1 AND Time = 103000 THENEXITSHORT AT MarketENDIF////-----------------------------------------------------------------------------------------------------/*Noon Strength- Entry long position: 10:30 a.m- Time stop: 2:35 p.m- Take Profit: 80 points- Stop loss: 60 points- 1st condition: previous day’s closing price below GD 10- 2nd condition: previous day’s closing price above GD 250*/IF Time = 103000 THEN //what does GD mean ?BUY 1 Contract at MarketSET TARGET pPROFIT 80SET STOP pLOSS 60ID = 2ENDIFIF OnMarket AND ID = 2 AND Time = 143500 THENSELL AT MarketENDIF////-----------------------------------------------------------------------------------------------------/*Afternoon weakness- Entry short position at 14:35- Time stop: 18:20- Take Profit: 15 points- Stop loss: 50 points- 1st condition: Price at entry is below the opening price of the Cash market at 9 a.m*/IF Time = 143500 AND (close < PriceAt9) THEN //What does you note mean?SELLSHORT 1 Contract at MarketSET TARGET pPROFIT 15SET STOP pLOSS 50ID = 3ENDIFIF OnMarket AND ID = 3 AND Time = 182000 THENEXITSHORT AT MarketENDIF////-----------------------------------------------------------------------------------------------------/*Overnight Anomaly- Entry long position at 18:20- Time stop: Next day at 8:40 am- Take Profit: 100 points- Stop loss: 100 points- 1st condition: previous day’s closing price above GD 250*/IF Time = 182000 THEN //what does GD mean ?BUY 1 Contract at MarketSET TARGET pPROFIT 100SET STOP pLOSS 100ID = 4ENDIFIF OnMarket AND ID = 4 AND Time = 084000 THENSELL AT MarketENDIF08/23/2023 at 6:53 PM #21959108/24/2023 at 9:30 AM #219619This the updated version (with MAs):
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788DEFPARAM CumulateOrders = true//IF Not OnMarket THENID = 0ENDIF//IF Time = 090000 THENPriceAt9 = closeENDIF//Sma10 = average[10,0](close)Sma250 = average[250,0](close)//-----------------------------------------------------------------------------------------------------/*Morning Weakness- Entry short position: 8:40 am- Time stop: 10:30 a.m- Take Profit: 15 points- Stop loss: 45 points- Note: Once the markets become more volatile, it makes sense the Add condition that the lecture was strong.*/IF Time = 084000 THEN //What does you note mean?SELLSHORT 1 Contract at MarketSET TARGET pPROFIT 15SET STOP pLOSS 45ID = 1ENDIFIF OnMarket AND ID = 1 AND Time = 103000 THENEXITSHORT AT MarketENDIF////-----------------------------------------------------------------------------------------------------/*Noon Strength- Entry long position: 10:30 a.m- Time stop: 2:35 p.m- Take Profit: 80 points- Stop loss: 60 points- 1st condition: previous day’s closing price below GD 10- 2nd condition: previous day’s closing price above GD 250*/IF (Time = 103000) AND (Dclose(1) < Sma10) AND (Dclose(1) > Sma250) THENBUY 1 Contract at MarketSET TARGET pPROFIT 80SET STOP pLOSS 60ID = 2ENDIFIF OnMarket AND ID = 2 AND Time = 143500 THENSELL AT MarketENDIF////-----------------------------------------------------------------------------------------------------/*Afternoon weakness- Entry short position at 14:35- Time stop: 18:20- Take Profit: 15 points- Stop loss: 50 points- 1st condition: Price at entry is below the opening price of the Cash market at 9 a.m*/IF Time = 143500 AND (close < PriceAt9) THEN //What does you note mean?SELLSHORT 1 Contract at MarketSET TARGET pPROFIT 15SET STOP pLOSS 50ID = 3ENDIFIF OnMarket AND ID = 3 AND Time = 182000 THENEXITSHORT AT MarketENDIF////-----------------------------------------------------------------------------------------------------/*Overnight Anomaly- Entry long position at 18:20- Time stop: Next day at 8:40 am- Take Profit: 100 points- Stop loss: 100 points- 1st condition: previous day’s closing price above GD 250*/IF Time = 182000 AND (Dclose(1) > Sma250) THENBUY 1 Contract at MarketSET TARGET pPROFIT 100SET STOP pLOSS 100ID = 4ENDIFIF OnMarket AND ID = 4 AND Time = 084000 THENSELL AT MarketENDIF1 user thanked author for this post.
08/27/2023 at 8:04 PM #21988408/27/2023 at 8:15 PM #21988708/27/2023 at 8:42 PM #21988908/29/2023 at 9:38 PM #220037hi phoentzs,
I have no real clue about dax morning/noon/afternoon cycles – I mean I did not test them ever. but since overnight anomaly is generally well known, I was “stealing” the idea and did my own implementation for cfd and futures (as somebody told: “steal the ideas, but not the implementation”) – and it seams to work. it has ultra-simple logic, no GDs/SMAs or other indicators, just checking if prices around the end of main stock trading hours (let’s say 17:30) are stronger than at opening in the morning (09:00) and then buying and holding overnight, just with stop loss, but no targets – simply selling in the morning before the cash market opens. very few lines of code. it’s consistently profitable, but not extraordinary profitable strategy. you have to consider also cost of holding the position overnight – these costs increased a lot recently with increasing interest rates. so on one hand it might work better with futures (no overnight costs) than with cfd, on other hand with cfd you have an option to choose “guaranteed” exit stop (which again cost some points but only if triggered) – which prevents you from huge slippage / overnight gaps / over-weekend gaps while guaranteed stops are not available with futures trading (well, maybe one can create it somehow with options, but again I have here no real clue about “how”, just rough idea). no free lunch, as always.
according my tests there is also an anomaly of “weak morning/noon” which is opposite to the logic above: when dax is negative from opening till lunch time and makes new lows of the day after lunch time, it “usually” goes down until end of the day and even more overnight. strategy makes small losses month after month, it’s not even profitable every year, but it catches basically all smaller and bigger crasches of dax index and “makes a killing” then. it’s kind of “insurance” against crashes, good to have in the portfolio of strategies, especially because it seems particularly hard to find any stragegy at all which works on the short side when it comes to equity indices trading.
sorry I will not share any codes or more details on the scenario details above, just want to encourage to excercise some coding yourself, think of simple scenarios which you can write down in few words/sentences (and code accordingly), and test it, not fogetting to consider the costs (spread, slippage, holding position overnight).
regards
justisan
-
AuthorPosts
Find exclusive trading pro-tools on