Label showing value of EMA at open


Category:
0
0

Hello sir,

Im looking for a chart label that displays the price of EMA 100 on 5minute chart at market open

Thank you sir.

Marked as spam
Posted by (Questions: 1, Answers: 0)
Asked on October 20, 2022 11:38 am
42 views
0
Private answer

The simplest solution is to require that the chart does not include extended hours session. If you try to include extended hours on the chart this solution will not work.

input maLengthOne = 100;
input maTypeOne = AverageType.EXPONENTIAL;
input maPriceOne = close;
plot maOne = MovingAverage(maTypeOne, maPriceOne, maLengthOne);
def newDay = GetDay() <> GetDay()[1];
rec emaAtOpen = if newDay then maOne else emaAtOpen[1];
AddLabel(yes, Concat("Value @ Open: ", Round(emaAtOpen, 2)), Color.WHITE);

Marked as spam
Posted by (Questions: 37, Answers: 4087)
Answered on October 20, 2022 4:56 pm