Wait 20 bars before taking next signal

Forums ProRealTime English forum ProOrder support Wait 20 bars before taking next signal

  • This topic has 2 replies, 2 voices, and was last updated 6 years ago by avatarBC.
Viewing 3 posts - 1 through 3 (of 3 total)
  • #104007
    BC

    Hi PRT Master

    I stuck on below last command, anyone can help?

    ”if last trade was a loser, wait 20 bars before taking the next signal.”

    For first part, use POSITIONPERF(n) command can solve, but how about the last?

    #104008

    Use a flag, say TradeOn, to enter a trade and set it to 1 by default.

    When you suffer a loss clear TradeOn and save your bar ID, then when 20 bars have elapsed reset it to 1 to reenable trading.

     

    1 user thanked author for this post.
    avatar BC
    #104049
    BC

    It work! Thanks Robertogozzi.

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

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