JJJJJJ11111
Member
Code:
#RTH_EMA_withExtendedHoursON
#20180104 BLT
#Used code for Pivots based upon RTHs only with extended hours on chart to make a moving average of just RTH's on chart with extended hours on chart
input rthstart = 0930; #Allows the first candle to form befor determining direction
input rthend = 1600;
def active = if SecondsFromTime(rthstart) >= 0 and SecondsTillTime(rthend) > 0
then 1
else 0;
def activeclose = if active
then close else activeclose[1];
plot RTH_ema = expaverage(activeclose,9);
Code:
input price = close;
input length = 9;
input aggregationPeriod = AggregationPeriod.FIVE_MIN;
def MyPrice = ExpAverage(close(period = AggregationPeriod), 1);
plot AvgExp = ExpAverage(myprice, length);
AvgExp.SetDefaultColor(GetColor(1));
I have code for showing 5 minute time frame ema on a 1 min chart. to save space.
also a code found in this forum for ema excluding extended hour.
yet i still want to see extended hour price action.
is there anyone can help to combine them 2 to get a
1.different time frame ema
2. exclude extended hours
3. able to see extended hour price action.
thanks a lot