♥ 0 |
Hi, I would like to keep count of a “buy signal” that I have defined in a study on an intraday chart. So basically increment to 1 if certain conditions are met, then back to 0 is a “sell signal” is triggered or if a new day starts. Ex: rec count = if bullConditionsMet then count[1] + 1 else count[1]; Since I am using a 3 min chart agg period, 20 days interval it counts from the beginning of the displayed chart. I tried using the GetYYYYMMDD() function but since my displayed chart is intraday, the returned value is erroneous (I assume). I Have a hard time approaching this problem First question, How can I go about defining a new day on an intraday chart so that I can use that variable in my script. Second question, How can I reset count to zero if my sell conditions are met, or if the “New day” variable arises? Thank you so much.
Marked as spam
|
Please log in to post questions.