Dax-10sec automated trading strategy
Forums › ProRealTime English forum › ProOrder support › Dax-10sec automated trading strategy
- This topic has 5 replies, 3 voices, and was last updated 3 years ago by Mattias.
-
-
07/09/2020 at 10:00 AM #138544
I found this code on the forum, dates back to a few years ago, I have optimized it for the current period; thanks to the code writer, I can’t remember the name, he works on the timeframe at 10seconds, with a very fast take profit to have a linear gain curve, he also works only in periods of time (9-17.30) when the spread is low ( 1.2)
if you can optimize it still write directly here on the forum, I sent it to test today, and already managed to earn 50 euros in less than 4 hours,
Thank youAlex
123456789101112131415161718192021222324252627282930313233343536//SPEAD = 2.5//Capital = £500//Trading hours from DAX open until NYSE close. No after hours trading.//Time is UTC +2 (South Afica time)DEFPARAM CumulateOrders = False // Cumulating positions deactivated// Prevents the system from creating new orders to enter the market or increase position size before the specified timenoEntryBeforeTime = 090000timeEnterBefore = time >= noEntryBeforeTime// Prevents the system from placing new orders to enter the market or increase position size after the specified timenoEntryAfterTime = 173000timeEnterAfter = time < noEntryAfterTime// Conditions to enter long positionsindicator1 = WeightedAverage[25](totalPrice)c1 = (High CROSSES OVER indicator1)indicator2 = WeightedAverage[79](totalPrice)c2 = (low CROSSES OVER indicator2)IF (c1 AND c2) AND timeEnterBefore AND timeEnterAfter THENBuy 1 CONTRACT AT MARKETENDIFindicator3 = WeightedAverage[25](totalPrice)c3 = (low CROSSES UNDER indicator3)indicator4 = WeightedAverage[79](totalPrice)c4 = (High CROSSES UNDER indicator4)IF (c3 AND c4) AND timeEnterBefore AND timeEnterAfter THENSellShort 1 CONTRACT AT MARKETENDIF// Stops and targetsSET TARGET $PROFIT 907/09/2020 at 10:08 AM #138825Hi Alex, thanks for sharing. There is no stoploss in the strategy, only contrarian orders can close an order in a loss and therefore if it doesn’t happen it could lead on huge drawdown of your account. So any optimized values could also lead to the same equity curve, I’m sorry.
07/09/2020 at 10:22 AM #138828Hello nicolas,
thanks for the reply, i’m now working on the version with the stop loss; From monday he made 400 euros in germany 30(€5) that costs 3.2k (ig version); i’ll probably put a distante stoploss in the case the robot buy at a maximum or at a minium; working on the 10 sec the limit sales points are practically always touched; however, even a distant stoploss obviously has to be added for safety, i update you soonThanks
Alex
1 user thanked author for this post.
07/15/2020 at 12:56 PM #13933707/15/2020 at 1:31 PM #139349ok,thank you nicolas,
here you have a new version of the code, it always works on the 10sec dax
i’m now testing it with different x,y,z
i keep you update if i find the perfect Combination
daxxxx-10sec12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849//-------------------------------------------------------------------------// Codice principale : nn si sa m.a. colorata bull//-------------------------------------------------------------------------//SPEAD = 2.5//Capital = £500//Trading hours from DAX open until NYSE close. No after hours trading.//Time is UTC +2 (South Afica time)DEFPARAM CumulateOrders = false // Cumulating positions deactivateda=average[z] (close)if a[1]<a thenalex=100endifif a[1] > a thenalex=50endif// Prevents the system from creating new orders to enter the market or increase position size before the specified timenoEntryBeforeTime = 090000timeEnterBefore = time >= noEntryBeforeTime// Prevents the system from placing new orders to enter the market or increase position size after the specified timenoEntryAfterTime = 173000timeEnterAfter = time < noEntryAfterTime// Conditions to enter long positionsindicator1 = WeightedAverage[x](totalPrice)c1 = (High CROSSES OVER indicator1)indicator2 = WeightedAverage[y](totalPrice)c2 = (low CROSSES OVER indicator2)IF (c1 AND c2) AND timeEnterBefore AND timeEnterAfter and COUNTOFPOSITION=0 and alex=100 THENBuy 1 CONTRACT AT MARKETENDIFindicator3 = WeightedAverage[x](totalPrice)c3 = (low CROSSES UNDER indicator3)indicator4 = WeightedAverage[y](totalPrice)c4 = (High CROSSES UNDER indicator4)IF (c3 AND c4) AND timeEnterBefore AND timeEnterAfter and COUNTOFPOSITION=0 and alex=50 THENSellShort 1 CONTRACT AT MARKETENDIF// Stops and targetsSET TARGET $PROFIT 10SET STOP $LOSS 200thanks
Alex
1 user thanked author for this post.
03/16/2021 at 12:03 PM #164326 -
AuthorPosts
Find exclusive trading pro-tools on