• Happy Independence Day! Take $40 off VIP Membership with code JULY4. Sign up here.

Pass variable coeffN into object


New member
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;


Well-known member
Actually very helpful. I will check that out, thanks! Can you point me to some simple operational code that i could glean?
None that I can think of right off the top of my head... Not many coders have taken advantage of Script{}... If I find a Study that makes use I'll post either the code or a link...

Similar threads