continui messaggi di strategia fallita e blocco degli ordini a mercato su algo

Viewing 15 posts - 1 through 15 (of 29 total)
  • Author
    Posts
  • #174603 quote
    Steven11
    Participant
    Average

    Buon pomeriggio Roberto , sto avendo problemi in quanto o messo in atto un algo che opera sul forex sul 15 minuti e non mi fa entrare gli ordini mi esce sempre strategia fallita (ho messo l’opzione aggiusta lo stop automaticamente) ma non mi è entrato neanche un ordine …….come è possibile? io opero con IG  non si può operare con gli algo sul forex?

    Grazie in anticipo

    #174605 quote
    robertogozzi
    Moderator
    Master

    Le strategie possono operare su qualunque strumento.

    Che messaggi hai?

    Nella lista degli ordini ci sono messaggi?

    #174613 quote
    Steven11
    Participant
    Average

    Roberto mi esce quando dovrebbe entrare mi fa un segnale acustico e mi esce messaggio strategia fallita poi nelle posizioni mi esce il simbolo del triangolo con il punto esclamativo al centro, questo sistema di trading è stato interrrotto perchè la sua validità è scaduta…..ogni volta io lo riattacco e non entra mai

    #174614 quote
    Steven11
    Participant
    Average

    strategia interrotta…..

    #174619 quote
    robertogozzi
    Moderator
    Master

    Aumenta la validità (vedi foto).

    Ho spostato il topic in ProOrder, in quanto si tratta di una strategia.

    #174626 quote
    Steven11
    Participant
    Average

    Roberto purtrppo non è quello il problema la scadenza era il 6 agosto….oggi è 3 , ma a te funzionano? ti posto il codice dell’algo.

    Defparam cumulateorders = false
     
    // TAILLE DES POSITIONS
    n = 1
     
    // PARAMETRES
    // high ratio = few positions
    // AUD/JPY : ratio = 0.5 / SL = 0.8 / TP = 1.2 / Period = 12
    // EUR/JPY : ratio = 0.6 / SL = 1 / TP = 0.8 / Period = 8
    // GBP/JPY : ratio = 0.5 / SL = 0.6 / TP = 1 / Period = 8
    // USD/JPY : ratio = 0.5 / SL = 1 / TP = 0.8 / Period = 12
     
    ratio = 0.6
    period = 8
     
    // HORAIRES
    startTime = 210000
    endTime = 231500
    exitLongTime = 210000
    exitShortTime = 80000
     
     
    // BOUGIE REFERENCE à StartTime
    if time = startTime THEN
    amplitude = highest[Period](high) - lowest[Period](low)
    ouverture = close
    endif
     
    // LONGS & SHORTS : every day except Fridays
    // entre StartTime et EndTime
    if time >= startTime and time <= endTime and dayOfWeek <> 5 then
    buy n shares at ouverture - amplitude*ratio limit
    sellshort n shares at ouverture + amplitude*ratio limit
    endif
     
    // Stop Loss & Take Profit
    // Stop e target
    SET STOP PLOSS 25
    SET TARGET PPROFIT 13 //395
    
    //
    //trailing stop function
    //************************************************************************
    //     trailing stop function
    trailingstart = 19  //10   trailing will start @trailinstart points profit
    trailingstep  = 24   //5    trailing step to move the "stoploss"
    //
    //reset the stoploss value
    IF NOT ONMARKET THEN
    newSL=0
    ENDIF
    //manage long positions
    IF LONGONMARKET THEN
    //first move (breakeven)
    IF newSL=0 AND HIGH-tradeprice(1)>=trailingstart*pipsize THEN                 //close --> HIGH
    newSL = tradeprice(1)+trailingstep*pipsize
    //  new coding
    IF newSL > close THEN                                                  //if current closing price is < new SL then exit IMMEDIATELY!
    SELL AT newSL LIMIT
    ENDIF
    //  end new coding
    ENDIF
    //next moves
    IF newSL>0 AND close-newSL>=trailingstep*pipsize THEN
    newSL = newSL+trailingstep*pipsize
    //  new coding
    IF newSL > close THEN                                                  //if current closing price is < new SL then exit IMMEDIATELY!
    SELL AT newSL LIMIT
    ENDIF
    //  end new coding
    ENDIF
    ENDIF
    //manage short positions
    IF SHORTONMARKET THEN
    //first move (breakeven)
    IF newSL=0 AND tradeprice(1)-LOW>=trailingstart*pipsize THEN                 //close --> LOW
    newSL = tradeprice(1)-trailingstep*pipsize
    //  new coding
    IF newSL < close THEN                                                     //if current closing price is > new SL then exit IMMEDIATELY!
    EXITSHORT AT newSL LIMIT
    
    ENDIF
    //  end new coding
    ENDIF
    //next moves
    IF newSL>0 AND newSL-close>=trailingstep*pipsize THEN
    newSL = newSL-trailingstep*pipsize
    //  new coding
    IF newSL < close THEN                                                    //if current closing price is > new SL then exit IMMEDIATELY
    EXITSHORT AT MARKET
    ENDIF
    //  end new coding
    ENDIF
    ENDIF
    //stop order to exit the positions
    IF newSL>0 THEN
    SELL      AT newSL STOP
    EXITSHORT AT MARKET
    ENDIF
     
    // Exit Time
    if time = exitLongTime then
    sell at market
    endif
    if time = exitShortTime then
    exitshort at market
    endif
    #174630 quote
    robertogozzi
    Moderator
    Master

    L’ho provato ed ha funzionato.
    Non è che per caso è una scadenza di IG (se è la demo), per cui la piattaforma è scaduta, però finché è aperta sembra funzionante?
    In ogni caso prova a chiudere la piattaforma e riaprirla.
    Se il problema persiste prova anche a riavviare il PC.
    Se dovesse persistere ancora… solo ProRealTime (o IG) possono darti una spiegazione.

    #174631 quote
    Steven11
    Participant
    Average

    si li ho chiamati entrambi ed ho segnalato il problema , ma tu lo hai provato in reale l’algo che ti ho postato e funziona?

    #174634 quote
    robertogozzi
    Moderator
    Master

    L’ho fatto partire in demo ed ha anche aperto una posizione.

    Dopodiché l’ho interrotto e rimosso.

    #174786 quote
    Steven11
    Participant
    Average

    Ciao Roberto , ho modificato il sistema con degli accorgimenti e lo ho lanciato in reale va bene il problema era il conto demo vecchio che bloccava gli ingressi, grazie.

    #174792 quote
    tundercut
    Participant
    Senior

    Ciao, ho visto che il sistema è interessante, potresti postare le modifiche ? Se non è un problema per te.

    #174795 quote
    robertogozzi
    Moderator
    Master

    Che tipo di modifiche vorresti?

    #174800 quote
    tundercut
    Participant
    Senior

    E’ proprio questo il punto, mi piacerebbe sapere che modifiche ha fatto Steven 11, perchè ti spiego, ho lanciato anch’io il sistema in real trovandolo interessantee e facendo il backtest mi dice che proprio ieri sera ha aperto 2 posizioni su due cross diversi mentre nella realtà non è entrato senza darmi nessun errore perchè i codici sono rimasti attivi.

    #174803 quote
    robertogozzi
    Moderator
    Master

    Scusa, non avevo capito che ti riferivi alle modifiche fatte da Steven11.

    #175027 quote
    murre87
    Participant
    Senior

    Hej Roberto, jag modifierade systemet med några knep och jag startade det på riktigt okej problemet var det gamla demokontot som blockerade ingångarna, tack.

    cosa cambia?

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

continui messaggi di strategia fallita e blocco degli ordini a mercato su algo


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
Steven11 @steven11 Participant
Summary

This topic contains 28 replies,
has 5 voices, and was last updated by robertogozzi
4 years, 5 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 08/03/2021
Status: Active
Attachments: 2 files
Logo Logo
Loading...