
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
I'm doing a project for the community to make a perpetual calendar holiday indicator to advise markets are closing early today and
need to convert an Excel formula that should calculate the day of Easter (Sunday) then -2days for today Friday a trading day.
Would just like the formula to work in Metatrader if possible?
// excel formula for Easter: =ROUND(("1/4/"&A1)/7+MOD(19*MOD(A1,19)-7,30)*14%,)*7-6
// or: =FLOOR(DATE(YEAR,5,DAY(MINUTE(YEAR/38)/2+56)),7)-34
// where A1=the year
// source https://www.mrexcel.com/board/threads/how-to-calculate-the-date-of-easter.389703/
So far..
int A1=Year(); // may be a double?
int Easter = MathRound(("1/4/"&A1)/7+MathMod(19*MathMod(A1,19)-7,30)*14%,)*7-6;
Not sure if the & tries to mask a quarter of the year or what at this point 🤔
Credit will be given to person who solves.
Happy Easter!