stop dinamici valori diversi

Viewing 2 posts - 16 through 17 (of 17 total)
  • Author
    Posts
  • #182747 quote
    leo di menno
    Participant
    Average

    sono impantanato su di una cosa stupida, vorrei dire alla macchina di associare allo stop loss il valore di ingresso + x*pipsize, ho provato questo

    if shortonmarket then
    stoploss =open[1] + AverageTrueRange[14](close)
    newsl = stoploss

    però cosi il valore mi cambia man mano che le candele si susseguono

    #182769 quote
    robertogozzi
    Moderator
    Master

    Certo, non devi metterlo li, ma all’interno dell’IF che fa l’entrata:

    if MieCondizioniShort and Not ShortOnMarket then
       stoploss =open[1] + AverageTrueRange[14](close)
       newsl = stoploss
       Sellshort 1 Contract at Market
    Endif

    in questo modo esegue quell’istruzione solo la prima volta.

Viewing 2 posts - 16 through 17 (of 17 total)
  • You must be logged in to reply to this topic.

stop dinamici valori diversi


ProOrder: Trading Automatico & Backtesting

New Reply
Author
Summary

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

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 08/23/2021
Status: Active
Attachments: 4 files
Logo Logo
Loading...