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
int start()
{
int Live_accnt = 16540; //<-- type the user LIVE ACCOUNT here before compiling
int Demo_accnt = 1180321; //<-- type the user DEMO ACCOUNT here befor compiling
int accnt = AccountNumber();
if (accnt != Live_accnt) // || Does not work!!
if (accnt != Demo_accnt)
{
Alert ("Wrong owner account (" + DoubleToStr(accnt,0) + ")");
etc. etc.
How do I get the program to do a logic statement for either or? In this case above the security needs to accept either the Live_accnt or the Demo_accnt. How do I accomplish this. The " || " does not work as an or.
I really need your expertise on this! Thanks in advance.
int start()
{
int Live_accnt = 16540; //<-- type the user LIVE ACCOUNT here before compiling
int Demo_accnt = 1180321; //<-- type the user DEMO ACCOUNT here befor compiling
int accnt = AccountNumber();
if (accnt != Live_accnt) // || Does not work!!
if (accnt != Demo_accnt)
{
Alert ("Wrong owner account (" + DoubleToStr(accnt,0) + ")");
etc. etc.
How do I get the program to do a logic statement for either or? In this case above the security needs to accept either the Live_accnt or the Demo_accnt. How do I accomplish this. The " || " does not work as an or.
I really need your expertise on this! Thanks in advance.
If I understand u right, u want ea not to run if the account number is difrent than u specified in demo number or real number, so if account number will be difrent than 16540 or 1180321 the ea shouldnt work right? So the logic statement will look like this:
if (accnt != Live_accnt && accnt != Demo_accnt )
{
Alert("Wrong Account");
return(0);
}
or
if (accnt == Live_accnt || accnt == Demo_accnt )
{
//do my things
}
else
{
Alert("Wrong Account");
return(0);
}
Thank you many times over!!!!!! Really made my day. Someday, one day, hopefully before the rapture or I get as old as Moses, I may be able to be proficient at coding this language.
Reverend Dave
<<<I might not be posting in the right place, but I need help and hoping someone will help me. In metatrader 4 there is an option of adding a trand line with the angle, you can put it at any angle you wish. Well what I need is an indicator or something where the angle for that line is locked. So all I have to do is apply it to a specific point on the graph without trying to create that angle. If that can be done please let me know and I will tell you what specifications I need.
Thank you many times over!!!!!! Really made my day. Someday, one day, hopefully before the rapture or I get as old as Moses, I may be able to be proficient at coding this language.
Reverend Dave
<<<I'm glad I could help u. Coding in mql isn't so hard, just keep focus and be patient
Regards
Kale
Hi Codes guru
Is it possible to make an indicator with the following
Strong Downtrend
MINUS 10 POINTS= Last hour close below 5 hour moving average
MINUS 15 POINTS= NEW 3 DAY LOW
MINUS 20 POINTS= LAST PRICE BELOW 20DAY MOVING AVERAGE
MINUS 25 POINTS= NEW 3 WEEK LOW IN RECENT WEEK
MINUS 30 POINTS= NEW 3 MONTH LOW IN CURRENT MONTH
IF TOTAL SCORE=MINUS 100, THEN STRONG DOWNTREND CONFIRMED
PRICE CANT GO UP. IT CAN ONLY GO LOWER===========================
THE OPPOSITE=STRONG UPTREND
Strong UPtrend
PLUS 10 POINTS= Last hour close ABOVE 5 hour moving average
PLUS 15 POINTS= NEW 3 DAY HIGH
PLUS 20 POINTS= LAST PRICE ABOVE 20DAY MOVING AVERAGE
PLUS 25 POINTS= NEW 3 WEEK HIGH IN RECENT WEEK
PLUS 30 POINTS= NEW 3 MONTH HIGH IN CURRENT MONTH
IF TOTAL SCORE=PLUS 100, THEN STRONG UPTREND CONFIRMED
PRICE CANT GO DOWN. IT CAN ONLY GO HIGHER
Thnx
kev
backtesting ea with two time frames
Does the strategy tester in MT4 work with an EA that uses two time frames? For example, a H1 EA that uses an indicator in a M5 time frame.
Another problem question!
h1[k] = Highest(NULL,5,MODE_HIGH,n - Nbar,n-(n-Nbar)+1);
l1[k] = Lowest(NULL,5,MODE_LOW,n - Nbar,n-(n-Nbar)+1);
h1[k] = Highest(NULL,15,MODE_HIGH,n - Nbar,n-(n-Nbar)+1);
l1[k] = Lowest(NULL,15,MODE_LOW,n - Nbar,n-(n-Nbar)+1);
I want two distinct versions of my indicator, one 5 min, and one 15 minute.
I have a comment identifying whether it is the 5 min version or the 15 minute version that comments at the top left hand corner. The problem I have is that the 15 minute comment will not disappear when I switch the time frame back to 5 minute.
The 5 minute comment should overwrite the 15 minute comment since it locates in the same place, but does not??
Is there a cure or is this a glitch in the graphics package????
Dave
P.S. I do not want to place a ' 0 ' in place of the 5 or 15 in the statement!!!!!!
h1[k] = Highest(NULL,5,MODE_HIGH,n - Nbar,n-(n-Nbar)+1);
l1[k] = Lowest(NULL,5,MODE_LOW,n - Nbar,n-(n-Nbar)+1);
h1[k] = Highest(NULL,15,MODE_HIGH,n - Nbar,n-(n-Nbar)+1);
l1[k] = Lowest(NULL,15,MODE_LOW,n - Nbar,n-(n-Nbar)+1);
I want two distinct versions of my indicator, one 5 min, and one 15 minute.
I have a comment identifying whether it is the 5 min version or the 15 minute version that comments at the top left hand corner. The problem I have is that the 15 minute comment will not disappear when I switch the time frame back to 5 minute.
The 5 minute comment should overwrite the 15 minute comment since it locates in the same place, but does not??
Is there a cure or is this a glitch in the graphics package????
Dave
P.S. I do not want to place a ' 0 ' in place of the 5 or 15 in the statement!!!!!!Where did u put Comment function? Post all file here.
Let's try a new approach. Same statement, Null, 15, etc. etc.
Comment displays message. When I switch to another time frame which activates other indicator, Null, 5, how do I eliminate the comment made by the 15 minute indicator???? Other languages, all you have to is use a comment " " field on the 5 minute indicator and it will wipe out the displayed message left by the 15 minute indicator. Why does this not work on this goofy language??