SISTEMA DELLE TRE CANDELE CONSECUTIVE

Viewing 15 posts - 16 through 30 (of 42 total)
  • Author
    Posts
  • #105072 quote
    robertogozzi
    Moderator
    Master

    Evidenzia le candele errate, con ben evidente data ed ora di ciascuna.

    #105255 quote
    Alessandro
    Participant
    Junior

    Stò iniziando a capire il codice e ho apportato alcune modifiche,non capisco però questa variabile per poterla settare

    HigherHIGHs = (summation[CandleNum – 1](high > high[1]) = (CandleNum – 1))

    il viceversa

    LowerLOWs = (summation[CandleNum – 1](low < low[1]) = (CandleNum – 1))

    Grazie roberto della disponibilità

    #105263 quote
    robertogozzi
    Moderator
    Master

    Servono a verificare che per N candele consecutive, in tal caso CANDLENUM-1, vi siano stati massimi crescenti o minimi crescenti.

    Si toglie 1 da CANDLENUM perché fa il confronto tra il massimo/minimo corrente e quello precedente, quindi per confrontare, ad esempio, 5 massimi/minimi, SUMMATION deve fare 4 confronti, non 5.

    #105280 quote
    Alessandro
    Participant
    Junior

    Non ne vengo a capo può backtestare per favore il sistema e dirmi perchè salta cosi tante possibilità di trade anche nelle linee di trend definite e consistenti?

    #105282 quote
    robertogozzi
    Moderator
    Master

    Indicamene 2-3 saltate, con data ed ora precise di quando avrebbe dovuto entrare e non l’ha fatto.

    #105283 quote
    Alessandro
    Participant
    Junior

    meroledì 21 ore 9 trend al rialzo di 130 pips…. nessuna entrata long

    giovedì 22 ore 9  trend al rialzo di 90 pips…. nessuna entrata long

    questi sono due esempi grossi ma di meno consistenti ce ne sono tanti

    #105288 quote
    robertogozzi
    Moderator
    Master

    Rispetto al tuo post del 18 Agosto hai invertito la definizione:

    Bullish        = summation[CandleNum](close < open) = CandleNum
    Bearish        = summation[CandleNum](close > open) = CandleNum

    perché? Come hai fatto con il Copia e Incolla?

    In pratica BULLISH è vero dopo CANDLENUM candele rosse (e viceversa per BEARISH)!!!

    In ogni caso, il 21/8 alle 9 non c’erano le condizioni, che invece c’erano, ed è entrato con le dovute correzioni, alle 9:03. Anche il 22/8 alle 9 non c’erano le condizioni.

    #105292 quote
    Alessandro
    Participant
    Junior

    Le ho ritoccate a mano….mi sembravano al contrario ora le ho riguardate

    1
    2
    Bullish        = summation[CandleNum](close < open) = CandleNum

    variabile bullish è ugale alla somma di 3 candele la cui chiusura è minore dell apertura…..ho sbagliato era giusta prima.

    Tu che condizioni aggiungeresti per beccare quei due trade?
    #105294 quote
    robertogozzi
    Moderator
    Master

    Non puoi mettere una condizione ad hoc per beccarli, perché non si ripeteranno mai più in quelle stesse sequenze.

    Premesso che non puoi beccarli tutti, devi trovare una conformazione di candele, se vuoi usare solo la price action, che prenda la maggior parte delle operazioni e sia profittevole.

    Altrimenti devi ricorrere ad indicatori vari, magari al supporto Multi Time Frame che ti consente di vedere i segnali su vari TF per avere maggiori conferme.

    #105299 quote
    Alessandro
    Participant
    Junior

    Capisco,ma se volessi aggiungere un’altro tipo di entrata a mercato ad esempio

    Se ho una candela singola che si sviluppa in 20 pips entra a mercato si potrebbe integrare,per lo meno stavo leggendo che si possono mettere più condizioni per entrare a mercato

    #105300 quote
    robertogozzi
    Moderator
    Master

    Per entrare a mercato puoi mettere anche 10 o più condizioni, collegandole con AND oppure OR.

    Esempio:

    c1 = summation[5](high > high[1] AND close > open) //5 candele rialziste e 3 volte con Massimi crescenti
    c2 = Rsi[14](close) > 70                           //Rsi in ipercomprato
    IF c1 AND c2 THEN
       sell 1 contract at market                       //vendi in previsione di un ritracciamento
       set target pprofit 50
       set stop   ploss   20
    ENDIF

    devi stabilire te le condizioni di entrata e di uscita.

    Alessandro thanked this post
    #105319 quote
    Alessandro
    Participant
    Junior
    ONCE CandleNum = C
    Bullish        = summation[CandleNum](close > open) = CandleNum
    Bearish        = summation[CandleNum](close < open) = CandleNum
    HigherHIGHs    = (summation[CandleNum - 1](high > high[1]) = (CandleNum - 1))
    LowerLOWs      = (summation[CandleNum - 1](low < low[1])   = (CandleNum - 1))
    IF Bearish AND LowerLOWs AND Not OnMarket THEN
    BUY 1 CONTRACT AT MARKET
    Sl = max(S,(close - low) / pipsize)
    Tp = Sl * M
    ENDIF
    IF Bullish AND HigherHIGHs AND Not OnMarket THEN
    SELLSHORT 1 CONTRACT AT MARKET
    Sl = max(S,(high - close) / pipsize)
    Tp = Sl * M
    ENDIF
    SET STOP   pLOSS   Sl
    SET TARGET pPROFIT Tp
    //trailing stop
    trailingstop = T
    //resetting variables when no trades are on market
    if not onmarket then
    MAXPRICE = 0
    MINPRICE = close
    priceexit = 0
    endif
    //case SHORT order
    if shortonmarket then
    MINPRICE = MIN(MINPRICE,close) //saving the MFE of the current trade
    if tradeprice(1)-MINPRICE>=trailingstop*pointsize then //if the MFE is higher than the trailingstop then
    priceexit = MINPRICE+trailingstop*pointsize //set the exit price at the MFE + trailing stop price level
    endif
    endif
    //case LONG order
    if longonmarket then
    MAXPRICE = MAX(MAXPRICE,close) //saving the MFE of the current trade
    if MAXPRICE-tradeprice(1)>=trailingstop*pointsize then //if the MFE is higher than the trailingstop then
    priceexit = MAXPRICE-trailingstop*pointsize //set the exit price at the MFE - trailing stop price level
    endif
    endif
    //exit on trailing stop price levels
    if onmarket and priceexit>0 then
    EXITSHORT AT priceexit STOP
    SELL AT priceexit STOP
    endif

    Grazie Roberto ma le variabili che di cui mi hai fatto esempio non riesco a inserirle ne codice sopra….mi faresti cortesemente un esempio di inserimento?

    #105320 quote
    robertogozzi
    Moderator
    Master

    Tu hai già delle condizioni di entrata, non  ha molto senso metterci quelle, al limite quella del RSI, l’altra no perché hai già una verifica delle candele.

    ONCE CandleNum = 3
    Bullish        = summation[CandleNum](close > open) = CandleNum
    Bearish        = summation[CandleNum](close < open) = CandleNum
    HigherHIGHs    = (summation[CandleNum - 1](high > high[1]) = (CandleNum - 1))
    LowerLOWs      = (summation[CandleNum - 1](low < low[1])   = (CandleNum - 1))
    MyRsi          = Rsi[14](close)
    IF Bearish AND LowerLOWs AND Not OnMarket AND MyRsi > 30 THEN
    BUY 1 CONTRACT AT MARKET
    Sl = max(S,(close - low) / pipsize)
    Tp = Sl * M
    ENDIF
    IF Bullish AND HigherHIGHs AND Not OnMarket AND MyRsi < 70 THEN
    SELLSHORT 1 CONTRACT AT MARKET
    Sl = max(S,(high - close) / pipsize)
    Tp = Sl * M
    ENDIF
    SET STOP   pLOSS   Sl
    SET TARGET pPROFIT Tp
    //trailing stop
    trailingstop = T
    //resetting variables when no trades are on market
    if not onmarket then
    MAXPRICE = 0
    MINPRICE = close
    priceexit = 0
    endif
    //case SHORT order
    if shortonmarket then
    MINPRICE = MIN(MINPRICE,close) //saving the MFE of the current trade
    if tradeprice(1)-MINPRICE>=trailingstop*pointsize then //if the MFE is higher than the trailingstop then
    priceexit = MINPRICE+trailingstop*pointsize //set the exit price at the MFE + trailing stop price level
    endif
    endif
    //case LONG order
    if longonmarket then
    MAXPRICE = MAX(MAXPRICE,close) //saving the MFE of the current trade
    if MAXPRICE-tradeprice(1)>=trailingstop*pointsize then //if the MFE is higher than the trailingstop then
    priceexit = MAXPRICE-trailingstop*pointsize //set the exit price at the MFE - trailing stop price level
    endif
    endif
    //exit on trailing stop price levels
    if onmarket and priceexit>0 then
    EXITSHORT AT priceexit STOP
    SELL AT priceexit STOP
    endif

    Non l’ho provato.

    Alessandro thanked this post
    #105383 quote
    Alessandro
    Participant
    Junior

    ho scaricato i manuali e stò iniziando a studiarli…..

    non sò se si possa fare nel forum al limite me lo dite e lo cancello,Roberto lei può scrivere un codice personalizzato a pagamento?

    nel caso le lascio la mia mail XXXXXXXXX

    io per scriverne uno mio ci metterò un bel pò di tempo nel frattempo ne vorrei iniziare a utilizzare uno.

    #105388 quote
    robertogozzi
    Moderator
    Master

    Ho cancellato l’email perché è vietato pubblicare riferimenti personali.

    Per contattare qualcuno occorre chiedere il permesso all’admin tramite i contatti.

    Per la programmazione a pagamento segui questo link https://www.prorealcode.com/trading-programming-services/

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

SISTEMA DELLE TRE CANDELE CONSECUTIVE


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
Gaspare @gaspare Participant
Summary

This topic contains 41 replies,
has 3 voices, and was last updated by Gaspare
5 years, 11 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 05/28/2019
Status: Active
Attachments: 7 files
Logo Logo
Loading...