I am nearly done with this one but can't quite get it to acknowledge a line without it showing up in red. Very new to think script. Any help is greatly appreciated.
Code:
input price = close;
input desiredentryvma = 9;
input desiredexitvma = 9;
def entryvma = VMA (legnth = desiredentryvma);
def exitvma = VMA (legnth = desiredexitvma);
def buylong = price > entryvma;
def selllong = price < exitvma;
AddOrder(OrderType.BUY_TO_OPEN, buylong, tickcolor = Color.GREEN, arrowcolor = Color.GREEN, name = "open");
AddOrder(OrderType.BUY_TO_CLOSE, selllong, tickcolor = Color.RED, arrowcolor = Color.RED, name = "CLOSE");