dafiriscott:
You have to use OnTradeTransaction() event handler if you want to detect "close". Also, I suggest you to read this article Orders, Positions and Deals in MetaTrader 5
I want to insert new instructions in my EA. I want to tell it at a certain point that if a close happened, then it shd carry out following instructions. Below is how I want to do it but I do not know if it is correct.
if ( CLOSELONG(Symbol()) )
{
//instructions here...
//instructions here...
}
Please say if this is correct
angevoyageur:
You have to use OnTradeTransaction() event handler if you want to detect "close". Also, I suggest you to read this article Orders, Positions and Deals in MetaTrader 5
Thank you very much
You have to use OnTradeTransaction() event handler if you want to detect "close". Also, I suggest you to read this article Orders, Positions and Deals in MetaTrader 5
angevoyageur:
You have to use OnTradeTransaction() event handler if you want to detect "close". Also, I suggest you to read this article Orders, Positions and Deals in MetaTrader 5
How can I do this with MQL4 please?
You have to use OnTradeTransaction() event handler if you want to detect "close". Also, I suggest you to read this article Orders, Positions and Deals in MetaTrader 5

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
I want to insert new instructions in my EA. I want to tell it at a certain point that if a close happened, then it shd carry out following instructions. Below is how I want to do it but I do not know if it is correct.
if ( CLOSELONG(Symbol()) )
{
//instructions here...
//instructions here...
}
Please say if this is correct