aiuto stop loss

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #4778 quote
    pingius
    Participant
    Junior

    vorrei costruire un trading system basato su pattern di prezzo tipo:

    setup= (open<close) and (open[1]>close[1]) and (high<high[1]) and (low>low[1])

    entrata= high + POINTSIZE

    IF NOT LongOnMarket AND setup THEN

    BUY  1  CONTRACTS AT entrata stop

    ENDIF

    set target pprofit 10

    fino a qui tutto bene…..il problema è che non riesco a mette lo stop sotto il livello low[1] del setup.

    #4856 quote
    Nicolas
    Keymaster
    Legend

    Ciao, qui di seguito come posizionare lo stop loss a “Low” [1]:

    SET STOP LOSS Close-Low[1]

    Ditemi se questo funziona? Grazie!

    #4863 quote
    pingius
    Participant
    Junior

    purtroppo no

    se ad esempio passano 10 candele dopo l’acquisto, lui mi considera l’ultimo chiusura e l’ultimo low[1].

    io vorrei metterlo al low[1] del pattern……e che restasse quello per sempre

    #4865 quote
    pingius
    Participant
    Junior

    ho provato con il barindex…….cioè

    numerocandele= barindex-(tradeindex+2) // conto il numero di candele che sono passate dall’acquisto + 2 candele per tornare indietro di due dall’acquisto

    stoploss=low[numerocandele]

    ma non funziona…….non so prorpio come fare

    #4879 quote
    Nicolas
    Keymaster
    Legend

    Ciao, scusa se non capisco la tua richiesta.
    E ‘questo codice corrisponde a ciò che si vuole fare?

    setup= (open<close) and (open[1]>close[1]) and (high<high[1]) and (low>low[1])
    entrata= high + POINTSIZE
    
    IF NOT LongOnMarket AND setup THEN
     BUY  1  CONTRACTS AT entrata stop
     set target pprofit 10
     SET STOP LOSS Close-Low[1]
    ENDIF
    #4899 quote
    pingius
    Participant
    Junior

    ti ringrazio Nicolas……pare che funzioni……..lo testerò per bene

    #4918 quote
    pingius
    Participant
    Junior

     

    nel ProBacktest  funziona benissimo……..il problema è nel trading automatico.

    Mi rifiuta di fare il trading automatico e mi  esce una scritta:

     

    DEFPARAM CumulateOrders = False
    defparam FLATBEFORE=090000
    defparam flatafter=170000

    bwr=(open<close) and (open[1]>close[1]) and (high<high[1]) and (low>low[1])

    entrata= high +   POINTSIZE

    IF NOT LongOnMarket AND bwr THEN
    BUY 1 CONTRACTS AT entrata stop

    ENDIF

    If LongOnMarket AND barindex-tradeindex>=4  THEN
    SELL AT MARKET
    ENDIF
    set stop loss (high-low[1])+3*pointsize
    set target profit 8

    rifiuto-trading-automatico.png rifiuto-trading-automatico.png
Viewing 7 posts - 1 through 7 (of 7 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

aiuto stop loss


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
pingius @pingius Participant
Summary

This topic contains 6 replies,
has 2 voices, and was last updated by pingius
10 years, 5 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 04/01/2016
Status: Active
Attachments: No files
Logo Logo
Loading...