Beginner1111: I am new to MQL4 and interest to learn the language. I have think of a tutorial for myself, a simple but difficult for those who don't know the syntax. Constant: EnterTime Set EnterTime = 1500 server time ActiveTime = Network time (this value is dynamic) If ActiveTime == Entertime Opentrade = (Long/short, Volume, TakeProfit, StopLoss) |
|
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
Hi guys,
I am new to MQL4 and interest to learn the language. I have think of a tutorial for myself, a simple but difficult for those who don't know the syntax.
I am trying to construct a code for a timebased trade. The idea is at below. Anyone can help me to define the function the properly? Thanks in advance.
(Please use MQL4 language because I don't have MQL5 developer install yet.)
{
Constant: EnterTime
Variable: ActiveTime /*This is the network time*/
Extern Variable: Volume, TakeProfit, Stop Loss
Set EnterTime = 1500 server time
ActiveTime = Network time (this value is dynamic)
If ActiveTime == Entertime
Opentrade = (Long/short, Volume, TakeProfit, StopLoss)
End If
}