@lguides
When creating plots in thinkscript you not only have to define the logic of what you want plotted but you must also state WHERE on the candle or line that you want it plotted. (IE the low, high, open, close, of the candle).
So the syntax is
if mycondition is true then low else double.Nan (print nothing)
Ruby:
input ml = 12;
def Mom = close - close[ml];
plot mm1 = if Mom > 0 then low else double.NaN;
mm1.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_up);
mm1.SetDefaultColor(Color.GREEN);
mm1.SetLineWeight(4);
plot mm2 = if Mom < 0 then high else double.NaN;;
mm2.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
mm2.SetDefaultColor(Color.RED);
mm2.SetLineWeight(4);
This script is now correct syntax-wise but is probably not what you want.
View attachment 742
Just for future reference, it is not unusual for us to fix the 1st mistake we see and call it fixed. Especially if we are not in front of a computer to test. While I can provide guidance on simple fixes, I am not half as smart as
@Joshua.