- When you post code please use the CODE button (Alt-S)!
(For large amounts of code,
attach it.)
Please edit
your post.
General rules and best pratices of the Forum. - General - MQL5 programming forum
Messages Editor -
Check your return codes for errors, report them
and you would know why.
Don't just silence the compiler, it is trying to help you.
What are Function return values ? How do I use them ? - MQL4 and MetaTrader 4 - MQL4 programming forum
Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles
Only those functions that return a value (e.g. iClose, MarketInfo, etc.) must you call ResetLastError before in order to check after. int OnCalculate(... ticket = OrderSend(Symbol(),OP_SELL,1,price,slippage,stoploss,takeprofit,"My Sell order",magicNumber,expiration,clrRed);
Indicators can not trade.
i put codes in <code>
GetLastError() gives Runtime Error code 4055 which means custom indicator error (ERR_CUSTOM_INDICATOR_ERROR)
How to remove it?
tnx
paulselvan:
i put codes in <code>
GetLastError() gives Runtime Error code 4055 which means custom indicator error (ERR_CUSTOM_INDICATOR_ERROR)
How to remove it?
tnx
As @whroeder1 said an indicator can not trade. If you want to trade you have to create an Expert (or a Script).
oh its more clear now
tnx

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
hello
i wrote a program with OrderSend().But this order isnt send correctly ( ticket <0 )
Can u tell from where is the error in this program :