I'm attempting to identify two independent crossover events and verify if they both occur within 5 bars of each other. I've started with the following:
what I'm not sure how to do is use countdown to prove the the EventB occurred within 6 bars of EventA.
I'm thinking I can use a countdown function somewhere to give a true/false result if the two did occur within the specified time period
Please help with the missing code / syntax to help me get a qualified result with the timing parameter. I've attached a screenshot to show that these cross sometimes on the same bar and sometimes not.
Thanks in advance!
Perhaps when EventA occurs, record that bar number. When EventB occurs, record that bar number. Then do Math.Abs() and see if within 6 bars.
Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.
Need help? 1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first. 2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses. 3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make. 4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance. 5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers. 6) Help using the forum? Watch this video to learn general tips on using the site.
If you want to support our community, become an Elite Member.
The following user says Thank You to Big Mike for this post: