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 am new to MQL4 and was just trying to see if I could make a simple EA that would use some basic functions. I know C++ well but must be awful at MQL4 because I something is worng with this code and I think it has to do with the time functions or possibably the buy/sell functions, heres the code: ...and by the way this wasnt designed to make money just test the functions Thanks!
currenttimeN = (timeH / 24) + (timeM / 1440);//gives the time of day as a percent or 1 (1 = one complete day) so always less than 1
currentvalue = Ask;
if (currentvalue > currenttimeN){
OrderSend(Symbol(),OP_SELL,1,Ask,3,Ask-25*Point,Ask+25*Point,"My order #2",16384,0,Green);
}
/* BUY COMMAND */
else if (currentvalue < currenttimeN){
OrderSend(Symbol(),OP_BUY,1,Ask,3,Ask-25*Point,Ask+25*Point,"My order #2",16384,0,Green);