Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1117
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
Good day everyone!
Here is part of the script code for Metatrader5:
You have questions:
1. The script is supposed to set either pending limit orders at a certain distance from ask and bid, or stop orders. The limit pending orders are set without any problems but the stop ones are not. Please help me find out why the pending Buy Stop and Sell Stop orders are not being set.
2. Is there any possibility to test the script when the market is closed (e.g. on weekends)?
Sincerely, Vladimir.Reference:General principles - Trading Operations
- current market state
- forecast
- current price
- order price
- price at which the pending order will be placed
- expected growth
- expected decline
Your mistake is in the formation of the starting price:
I recommend to make a separate starting price for Stop and Limit pending orders.
Forum on Trading, Automated Trading Systems and Strategy Tests
FAQ from Beginners MQL5 MT5 MetaTrader 5
Vladimir Karputov, 2019.08.31 08:16
And your mistake is in the start price formation:
I recommend to make the starting price separately for Stop and separately for Limit pending orders.
Thanks, Vladimir, for the tip.
What do you think of the possibility to test the script when the market is closed (e.g. on weekends)?
Sincerely, Vladimir.
What do you think about the possibility to test the script when the market is closed (e.g. on weekends)?
The question is removed, as the answer appears to have been given in another thread.
Respectfully, Vladimir.
Question withdrawn as the answer appears to have been given in another thread.
Respectfully, Vladimir.
So you've spread one question all over the forum... You're the one who's confused.
Thank you, Vladimir, for the tip.
What do you think of the possibility of testing the script when the market is closed (e.g. on weekends)?
Respectfully, Vladimir.
Thank you, Vladimir, for the tip.
What do you think about the possibility to test the script when the market is closed (e.g. on weekends)?
Respectfully, Vladimir.
This is how the Expert Advisor will look like:
Vladimir Karputov, 2019.08.31 13:20
This is what an expert would look like:
Great!
Thank you, Vladimir, you've helped me out, or I'd have suffered until Monday.
Regards, Vladimir.
Great!
Thank you, Vladimir, you've helped me out, or I'd have had to suffer until Monday.
Best regards, Vladimir.
You are welcome.
Note the m_first_start variable declared in the global program level
at the end of OnTick, this variable will be assigned the value "true"
and the EA will no longer place pending orders until its next restart
Forum on Trading, Automated Trading Systems and Strategy Tests
FAQ from Beginners MQL5 MT5 MetaTrader 5
Vladimir Karputov, 2019.08.31 14:38
Please.
Note the m_first_start variable declared at global program level
Yes, Vladimir, I noticed right away that the EA works like a script when tested. Thank you once again!
Sincerely, Vladimir.
Why is the candle output not working?