Bollinger Strategy

Forums ProRealTime English forum ProOrder support Bollinger Strategy

Tagged: 

Viewing 10 posts - 1 through 10 (of 10 total)
  • #3446
    KM

    Hi, can somebody help me with my strategy. I need some modification to optimize it. The change that I need is to make it open a position only if it crosses the middle bollinger line before hand. Example: If I have an open long position and it hits target profit then it only opens a new long position if it crosses the middle bollinger line again, if the price still above the middle bollinger then it should stay inactive.

    Sorry if my English is bad.

     

     

    #3451

    Hello,  in your conditions variables ‘condition1’ and ‘condition4’ , you should test a crossover with the  EMA instead of only testing if close is above or under it. I’ll post codes if you don’t find how to get it.

    #3454

    Here is the short tricks to made it works like you want it :

    For Long position :

    For Short position :

     

    bollinger strategy

    #3461
    KM

    Thanks for the reply, but that isn’t what I’m looking for. If I make those changes, then it will trigger an Entry only if it crosses the middle bollinger line and the second conditions kicks in. I need it to cross beforehand. So it will be like this:

     

    Conditions:

    1. The price is over middle bollinger band
    2. Seven days before the high has to be over upper bollinger band

      Enter Long.

    3. If previous position hits target/stop then enter only if the prise moves under the middle bollinger band, then up and condition 1 and 2 kicks in then go long again.
    #3479

    So your ‘c1’ condition need only to be tested once? At ProOrder strategy startup? If so, all you have to do is to “flag” your first trade with a variable and then make 2 different ‘c1’ conditions :

    • first ‘c1’ : tradedbefore=0 so test only if “Close>EMA50”
    • second ‘c1’ : tradedbefore=1 so test a crossover

     

    #3600
    KM

    Thank you Nicolas,  I’ll try it out.

    #3601
    KM

    Sorry Nicolas, I can’t  make it work. Can you please write the code for me?

    #3713

    Here is the final code, I have flagged the first trade with the “tradedbefore” variable set to 1 if a first trade has occurred. If then, the next trade would be taken only if the price crosses above or below the middle bollinger band (a moving average 50 periods in this case).

     

    #3720
    KM

    Thank you very much

    #3766

    You are welcome, hope it will help you.

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

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