Buying at the second Boll band violation

Forums ProRealTime English forum ProOrder support Buying at the second Boll band violation

  • This topic has 1 reply, 1 voice, and was last updated 1 year ago by avatarGaby.
Viewing 2 posts - 1 through 2 (of 2 total)
  • #209524

    Hello,

    I would like to code a buy entry when the close is lower the low Bollinger band for two consecutive periods. I have coded this, but it not working; I appreciate any help, Thanks. Gaby

     

    // Definition of code parameters
    DEFPARAM CumulateOrders = False
    Once COUNT = 0

    // variables ===================================

    LowBoll = Average[20](close)- (3*std[20](close))

    // conditions ====================================

    c1 = close < LowBoll

    IF NOT onmarket AND c1 AND COUNT = 0 THEN
    COUNT = 1

    ELSIF NOT onmarket AND c1 AND COUNT =1 THEN
    BUY 1 PERPOINT AT MARKET
    COUNT = 0

    ENDIF

     

    #209527

    This version of the code seems to work, you can ignore my previous request:

     

     

    1 user 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