Ultimo trade perdente

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #125773 quote
    Pottar24
    Participant
    New

    Buongiorno e buona pasqua.

    Vi scrivo per chiedervi come posso mettere all’interno del mio if dedicato al buy la condizione seguente:

    Il mio ultimo trade perdente risale almeno a x minuti fa.

    Grazie mille

    #125774 quote
    robertogozzi
    Moderator
    Master

    Non è semplicissimo, in quanto non ci sono funzioni per fare matematica con date e ore.

    Si possono comunque creare.

    Che TF usi?

    Pottar24 thanked this post
    #125782 quote
    Pottar24
    Participant
    New

    Grazie roberto, uso TF a 2 minuti

    #125790 quote
    Pottar24
    Participant
    New

    Signor Gozzi ci tengo a precisare che mi serve la condizione per la quale l’ultimo trade perdente si trova almeno x candele precedenti. Mi serve più una specie di contatore che il tempo.

    #125811 quote
    robertogozzi
    Moderator
    Master

    Bene, la cosa è molto più semplice:

    ONCE Barra = 0
    IF OnMarket THEN
       Barra = 0
    ENDIF
    IF StrategyProfit < StrategyProfit[1] THEN
       Barra = BarIndex
    ENDIF
    NumeroBarre = (BarIndex - Barra) * (Barra <> 0)

    Per verificare la condizione basta che tu metta, dove vuoi:

    IF NumeroBarre > X THEN
     .
     .
    ENDIF
    Pottar24 thanked this post
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

Ultimo trade perdente


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
Pottar24 @pottar24 Participant
Summary

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

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