Entry and exit based on bollinger bands touches

Forums ProRealTime English forum ProOrder support Entry and exit based on bollinger bands touches

Viewing 8 posts - 1 through 8 (of 8 total)
  • #208253

    Hi, don’t know if this is the right forum, but i’m having trouble finding answers on google.

    I need help with a simple thing in the trading system. How do I write the code so that a position is opened when the price touches the upper bollinger band and closes the position when the price touches the lower bollinger band?

    I have only managed to get the position to open if the candle CLOSES outside the upper bollinger band.

    Grateful for help!

    #208255

    Hi,

    please take into account forum guidance in yellow box at bottom of this page for subsequent posts, here in particular the “meaningful title” rule to prevent topics being all called “help with…”), thanks. I edit your title “help with code” to replace it by “entry and exit based on bollinger bands touches”.

    #208263

    We can use pending limit orders placed on bollingerbands to trigger entries at the right price.

     

     

    1 user thanked author for this post.
    #208266

    Thank you for the fast response, im new to this, so how exactly would i intergrate this into my code today?

    This is my code:

     

    #208311

    So I replace your original entries with the ones I coded above:

    not tested

    1 user thanked author for this post.
    #208363

    Thank you so much for the help!

    #208439

    I have tried to play around a bit but don’t seam to get it to work, how do i write the code if i alos want the exit of the trade to trigger when price hits the bollinger band? I assume the principal would be the same with pending limit orders?

    #208508

    Exit on bollinger bands are already defined in your code, but you are using the Close, you can use a precise price touch as define in the below modification:

     

    1 user thanked author for this post.
Viewing 8 posts - 1 through 8 (of 8 total)

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