Ultimo trade perdente

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #125773 quote
    Pottar24Pottar24
    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
    robertogozzirobertogozzi
    Moderator
    Legend

    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
    Pottar24Pottar24
    Participant
    New

    Grazie roberto, uso TF a 2 minuti

    #125790 quote
    Pottar24Pottar24
    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
    robertogozzirobertogozzi
    Moderator
    Legend

    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.
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

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 robertogozzirobertogozzi
6 years, 5 months ago.

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