IF PRECEDENTE OPERAZIONE NEGATIVA THEN… AIUTO

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #189737 quote
    Francesco
    Participant
    Junior

    Buongiorno,

    Vorrei chiedere come si implementa un controllo sulle precedenti operazioni questo per cercare di limitare un po il drawdown.

    Nello specifico vorrei avere un controllo del tipo

    IF ULTIME UNA O DUE OPERAZIONI PRECEDENTI NEGATIVE THEN

    SALTA LA PROSSIMA POSIZIONE

    DOPO CHE E’ STATA SALTATA RIATTIVATI PER APRIRE NUOVE POSIZIONI

    Come è possibile implementare questo controllo ?

    Saluti

    #189855 quote
    robertogozzi
    Moderator
    Master

    Così:

    ONCE Negative = 0
    ONCE Tradare  = 1
    IF StrategyProfit < StrategyProfit[1] THEN
       Negative = Negative + 1
       IF Negative = 2 THEN
          Tradare  = 0
          Negative = 0
       ENDIF
    ELSIF StrategyProfit > StrategyProfit[1] THEN
       Negative = 0
    ENDIF
    IF MieCondizioniLong THEN
       IF Tradare THEN
          BUY 1 Contract at Market
       ELSE
          Tradare = 1
       ENDIF
    ENDIF
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

IF PRECEDENTE OPERAZIONE NEGATIVA THEN… AIUTO


ProOrder: Trading Automatico & Backtesting

New Reply
Author
Summary

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

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 03/10/2022
Status: Active
Attachments: No files
Logo Logo
Loading...