Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.
From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.
Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
Elite Section
Get access to private discussions, specialized support, indicators and trading systems reported every week.
Advanced Elite Section
For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
i'm working to program a counter that will count when the moon is full to automate when good friday occurs, and as i was flowing through my river of thought, i encountered a dam. the method i'm taking seems simple enough to me, i've just never worked with code this way before.
in order to count the months, it was crucial to reset the days as i went through the months, i found this simple enough when i thought about it for a second for every month with 30 or 31 days. and then i crossed the elusive february.
february has an additional day every leap year, which occurs, usually, every 4 years. there are three rules that govern a leap year specifically though, as i found on google.
1. Every year divisible by 4 is a leap year.
2. a leap year is not divisible by 100
3. a leap year is not divisible by 400
what i want to do is ask the computer to divde the year by 4 to see if it is an integer, and make sure you can't divide it by 100 or 400 and get an integer. here's the function i've made so far. and yes, i know, i have two unused arrays in it so far.
if (Month() == month && Day() == day + cycledays && Year == 2006) { FullMoon = True; } if ((Month() == 1 || Month() == 3 || Month() == 5 || Month() == 7 || Month() == 8 || Month() == 10 || Month() == 12) && day + cycledays > 31 { month++; day = day + cycledays - 31; } if ((Month() == 4 || Month() == 6 || Month() == 9 || Month() == 11) && day + cycledays > 30 { month++; day = day + cycledays - 30; } if ((Month() == 2 && Year() /*???*/) && day + cycledays > 28 { month++; day = day + cycledays - 28; }
return(0); } }
__________________
"One's ability to accomplish his or her goals is limited only by the ingenuity of how one uses what he or she already knows."- Eaglehawk
REMEMBER, "Genius is nothing but a greater aptitude for patience." –Benjamin Franklin
____________________________________
Have a simple ea you just can't figure out how to code??? Odds are you can make it here. Just remember to push complete when you're done, NOT SAVE!!! http://sufx.core.t3-ism.net/ExpertAdvisorBuilder
Thanks for that a ton, answers my question with division, but just out of simple curiousity, why do you campare a 4'th year to 0?
__________________
"One's ability to accomplish his or her goals is limited only by the ingenuity of how one uses what he or she already knows."- Eaglehawk
REMEMBER, "Genius is nothing but a greater aptitude for patience." –Benjamin Franklin
____________________________________
Have a simple ea you just can't figure out how to code??? Odds are you can make it here. Just remember to push complete when you're done, NOT SAVE!!! http://sufx.core.t3-ism.net/ExpertAdvisorBuilder
Thanks for that a ton, answers my question with division, but just out of simple curiousity, why do you campare a 4'th year to 0?
Because function MathMod is:
double MathMod( double value, double value2)
The function returns the remainder of division of two numbers.
Parameters:
value - Dividend value.
value2 - Divisor value.
Thanks for that a ton, answers my question with division, but just out of simple curiousity, why do you campare a 4'th year to 0?
Because function MathMod is:
double MathMod( double value, double value2)
The function returns the remainder of division of two numbers.
Parameters:
value - Dividend value.
value2 - Divisor value.
If the remainder of division of two numbers is equal 0 the first are multiple to the second.
__________________
"One's ability to accomplish his or her goals is limited only by the ingenuity of how one uses what he or she already knows."- Eaglehawk
REMEMBER, "Genius is nothing but a greater aptitude for patience." –Benjamin Franklin
____________________________________
Have a simple ea you just can't figure out how to code??? Odds are you can make it here. Just remember to push complete when you're done, NOT SAVE!!! http://sufx.core.t3-ism.net/ExpertAdvisorBuilder
Your link also says:
This means that year 1800, 1900, 2100, 2200, 2300 and 2500 are NOT leap years, while year 2000 and 2400 are leap years.
right, i overlooked that, i'm not exactly an expert on leap years.
well, i may be now, lol.
thanks for saving my skin, although it may be another 393.15 years, (guessing there).
__________________
"One's ability to accomplish his or her goals is limited only by the ingenuity of how one uses what he or she already knows."- Eaglehawk
REMEMBER, "Genius is nothing but a greater aptitude for patience." –Benjamin Franklin
____________________________________
Have a simple ea you just can't figure out how to code??? Odds are you can make it here. Just remember to push complete when you're done, NOT SAVE!!! http://sufx.core.t3-ism.net/ExpertAdvisorBuilder