i have been struggling for a lot of hours to set the condition to close my position upon bar close using the calculate on bar methode.
i realized that my exit condition looks at the preivous candle and executes based on that which i dont want, i want to only consider the bar which im currently in / is about to close.
to be pricise i want the conditions to be "if the previous candle open is higher/equal then the low" and " if the previous candle close is lower/equal then high".
For longs i add "if previous close is higher then open" to make sure its green and for shorts "if previous close is lower then open" to make sure its red.
Basically if the candle has double wicks and fits to my direction im trading to.
However i also add a Input of arithmetic value of +0.25 to the low of the previous candle to make sure that the low is greated then 0.25 away from the open for my long postions.
I do this for the high as well adding -0.25 to it to ensure the high is higher then 0.25 form the open for my short postiions.
so the condition was supposed to be as this, if the previous candle has double wicks and (if im in long) the low is further away then 0.25 from the open and its a green candle then exit long.
or if the previous candle has double wicks (if im short) and the high is higher then 0.25 and its a red candle then exit short.
I hope that was understandable.
The issue i have now is that the previous candle before my entry is ALWAYS such a candle which means my exit condition executes right then my entry happens.
I need to somehow ignore the last candle upon entry but start considering it once the current candle closes.
I tried to use the "barssinceentry" condition to state that at least one bar has to pass to be able to execute but it doensnt work it either is set up to sell immidiatly or after 2 bars close (current one and the following).
Any help whatsoever is appreciated and might give me a idea to resolve this.
with that being said thx in advance for anyone trying to help out.
cheers
Comment