Ordini aperti/chiusi istantaneamente non previsti dal codice

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #39557 quote
    RAFFAELERAFFAELE
    Participant
    New

    Buongiorno e grazie per le informazioni che mi avete dato di recente . Mi hanno aiutato a superare un problema .

    Adesso pero’ ne è sorto un’ altro a seguito di questo codice che lavora a 10 secondi :

    ……..

     

    IF Time >= OraInizio  and time<=oralimite  and CLOSE<(p+30) then
    
    buy TagliaPosizione CONTRACT AT (p+30) STOP
    endif
    SET TARGET PROFIT 10
    SET STOP LOSS 60

    Mi capita sovente che l’ ordine viene aperto al valore p+30 ma poi chiuso inspiegabilmente alla candela successiva con la perdita (su 1 contratto di mediamente 0.5   – 1 €) ; alla candela ancora dopo si riapre l’ ordine e poi funzione regolarmente chiudendo allo stop o al profit .

    Non riesco a capire come mai ; qualcuno puo’ aiutarmi ?

    Grazie

    #39644 quote
    NicolasNicolas
    Keymaster
    Legend

    > Per chiarezza dei messaggi sul Forum di Prorealcode, separate le parti del vostro codice usando il pulsante per l’inserimento del testo del codice. <<

    In attesa di STOP Ordini solo l’ultima 1 bar. È per questo che vedi che scompare e riappare nuovamente al prossimo candeliere.
    Non so quale strumento si sta commerciando con questo codice, ma credo di aver commesso un errore con la dimensione del takeprofit e del stoplos. Dovresti provare questo codice invece (dove i valori sono in punti, non in formato decimale).

    IF Time >= OraInizio  and time<=oralimite  and CLOSE<(p+30*pointsize) then
     buy TagliaPosizione CONTRACT AT (p+30*pointsize) STOP
    endif
    
    SET TARGET pPROFIT 10
    SET STOP pLOSS 60
Viewing 2 posts - 1 through 2 (of 2 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

Ordini aperti/chiusi istantaneamente non previsti dal codice


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
RAFFAELE @raffaele Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by NicolasNicolas
9 years, 3 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 07/01/2017
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...