Hey guys
I am trying get this to buy and/or sell when price crosses above the close of a specific date and sell when price closes below that same specific date.. this is what i ahve so far.
def priceAtDate = if GetYYYYMMDD() == 20210901 then close else Double.NaN;
plot scan = priceAtDate;
scan.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
input price = close;
AddOrder(OrderType.BUY_AUTO, price >(PaintingStrategy.ARROW_UP), tickcolor = GetColor(6), arrowcolor = GetColor(6));
AddOrder(OrderType.SELL_AUTO, price < (PaintingStrategy.ARROW_UP), tickcolor = GetColor(5), arrowcolor = GetColor(5));
I am trying get this to buy and/or sell when price crosses above the close of a specific date and sell when price closes below that same specific date.. this is what i ahve so far.
def priceAtDate = if GetYYYYMMDD() == 20210901 then close else Double.NaN;
plot scan = priceAtDate;
scan.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
input price = close;
AddOrder(OrderType.BUY_AUTO, price >(PaintingStrategy.ARROW_UP), tickcolor = GetColor(6), arrowcolor = GetColor(6));
AddOrder(OrderType.SELL_AUTO, price < (PaintingStrategy.ARROW_UP), tickcolor = GetColor(5), arrowcolor = GetColor(5));