STOP LOSS A CHIUSURA CANDELA

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #188359 quote
    emanuele81emanuele81
    Participant
    Senior

    Buonasera,vorrei creare uno stop loss che dovrebbe chiudere l’operazione a chiusura candela sotto i 50 pip dall’apertura dell’operazione,

    come posso fare?

    Grazie

    #188360 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Eccolo:

    MieCondizioniLong = close CROSSES OVER average[20] AND Not OnMarket
    IF MieCondizioniLong THEN
       BUY 1 CONTRACT AT MARKET
       SET TARGET pPROFIT 100
    ENDIF
    IF LongOnMarket AND ((TradePrice - close) >= 50*PipSize) THEN
       SELL AT Market
    ENDIF
    #188421 quote
    emanuele81emanuele81
    Participant
    Senior

    grazie mille Roberto

    #188422 quote
    emanuele81emanuele81
    Participant
    Senior

    Roberto scusa ,ma qualcosa non funziona, mi esce a profitto con la differenza di 50 pip, invece dovrebbe funzionare come stop loss sia su posizioni long che short

    #188424 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    A profitto esce sempre con 100 pip (salvo evantuale slippage). In Stop Loss esce dopo 50 pip, ma siccome è alla chiusura può uscire con 60 o addirittura più di 100.
    Dimmi lo strumento, il time frame, la data e l’ora di una o due operazioni errate, così le controllo (fatte con iul codice di cui sopra, se invece lo hai cambiato anche di pochissimo, devi postarlo).

    #188501 quote
    emanuele81emanuele81
    Participant
    Senior

    timeframe 2 minuti sul dax operazione long iniziata 11/02 alle 9.10 e chiusa 14/02 1.30 per fare la stasa cosa sullo short

    #188517 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Non mi apre nessuna operazione a quell’ora.

    Sei sicuro di avere usato il mio codice?

    #188543 quote
    emanuele81emanuele81
    Participant
    Senior

    Per l’ingresso ho usato il mio codice, per l’uscita ho messo il tuo,  a me serve come uscita al posto dello stop loss sia per operazioni long che short

Viewing 8 posts - 1 through 8 (of 8 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

STOP LOSS A CHIUSURA CANDELA


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
emanuele81 @emanuele81 Participant
Summary

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

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 02/16/2022
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...