Reset trade ok if above bollinger middle

Forums ProRealTime English forum ProOrder support Reset trade ok if above bollinger middle

Viewing 9 posts - 1 through 9 (of 9 total)
  • #107590

    Hey! I need help with a code.

    For example.

    Buy if close is below bollinger low and the system stopped me out -20P.

    Now I do not want it to take more trades before it has reached bollinger middle first.

    Then it can start looking for a trade again if close is below bollingerband low.

     

    For example

    OK = 1

    OK = 0

    If c1 and Ok = 1 then

    buy 1contract at market.

     

    #107607

    This will reenable trading after you had previously disabled it.

    Example with a 20-period BB:

     

    #107646

    Thx Roberto.

    Not really what I was looking for.

    Here is a picture so it becomes easier to understand what I mean.

    Don’t know how to get OK to 0 and then reset to 1 again?

    #107655

    So you don’t need to reset OK if above Bollinger middle, but also to clear it after a trade?

    Please post the code you have already written.

    #107720

    So in the first pic close is never above the boll middle after the first trade is done, so that actually dosnt make sense.

     

    You could use something like “highest[10](close) >  highest[10](average[20](close))

     

    someone please correct me if im wrong, but that would mean that for the past 10 bars (or whatever number you would use), price must have been above the moving average 20 (aka bollinger middle) But that would also mean that the “move” so to speak has to happen within XX bars, probably not exactly what you wanted but its at least a step in the right direction..

     

     

    #107782

    If long and stopped then Ok should be 0.  Then the system cannot do any trade  because  OK=0.

    To reset OK to 1 again, the price must be up to bollinger middle.

    Then it is allowed to take a trade again. because OK=1.

     

    The idea is to avoid buying and buying and the price continues to fall.

    I want it to be normal conditions again before the system takes on a new trade.

    Hope it helps

    /Christian

    I think that everything is back to normal when the price went up to bollinger middle after a fall.

    #107786

    Yes. but not just after a certain number. Price must be above bollinge middle

     

    So in the first pic close is never above the boll middle after the first trade is done, so that actually dosnt make sense.

     

    You could use something like “highest[10](close) >  highest[10](average[20](close))

     

    someone please correct me if im wrong, but that would mean that for the past 10 bars (or whatever number you would use), price must have been above the moving average 20 (aka bollinger middle) But that would also mean that the “move” so to speak has to happen within XX bars, probably not exactly what you wanted but its at least a step in the right direction..

    #107787

    If long and stopped OK changes from 1 to 0.

    If Close > Avarage[20,0]Close Then

    OK=1

    #107792

    Yes. but not just after a certain number. Price must be above bollinge middle

    So in the first pic close is never above the boll middle after the first trade is done, so that actually dosnt make sense.

    You could use something like “highest[10](close) > highest[10](average[20](close))

    someone please correct me if im wrong, but that would mean that for the past 10 bars (or whatever number you would use), price must have been above the moving average 20 (aka bollinger middle) But that would also mean that the “move” so to speak has to happen within XX bars, probably not exactly what you wanted but its at least a step in the right direction..

    No, what you want to achieve needs to be written, to just check that:

    to check that ALL last 10 bars CLOSE has always been > highest[10](average[20](close)).

     

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

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