S&P500 automatic trading strategy ROBOT EEUU 500 1H

Viewing 15 posts - 16 through 30 (of 31 total)
  • Author
    Posts
  • #24026 quote
    Nicolas
    Keymaster
    Master

    @CN

    The strategy has a stoploss. It may trigger with a lot of opened positions, but an idea would be to limit the quantity of them on market at the same time.

    #24121 quote
    Raul Vg
    Participant
    Senior

    Hello! This is the code for the DOW, to see if we can reduce the Maxdrawdown.

     

    // Definición de los parámetros del código
    DEFPARAM CumulateOrders = true // Acumulación de posiciones desactivada
    
    
    
    if countofposition<50 then
    n=1
    // Condiciones para entrada de posiciones largas
    indicator1 = 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 - 20
    ignored, ignored, indicator9 = CALL "MiIndicador(3)"(close)
    c6 = (indicator8 <= indicator9)
    
    indicator11 = close
    indicator21 = ExponentialAverage[40](close)
    c11 = (indicator11 >= indicator21)
    
    IF c1 AND c2 AND c6 and c11 THEN
    BUY n CONTRACT AT MARKET
    ENDIF
    endif
    // Condiciones de salida de posiciones largas
    ignored, indicator10, ignored = CALL "MiIndicador(3)"(close)
    c7 = (close CROSSES under indicator10)
    
    IF c7 THEN
    SELL  AT MARKET
    ENDIF
    SET STOP pLOSS 800
    SET TARGET pPROFIT 300
    Paris thanked this post
    #24122 quote
    Joachim Nilsson
    Participant
    Average

    Thanks Raul. Good job!

    The only problem I see with this code is that you are saved by accumulating orders-It dosen´t work on it´s own.

    #24123 quote
    Raul Vg
    Participant
    Senior

    yes! I am configuring it to work without accumulating hehe this afternoon I will share it so that we can improve it again!

    Paris thanked this post
    #24124 quote
    Joachim Nilsson
    Participant
    Average

    I’m doing the same right now haha! But i´ll have to leave soon so I will come back toinght 🙂

    #24126 quote
    Raul Vg
    Participant
    Senior

    Although it continues to have accumulation, this could be a possible solution:

     

    // Definición de los parámetros del código
    DEFPARAM CumulateOrders = true // Acumulación de posiciones desactivada
    
    
    
    // Condiciones para entrada de posiciones largas
    
    
    
    indicator8 = close -25
    ignored, ignored, indicator9 = CALL "MiIndicador(3)"(close)
    c6 = (indicator8 <= indicator9)
    
    indicator11 = ExponentialAverage[20](close)
    indicator21 = ExponentialAverage[10](close)
    c11 = (indicator11 crosses over indicator21)
    
    IF c6 and c11 THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF
    
    // Condiciones de salida de posiciones largas
    ignored, indicator10, ignored = CALL "MiIndicador(3)"(close)
    c7 = (close CROSSES under indicator10)
    
    IF c7 THEN
    SELL  AT MARKET
    ENDIF
    SET STOP pLOSS 800
    SET TARGET pPROFIT 300
    
    #24143 quote
    Joachim Nilsson
    Participant
    Average

    Hi again!

    That code looks much better! Good job!

    I´m optimizing right now so bear with me.

    I´m trying som different timeframes as well. So far this is how far I’ve come in the 4 hours timeframe. Nothing special but I think its worth sharing.

    // Definición de los parámetros del código
    DEFPARAM CumulateOrders = true// Acumulación de posiciones desactivada
    
    
    
    // Condiciones para entrada de posiciones largas
    
    
    
    indicator8 = close -95//--25
    ignored, ignored, indicator9 = CALL "MiIndicador(3)"(close)
    c6 = (indicator8 <= indicator9)
    
    indicator11 = ExponentialAverage[50](close) //20
    indicator21 = ExponentialAverage[40](close) //10
    c11 = (indicator11 crosses over indicator21)
    
    IF c6 and c11 THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF
    
    // Condiciones de salida de posiciones largas
    ignored, indicator10, ignored = CALL "MiIndicador(3)"(close)
    c7 = (close CROSSES under indicator10)
    
    IF c7 THEN
    SELL  AT MARKET
    ENDIF
    SET STOP pLOSS 850
    SET TARGET pPROFIT 50
    
    #24144 quote
    Simply
    Participant
    Junior

    Hi,
    nice idea, but Chance-Risk is very bad.   TP= 50, SL=850  CR= ~0,06; TP= 300, SL=800 CR= ~0,375

    Have a nice day,

    #24147 quote
    Nicolas
    Keymaster
    Master

    @Simply

    Because the strategy stacks orders while the market move in the wrong way. With an averaging down / grid strategy, you can’t make risk/reward comparison like other more “classic” strategies and have the same conclusion.

    Simply and Paris thanked this post
    #24148 quote
    Joachim Nilsson
    Participant
    Average

    For the record. I´m not going to start it. I just wanted to share some “in progress” code 🙂

    #24453 quote
    Frankiesc
    Participant
    Master

    Hi Raul, I’m watching your strategy and I wish you could explain it better. You say that you use 4 indicators, a MACD, a Stoctic, a Moving Average and Ichimoku … could you indicate if the parameters of the indicators? MACD and stochastic by default? The Mobile Media of how many periods is it? I ask you please explain what the extrategia is that seems to be very interesting. Thank you very much in advance I await your response Greetings


    Hola Raul, estoy viendo tu estrategia y me gustaría que la pudieras expliacar mejor.

    Dices que utilizas 4 indicadores, un MACD, un Estocático, una Média Móvil e Ichimoku… ¿podrías indicar si los parámetros de los indicadores? ¿el MACD y el estocástico por defecto? ¿La Media Móvil de cuantos periodos es?
    Te pido por favor que expliques en qué consiste la extrategia que parece ser muy interesante.

    Muchas gracias de antemano

    Quedo a la espera de tu respuesta

    Saludos

    #24460 quote
    Nicolas
    Keymaster
    Master

    @Frankiesc

    I translated your post in English, please speak English in this part of the forum, for everyone’s comprehension. Thanks in advance.

    #24485 quote
    Frankiesc
    Participant
    Master

    Hi Nicolas,
    I’m sorry for the inconvenience. It will not happen again.

    #38642 quote
    JR1976
    Participant
    Veteran

    Dear Raul Vg,

    very interesting Code

    Some day ago , good trade on SP500 mini

    thanks

    Regards.

    #118765 quote
    bertrandpinoy
    Participant
    Veteran

    bonjour cette strategy est elle toujours bonne? sur quelle instrument et unite de temps svp? merci

Viewing 15 posts - 16 through 30 (of 31 total)
  • You must be logged in to reply to this topic.

S&P500 automatic trading strategy ROBOT EEUU 500 1H


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Raul Vg @raul_v Participant
Summary

This topic contains 30 replies,
has 11 voices, and was last updated by robertogozzi
6 years ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 02/03/2017
Status: Active
Attachments: 11 files
Logo Logo
Loading...