You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi master traders! I'm a trying to code a strategy with the following rules: (I'm a beginner in coding)
Buy if the opening candle in the NY session is above MA20.
Sell if the opening candle in the NY session is below MA20.
My problem is that the New York session opening time changes twice a year (in March and November). I want to test it in the strategy tester with five years' worth of historical data. Is there a code that automatically detects the opening time of the New York session?
What code should I substitute for "NEWYORKSESSION"?