Hi, I need some assistance with this indicator script and the scanner that i am trying to create. To set the context, i am trading on Daily Timeframe and i will use this script to find trade signals after market close to prepare the next day trade. So, any Signals painted during market hours are not tradable yet.
I have created a scanner with the script and it is able to scan out stocks that met the criteria "is True within 2 Bars" and displayed in the dynamic watchlist. As such, it will scan SIGNALs for Current Day and Yesterday to be appeared in the watchlist
The questions i have are
1. Is there a way that the dynamic watchlist DO NOT update the CURRENT day signals and only UPDATE it after market closed?
2. Or Is there a way that the CURRENT day SIGNALS can only be painted after Market has closed.
Thank you
The last signal arrow was painted when the market is still open.
I have created a scanner with the script and it is able to scan out stocks that met the criteria "is True within 2 Bars" and displayed in the dynamic watchlist. As such, it will scan SIGNALs for Current Day and Yesterday to be appeared in the watchlist
The questions i have are
1. Is there a way that the dynamic watchlist DO NOT update the CURRENT day signals and only UPDATE it after market closed?
2. Or Is there a way that the CURRENT day SIGNALS can only be painted after Market has closed.
Thank you
Code:
##############################################################################
# Plot EMA Trends
plot Trend1 = MovAvgExponential(close, 20);
Trend1.AssignValueColor(if close > Trend1 then Color.GREEN else Color.RED);
plot Trend2 = MovAvgExponential(close, 40);
Trend2.AssignValueColor(if close > Trend2 then Color.GREEN else Color.RED);
def Price2MA = MovAvgExponential(close, 10);
def condition1 = close > Price2MA;
input length = 14;
input over_sold = -100;
input over_bought = 100;
def price = close + low + high;
def linDev = LinDev(price, length);
def CCI = if linDev == 0 then 0 else (price - Average(price, length)) / linDev / 0.015;
def ZeroLine = 0;
def condition2 = CCI crosses above ZeroLine;
plot Signal1 = condition1 and condition2 and Trend1 > Trend2;
Signal1.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
Signal1.SetLineWeight(3);
Signal1.AssignValueColor(Color.MAGENTA);
#End
The last signal arrow was painted when the market is still open.