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.
Please not that I am not a coder so my opinion about how to code may be totally mistaken.
I just opened help in MetaEditor:
Code:
int OrderSend( string symbol, int cmd, double volume, double price, int slippage, double stoploss, double takeprofit, string comment=NULL, int magic=0, datetime expiration=0, color arrow_color=CLR_NONE)
where
- cmd - OP_BUY (buy), or OP_SELL (sell), and so on;
And also use MarketInfo.
Besices you may use some templates to create EAs:
Templates to create EAs and Indicators:
- some good templates are here;
- templates with some new codes are here.
- Programming Modules with many programming functions are here.
As to open the order at a certain time so you may use something like that:
Or this if(bid == Bid) ...
Be aware though that equality of floating point numbers is tricky, you might want something more like this... if (MathAbs(bid - Bid) < Point) (or something).
It is intended that in a certain time the market recognized the price which is for example, x. And will sell 10 pips above this x. I tried this code, and it doesn't work.
Question#2
If within certain seconds the trade is not activated, what is the code syntax for disabling the trade?