I´m new in programming on Pine Scritp and I´m doing a strategy for opening long and sell positions. I have defined my conditions to enter to the market, but when i call strategy funtion, it executes on the next bar instead the current one, so, the result is not always good, because the idea is to enter the market as soon as the condition meets. enter image description here
So, this is the normal behavior of Pine Script language or there is a way to implement the strategy in the current bar no matter this bar hasn´t finished?
Thanks in advance, Jorge.