Candle Index

  • This topic has 5 replies, 2 voices, and was last updated 7 years ago by avatarMDS.
Viewing 6 posts - 1 through 6 (of 6 total)
  • #17109
    MDS

    Hi All,

    I’m trying to develope a TS.

    The TS enter at market when 3 conditions are accomplished.

    I need to know ho to get the index of a bar, because when a condition occurs, the other maybe not and I’d like to define a window of validity.

    Anyway I want a condition is valid for N candles.

    I tried to get the barindex and store into a variable… but this values follows the evolution of barindex

    How to can I achieve that?

    Best Regards,

    Mauro

    #17113

    Hello MDS

    It would be useful / helpful to you if your current code is shown on here then we can see better what you are trying to do / need?

    Cheers

    GraHal

    #17118
    MDS

    Thanks, if needed I’ll translate in english.  The conditions have to be valid for N candles

     

    #17446
    MDS

    Hi all.

    I resolved in this way.

    I wanted that a condition was valid for n candles.

    So.

    Once index=0

    Condition =0

    If condition then

    Index=index+1

    Endif

     

    Then there is a reset policy.

     

    Regards,

     

    Mauro

     

     

    #17672

    Hey great MDS, you duid it all by yourself! 🙂

    Often happnes to me that … I ask a question, it makes me think about it more and I come up with the solution anyway.

    Good Work
    GraHal

     

    #18232
    MDS

    Thx a lot…

    Aniway it could be achived using barindex. It’s the very same.

    Regards

Viewing 6 posts - 1 through 6 (of 6 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login