Confronto valore odierno con il passato

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #99696 quote
    coscar
    Participant
    Senior

    Salve a tutti

    scusate la semplicità della mia richiesta ma non ne vengo a capo e chiedo cortesemente un aiutino da voi più esperti di me.

    Ho una variabile ottenuta con questa semplice formula nel TF Giornaliero :

    Rank= (Close-Close[1])/Close[1]

    ed ho la necessità di sapere il numero totale di volte, su  20 gg,  in cui il valore è stato inferiore al Rank di oggi.

    Ringrazio anticipatamente per l’aiuto.

    Saluti

    Carcos

    #99697 quote
    coscar
    Participant
    Senior

    Ho provato con questa formula ma non so se è corretta, potresti confermarlo? Grazie

    Rank= (Close-Close[1])/Close[1]
    
    Value = 0
    FOR i = 1 TO 20 DO //Do the actions below
    IF (Rank[i] < rank) THEN
    Value = Value + 1
    ELSE
    BREAK
    ENDIF
    NEXT
     
    RETURN Value
    #99699 quote
    robertogozzi
    Moderator
    Master

    Se t’interessano le volte consecutive va bene come hai fatto tu, se, invece, ti basta sapere il numero di volte, anche non consecutive, basta che togli le righe 7 e 8.

    #99702 quote
    coscar
    Participant
    Senior

    Grazie Roberto

    gentile e disponibile come sempre.

    Buona giornata

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

Confronto valore odierno con il passato


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
coscar @coscar Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by coscar
6 years, 8 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 05/30/2019
Status: Active
Attachments: No files
Logo Logo
Loading...