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
Morons to the left of me, idiots to the right, stuck in the middle with you! We're in trouble now. ;)
See what you have done now, just about to go to bed an I have to look up who sang the song ah of course, Joe Egan and Gerry Rafferty
https://www.youtube.com/watch?v=DohRa9lsx0Q
I want to make an EA that will take into account indicators from two different time frames before making a trade on one of the time frames. Is this possible?
Yes. Specify the timeframe and bar number on that timeframe in the iCustom() call
Also is it possible to run trades on a window the EA is not attatched to? ie an EA monitoring multiple currencies?
That means you can NOT have multiple EAs on ONE chart. You can always have the same EA on multiple (different) charts or multiple EAs on multiple charts. As long as it (they) uses magic numbers correctly.
You can do trades with other pairs as RaptorUK said. Just don't do it. Write the EA to trade the current symbol and put it on multiple charts. If you do it you can't use the tester, can't use any predefines, etc..
I really appreciate your help guys. Here's another possible moronic/idiotic question:
I've been messing around with iCustom and am better understanding mql4. Anyways, I have three indicators, one indicator which has a line and displays it in one of two colors, the second is a bar(with no value) with one of two colors, and the third is a histogram (also one of two colors) along with two lines (color irrelevant)
Basically, for all three indicators I need to figure out the color it is showing at the moment. For the last indicator, I need the color, the histogram bottom and top values, and the postion of both lines.
I cannot access the indicator code (I dont know if thats necasary)
How would i go about figuring colors/values out? I've messed around with the mode values in iCustom but none of the values I get really correspond to one color or another let alone histogram positions. Also I dont know how to access external variables of my indicators if thats necessary.
This is all the code in the start method:
Alert( iCustom(NULL, 0, "I1",, 2, 0)," ", iCustom(NULL, 0, "I2",, 2, 0)," ", iCustom(NULL, 0, "I3",, 2, 0) );
I left the mode area blank for now because I cannot figure what goes there. When running it, I just inserted null there.
I really appreciate your help guys. Here's another possible moronic/idiotic question:
I've been messing around with iCustom and am better understanding mql4. Anyways, I have three indicators, one indicator which has a line and displays it in one of two colors, the second is a bar(with no value) with one of two colors, and the third is a histogram (also one of two colors) along with two lines (color irrelevant)
Basically, for all three indicators I need to figure out the color it is showing at the moment. For the last indicator, I need the color, the histogram bottom and top values, and the postion of both lines.
I cannot access the indicator code (I dont know if thats necasary)
How would i go about figuring colors/values out? I've messed around with the mode values in iCustom but none of the values I get really correspond to one color or another let alone histogram positions. Also I dont know how to access external variables of my indicators if thats necessary.
bkhan:
Alert( iCustom(NULL, 0, "I1",, 2, 0)," ", iCustom(NULL, 0, "I2",, 2, 0)," ", iCustom(NULL, 0, "I3",, 2, 0) );
I left the mode area blank for now because I cannot figure what goes there. When running it, I just inserted null there.
Thank you both very much that portion of my works now!!
But I've come across another set of problems. Im trying to figure out what the best way to find out if there is a current trade going? This is what I tried.
if(OrderSelect(currentOrder,SELECT_BY_POS)==true)
{
datetime orderExists=OrderCloseTime();
}
else
{
orderExists=OrderCloseTime();
}
if (orderExists!=0){
Alert("There is not current order");
}
currentOrder is the ticket number only set by the EA when it makes a trade. So when the EA starts that value is zero, which I know will screw this up. Any alternatives?
But I've come across another set of problems. Im trying to figure out what the best way to find out if there is a current trade going? This is what I tried.
if(OrderSelect(currentOrder,SELECT_BY_POS)==true)
currentOrder is the ticket number only set by the EA when it makes a trade. So when the EA starts that value is zero, which I know will screw this up. Any alternatives?Play video
For large amounts of code, attach it.