pittsburgh, pa
Experience: Intermediate
Platform: sierra, ToS
Trading: /es
Posts: 4 since Nov 2019
Thanks Given: 2
Thanks Received: 1
|
def low = chart < chart[1] and chart < chart[-1];
def high = chart > chart[1] and chart > chart[-1];
def lowcount = if low[1] then 1 else lowcount[1] + 1;
def highcount = if high[1] then 1 else highcount[1] + 1;
AddOrder(OrderType.BUY_TO_OPEN, low and lowcount <= 5);
AddOrder(OrderType.SELL_TO_OPEN, high and highcount <= 5);
What does this script do exactly? Does this trigger a BUY when there is a low in the variable "chart" and a SELL if there is a high within 5 bars? Also, are the "low" and "high" variables of the Boolean type?
Appreciate the help of all more knowledgeable than me ie practically all of you.
|