Can i create like a subroutine or something that I could loop a number of times and pass variable coeffN into with several different values? Newbe me, I would love sample code.
plot coeffN = if HighestAll(ONhighBar) == MaxBar and OverNightLow > 0 and OverNightHigh > 0
then ((OverNightHigh - OverNightLow) * coeff_N) + OverNightLow
else if HighestAll(ONlowBar) == MaxBar and OverNightLow > 0 and OverNightHigh > 0
then OverNightHigh - ((OverNightHigh - OverNightLow) * coeff_7)
else double.nan;
plot coeffN = if HighestAll(ONhighBar) == MaxBar and OverNightLow > 0 and OverNightHigh > 0
then ((OverNightHigh - OverNightLow) * coeff_N) + OverNightLow
else if HighestAll(ONlowBar) == MaxBar and OverNightLow > 0 and OverNightHigh > 0
then OverNightHigh - ((OverNightHigh - OverNightLow) * coeff_7)
else double.nan;