Mark candle when first trading day of month is Friday or Monday


Category:
0
0

Hi Pete,

Any chance to write this simple study…

Mark with an arrow up the first trading day of the Month when is a Monday or Friday

Thank you

RESOLVED
Marked as spam
Posted by (Questions: 12, Answers: 1)
Asked on August 29, 2020 1:32 pm
84 views
0
Private answer

I updated the title of your question to include the full set of specifications. We already have a post in the Chart Strategies topic for first trading day of the month:

https://www.hahn-tech.com/ans/strategy-dollar-cost-average/

So we can use that code for this solution and add another condition for day of the week.

def firstDayOfMonth = GetMonth() <> GetMonth()[1];
def dayOfWeek = GetDayofWeek(GetYYYYMMDD());
plot signal = firstDayOfMonth and (dayOfWeek == 1 or dayOfWeek == 5);
signal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

Marked as spam
Posted by (Questions: 37, Answers: 4090)
Answered on August 29, 2020 3:03 pm