atr 2% indice

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #197968 quote
    romanelli4
    Participant
    Average

    salve,

    grazie a chi vorrà rispondermi

    non è difficile ma non riesco….

    a=AverageTrueRange[14](close)<2% close(come si scrive correttamente?)
    if a and miecondizione then 
    buy at market
    endif

    massimo

    #197973 quote
    robertogozzi
    Moderator
    Master

    La domanda precisa qual’è?

    Il 2% di cosa e cosa vuoi farci con quel dato? Vuoi assegnarlo o usarlo per confronti o ambedue le cose?

    #198162 quote
    romanelli4
    Participant
    Average

    Salve Roberto,

    grazie innanzi tutto.

    vorrei operare solo se il valore di atr sia minore del 2% del valore della close

    esempio

    close 10.000

    atr  150

    quidi essendo<2% di 10.000 posso entrare

    se atr fosse stato 220 non entro perchè>2% dii 10.000

    ma non so codificare quel 2% della close

    Grazie

    #198209 quote
    robertogozzi
    Moderator
    Master

    Eccolo:

    a=(AverageTrueRange[14](close) < (close * 0.02))
    if a and miecondizione then 
       buy at market
    endif
    #198439 quote
    romanelli4
    Participant
    Average

    grazie mille

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

atr 2% indice


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
romanelli4 @romanelli4 Participant
Summary

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

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