trading system con pattern candlestik

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #194540 quote
    Ciccarelli FrancoCiccarelli Franco
    Participant
    Senior

    Il codice che allego l’ho trovato sul forum a titolo come questo titolo e volevo sapere se può funzionare anche a tf orario, o bisogna apportare modifiche?

    Grazie

    Cattura.png Cattura.png
    #194546 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    E’ sempre meglio se posti il codice, oppure un link ad esso (se esistente, come in questo caso).
    Non funziona correttamente, in quanto è scritto per il timeframe Daily.
    Con qualche modifica si può adattare.
    Cosa vorresti fare?

    #194565 quote
    Ciccarelli FrancoCiccarelli Franco
    Participant
    Senior

    Si lo vorrei ad orario.

    Grazie

    #194600 quote
    Ciccarelli FrancoCiccarelli Franco
    Participant
    Senior

    Ti volevo chiedere inoltre che provandolo ho rilevato un forte drawdown. E’ possibile abbassarlo?

    Grazie

    #194603 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Eccolo, puoi usarlo sul grafico orario (o 4 ore o 1 minuto, ecc…):

    DEFPARAM CumulateOrders = False
    Timeframe(Daily,UpdateOnClose)
    ONCE setup    = 0
    ONCE Distanza = 7
    //
    // PATTERN
    c1 = Close[0] > Open[0] // 4° giornata: rialzista
    c2 = Close[1] < Open[1] // 3° giornata: ribassista
    c3 = Close[2] < Open[2] // 2° giornata: ribassista
    c4 = Close[3] < Open[3] // 1° giornata: ribassista
    //
    //
    IF OnMarket THEN
    setup = 0
    ENDIF
    //
    if c1 and c2 and c3 and c4 and Not OnMarket then // se tutte le condizioni sono verificate
    gg    = OpenDay
    setup = 1
    entry = high + 1*pipsize
    sl    = (entry - (lowest[4](low) - 2*pipsize)) * 1.4
    tp    = sl //entry * 0.04
    SET TARGET PROFIT tp
    SET STOP   LOSS   sl
    endif
    IF Not OnMarket AND ((low <= (entry - sl)) OR (OpenDay <> gg)) THEN
    setup = 0
    ENDIF
    //
    Timeframe(default)
    IF setup AND Not OnMarket THEN
    IF close < (entry - Distanza) THEN
    BUY 1 CONTRACT AT Entry STOP
    ELSIF close > (entry + Distanza) THEN
    BUY 1 CONTRACT AT Entry LIMIT
    ELSE
    //BUY 1 CONTRACT AT MARKET
    ENDIF
    ENDIF
    //
    graphonprice entry
    graphonprice entry - sl coloured(255,0,0,255)
    graphonprice entry + tp coloured(0,0,255,255)
    graph        setup

    Per abbassare il drawdown ho modificato il calcolo dello Stop Loss e del Take Profit (SL e TP).

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

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

trading system con pattern candlestik


ProOrder: Trading Automatico & Backtesting

New Reply
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by robertogozzirobertogozzi
4 years, 3 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 06/03/2022
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...