fibios1: I'm not sure if it's the function or the function call that is the issue. If anyone can help I would greatly appreciate as I have no idea what is wrong with it.
OrderSelect(i, SELECT_BY_POS, MODE_TRADES); OrderModify(OrderTicket(), OrderOpenPrice(), Bid - Point*TrailingStop, 0, 0, Yellow);
So find out. What are Function return values ? How do I use them ? - MQL4 forumextern int TrailingStop = 20;
Not adjusting for 4/5 digit broker. On a 5 digit broker your stop is only 2 pips. Requirements and Limitations in Making Trades - Appendixes - MQL4 Tutorial
void Trailing_Stop(){ int TrailingStop; // This declaration hides the external. So you have none.
- You "have no idea." Of course you don't. Add print statements around your IFs and Calls, dumping variable and calculation values and find out.
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 the programming side of this so I thought I would much around with EAs that are already written. In this particular case, I'm having difficulty with my trailing stop function. I have attached the whole EA as I'm not sure if it's the function or the function call that is the issue. If anyone can help I would greatly appreciate as I have no idea what is wrong with it.