Can I set a flag wich stays over a number of bars

Forums ProRealTime English forum ProOrder support Can I set a flag wich stays over a number of bars

Viewing 2 posts - 1 through 2 (of 2 total)
  • #194366

    I am wanting to set a flag that stays for a number of bars .

    With the code above , the flag resets to zero after the bar that triggered it so that I cannot get a limit entry .

    #194379

    Hi pdrh – The base of the solution you ask for is chaning the first line into

    Now its value will stay because only at the first call of your code it is set to 0.

    This is not the complete solution, because somewhere you will need to reset it. This will come down to

    I think this is still not correct, because you’d want to set FLag each new call, which could be done like this :

    Of course you’d need to adjust the remainder somewhat. This is not easy to see because it depends on what you want. For example, letting LFlag be on lways after this crssing happened once, does not seem the correct solution to me. This would rather be to reset LFlag at each call … but … (this is what the last by me shown line does and which makes the first line’s adjustment redundant).

    2 users thanked author for this post.
Viewing 2 posts - 1 through 2 (of 2 total)

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