Avoid Re enter before Reset

Forums ProRealTime English forum ProBuilder support Avoid Re enter before Reset

Viewing 12 posts - 1 through 12 (of 12 total)
  • #200906

    Hi everyone

    i’m trying to finish this indicator, i got a lot of help from different members here to realise it.

    it’ based on Steven primo strategy. Bollinger Bands std 0.382

    i just want to avoid re entering a new a trade until the setup is no reset.

    Can you help to find the line that i have to change?

    Thank you

     

    here is a figure and the code

     

    and here is the original code from Tradingview

     

     

    #200910
    JS

    Hi @Kole96

    I tried to test the code but the indicator parameters are not included.

    If you want to share this information, please create an itf -file including the parameters

    #200911

    Thank you for your answer, but there is an itf file

     

    #200912
    JS

    Okay, sorry to my eyes… 😉

    #200913

    no problem

     

    #200914
    JS

    I was thinking, without immediately going very deep into your code…

    You probably know which variable(s) are causing the reset of your setup, when you check these variable(s) over the last 5 bars to make sure they are at the correct values, you can use that as an extra condition.

    If Signal = 0 and Signal[1] = 0 and Signal[2] = 0 and Signal[3] = 0 and Signal[4] = 0 then

    CheckReset = 1

    Else

    CheckReset = 0

    EndIf

    #200916

    I need to reset the setup to get a new trade, not like what is hapenning.

    like i wrote in the picture, we need to have only one trade after the Setup is built, we can have an another trade in the same direction only if we close another time under the Upper Bollinger, After we look again for the Setup.

    You can see from line 10-25 , i have the condition to have 5 closes above the BB Up, after if we close under the BB Up, the signal is reset (lastsig=0)

    i need the same thing for the order entry.

    #200918
    JS

    When it comes to order entry, can’t you check if you’ve been the last 5 bars “OnMarket”?

    #200922

    For example for the 5 closes, once we have 5 closes , we will have the number 5 writen under the 5th candles.

    we will have again the number 5 writen only if we close again under the Bollinger Up and then we will have a new set of 5 closes.

    Now for the trade is the same, we will have one trade if we have all the conditions, we can not enter a new trade if we didn’t close again under the Bollinger Up et have a new Setup formed.

    Here in this code, you see that if we get out from a trade after take profit, we enter again if we cross above a new pivothigh.

    That’s what I want to avoid, we can enter a new trade only if the Setup is Reset.

    Thank you

    #200930

    I think in “CANBUY” we have to add a condition that we have a new set of 5 Closes, it means that in the lines 151 when we exit a trade we need to put maybe that the signal=1 and “CANBUY” can be occur only if signal=0.

    That means that we already get one trade when all the conditions were met and now we wait for a new Setup to enter a new trade.

     

    #200935
    JS

    I tried to tell you that 🙂 , check if a trade has been executed in the last five bars (OnMarket).

    #200937

    It can not be exécuted in the first 5 bars, it has to get 5 bars and looking if we formed a pivot High in those 5 bars, if not, we wait for pivot High to form and we enter once we cross above this pivot high.

     

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

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