-
Don't double post! You already had this thread open.
General rules and best pratices of the Forum. - General - MQL5 programming forum 2017.07.19 -
Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum 2019.05.06
Messages Editor -
Do you really expect an answer? There are no mind readers here and our crystal balls are cracked. We have no idea what your custom function are.
Always post all relevant code.
How To Ask Questions The Smart Way. 2004
Be precise and informative about your problem
-
Don't double post! You already had this thread open.
General rules and best pratices of the Forum. - General - MQL5 programming forum 2017.07.19 -
Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum 2019.05.06
Messages Editor -
Do you really expect an answer? There are no mind readers here and our crystal balls are cracked. We have no idea what your custom function are.
Always post all relevant code.
How To Ask Questions The Smart Way. 2004
Be precise and informative about your problem
okay lemme double check it
okay am sorry about that lemme do all that
Please use English in the forum. "Lemme" is not a word.
void BuyTrailingStop(string Symbol, double TrailingStop, double MinProfit, int MagicNumber, double MaxStopLoss)
void SellTrailingStop(string Symbol, double TrailingStop, double MinProfit, int MagicNumber, double MaxStopLoss )
Both functions have 5 parameters
BuyTrailingStop(Symbol(),TrailingStop,MinimumProfit,MagicNumber); //HERE SellTrailingStop(Symbol(),TrailingStop,MinimumProfit,MagicNumber); //AND HERE
Your function calls only have 4!
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
hi guys can anyone help me out on this one am getting wrong paramater counts … am sorry about that guys
// Adjust trailing stops
if(BuyMarketCount(Symbol(),MagicNumber) > 0 && TrailingStop > 0)
{
BuyTrailingStop(Symbol(),TrailingStop,MinimumProfit,MagicNumber); //HERE
}
if(SellMarketCount(Symbol(),MagicNumber) > 0 && TrailingStop > 0)
{
SellTrailingStop(Symbol(),TrailingStop,MinimumProfit,MagicNumber); //AND HERE
}
return(0);
}