Please assist with thinkscript code pasted below.
The code below is written in a trading language called thinkscript, on a platform called thinkorswim downloaded from thinkorswim.com. The platform requires a free demo account and login to test the code functionality.
I am having difficulty with the code below being represented like I am envisioning on the chart as shown in this video [login to view URL], but I also need someone I can contact via phone and email on an as-needed basis regarding programming in thinkscript. The learning center here [login to view URL] is fantastic but doesn't quite tell me how to resolve the issues I am having with the code below.
Assistance is greatly appreciated. Please contact me as soon as possible.
# def statements - Defines conditions
# addOrder statements - Match each order type with it's defined condition.
def LE = AwesomeOscillator()."AO" > AwesomeOscillator()."AO"[1] and ADXCrossover("crossing type" = "above")is true;
def LX = AwesomeOscillator()."AO" < AwesomeOscillator()."AO"[1] or ADXCrossover("crossing type" = "below")is true;
def SE = AwesomeOscillator()."AO" < AwesomeOscillator()."AO"[1] and ADXCrossover("crossing type" = "below")is true;
def SX = AwesomeOscillator()."AO" > AwesomeOscillator()."AO"[1] or ADXCrossover("crossing type" = "above")is true;
addOrder(OrderType.BUY_TO_OPEN, LE);
addOrder(OrderType.SELL_TO_CLOSE, LX);
addOrder(OrderType.SELL_TO_OPEN, SE);
addOrder(OrderType.SELL_TO_CLOSE, SX);