The attached indicator calculates the y-value of a ray for the current bar from y=mx+b.
For some reason the indicator prints the correct values and draws the dots from the correct bar, but only starts to plot the values a few bars later.
When I try to call up the y plot values from a strategy it says “on bar 11 bject reference not set to an instance of an object.”
I have also tried
if (CurrentBar < 100 )
{
return;
}
in the strategy even though the plot starts earlier but I get the same error.
I would be very grateful if someone could give me a few pointers here.
Thanks!
Comment