S&P500 automatic trading strategy ROBOT EEUU 500 1H
Forums › ProRealTime English forum › ProOrder support › S&P500 automatic trading strategy ROBOT EEUU 500 1H
- This topic has 30 replies, 11 voices, and was last updated 4 years ago by robertogozzi.
-
-
02/03/2017 at 5:15 PM #23811
Hello again!
I share this robot that I have been testing for several months and it completely matches the backtest with reality.It is very simple, simply fulfilling 4 conditions of several indicators.
Maybe this too prepared and suffers from being over optimized, I have practically a year following it in demo and is equal to the backtest.
I share so that you can probe with 200,000 new bars and new ideas and improve it for the good of all.
Look at the backtest that even if you put a number of bars 0, it is not, they are when you touch the take profit.
To see what it seems.
Total of 14 users thanked author for this post. Here are last 10 listed.
02/03/2017 at 5:49 PM #23819Thank you very much Raul. I’m in. About testing overfitting, I have access to a new tool in my beta VIP version. I’ll give news about it when I can talk about it.
I think you should add this strategy into the library too to drain more people, that’s why you get many feedback in the other thread. I could make it for you, but I need a short description of the strategy at least.
2 users thanked author for this post.
02/03/2017 at 6:02 PM #2382502/03/2017 at 6:40 PM #2383202/03/2017 at 7:22 PM #2383402/03/2017 at 10:10 PM #23852Thanks for this Raul. I attach the 200,000 units results. It seems fairly consistent with the exception of 2010 and 2011 which were bad years. The drawdown is too big at 42% for 5k of capital so you would need at least twice this amount to run with this strategy. I have run it in tick by tick mode but I do notice something strange about the zero bar trades P&L and entry trades timelog in general. I took an example of the 10/02/16 – 18/02/16 opening and closing trades :
The Orders list suggest they were opened on the 10th (5 trades total) and they were closed on the 17th and 18th (5 trades total). This can be confirmed by the chart as well. However, on the closed positions list the last exit trade on the 18th 5am shows as zero bar indicating that it was opened and closed in the same hour (but it wasn;t as the entry trade was made on the 10th)….. The same incorrect entry trade time errors are also present on the other non zero bar closing trades (which were opened in the 10th not the 17th as stated in the closing list). Strange, needs some more looking into….. but thanks again for sharing. Looks promising so far.
02/03/2017 at 10:14 PM #2385802/04/2017 at 10:23 AM #23887Hey.
Since your conditions are met so many time during the same position it sometimes takes heaps of contracts av you can see in my added picture.
I´ve made it more conservative för my own test period with the code change: DEFPARAM CumulateOrders = false. But still 5 contracts.
I think that it´s better to have a MM-system than a script that cumulate orders. See added picture.
02/04/2017 at 11:38 AM #23902Hello! If I already have it tested, without accumulating orders, in ig, the minimum position for s & p500 is 5 contracts, ideally I would accumulate orders but from there, instead of 5 in 5, I get only 1 each time Meets the condition, thus maintaining the percentage and ratio
02/04/2017 at 11:39 AM #2390302/04/2017 at 3:00 PM #23917Ok I didn´t realise that the minimum position size was 5 contract. I still think that it would be better with a mm system instead of accumulation. I mean 120 contract at once. That’s a big position!
Edit: Looking forward to see your dow code
02/04/2017 at 5:21 PM #2392602/04/2017 at 5:28 PM #23927Thus introduces the first operation of the minimum of 5 contracts and from there it is getting one by one.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546// Definición de los parámetros del códigoDEFPARAM CumulateOrders = true // Acumulación de posiciones desactivadasl=100n=5if countofposition > 1 thenn=1endifif countofposition < 50 then// Condiciones para entrada de posiciones largasindicator1 = ExponentialAverage[24](MACDline[21,44,24](close))indicator2 = MACDline[21,44,24](close)c1 = (indicator1 <= indicator2)indicator3 = Stochastic[28,8](close)indicator4 = Average[22](Stochastic[28,8](close))c2 = (indicator3 >= indicator4)indicator8 = close + 5ignored, ignored, indicator9 = CALL "MiIndicador(3)"(close)c6 = (indicator8 <= indicator9)indicator11 = closeindicator21 = ExponentialAverage[43](close)c11 = (indicator11 >= indicator21)IF c1 AND c2 AND c6 and c11 THENBUY n CONTRACT AT MARKETENDIFendif// Condiciones de salida de posiciones largasignored, indicator10, ignored = CALL "MiIndicador(3)"(close)c7 = (close CROSSES under indicator10)IF c7 THENSELL AT MARKETENDIFSET STOP pLOSS slSET TARGET pPROFIT 6002/05/2017 at 9:42 AM #23966The code is now available in the library: https://www.prorealcode.com/prorealtime-trading-strategies/sp500-automated-trading-strategy-eeuu-500-mini-1e-1hora/
I would suggest to make optimisation with In Sample and Out Of Sample period to validate a bit what the optimiser has found to be the best periods for your indicators. Otherwise, you’ll be kind of overfit, but you already know that 🙂
02/06/2017 at 7:07 AM #24020Hey guys,
@raul thanks for a great system as allways. The fear I have is that this is a long only system and that we at this time in the market are at an ATH of being overbought… A decline should me iminent, that’s why I fear such a system.Anyone that shares my fears or am I being a big baby?
-
AuthorPosts
Find exclusive trading pro-tools on