Controllo sulla percentuale giornaliera

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #141080 quote
    danistuta
    Participant
    Senior

    Come posso fare un check sulla percentuale del titolo da quando è partita la giornata di trading (per esempio sui forex dalle 23)?

    Per poi impostare una condizione tipo…compra quando il titolo è sceso dello 0.5%, si può?

    Grazie.

    #141085 quote
    robertogozzi
    Moderator
    Master

    Si, si può, ma quale time frame usi?

    #141088 quote
    danistuta
    Participant
    Senior

    Nel codice ho timeframe  multipli, poi quello su cui lavora è a 1 secondo

    #141106 quote
    robertogozzi
    Moderator
    Master

    Ok, m’interessava capire se usavi il Giornaliero o meno.

    Prima di tutto salvi il prezzo di apertura alla prima barra del giorno con IntraDayBarIndex, poi, all’ora che vuoi fai la verifica:

    If IntraDayBarIndex = 0 Then
       Prezzo = Open
    Endif
    If time = 230000 Then
     .
     If close >= Prezzo * 1.01 Then //verifica se ha raggiunto almeno +1%
       .
       .
      Endif
     .
    Endif
    #141279 quote
    danistuta
    Participant
    Senior

    Grazie!

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

Controllo sulla percentuale giornaliera


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
danistuta @danistuta Participant
Summary

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

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