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,
Kl_Urt: thanks for your code. This is similar to my code which I'm using for a while.
I define a class with special methods:
Usage of this class can be:
Hi @Dr Matthias Hammelsbeck
Would you share the customized DealInfo.mqh file, too?
Thanks & Regards
Hi @Dr Matthias Hammelsbeck
Would you share the customized DealInfo.mqh file, too?
Thanks & Regards
Yes. Please see the attached file
Yes. Please see the attached file
I need to have an OnClosePosition event when a position is closed manually....
Can this be done through OnTradeTransaction event?
Can someone show me how it is done?
Thanks & Regards
I need to have an OnClosePosition event when a position is closed manually....
Can this be done through OnTradeTransaction event?
Can someone show me how it is done?
Thanks & Regards
Printing out all in OnTradeTransaction did not trigger "close position" MANUALLY....
It only triggers close position when TP or SL is hit!
The following is my OnTradeTransaction code in order to catch the deal type or result code, but none was fired when I close a position MANUALLY...
Hope somebody can help me with it...
Thanks & regards...
Hi,
please see the content of the header file myTrade/Transaction.mqh:
Usage of this header can be:
Hi,
please see the content of the header file myTrade/Transaction.mqh:
Usage of this header can be:
Thanks for your help.... It worked! :-)
But one thing I need to ask you...
What is the need of putting DEAL_REASON_EXPERT & DEAL_REASON_CLIENT in the DEAL_ENTRY_IN block?
In my case, I don't care if BUY or SELL is done manually or by EA... Isn't that so in most cases?
Having that said, we don't need the OnOpenPositionManually event because by omitting the DEAL_REASON_EXPERT & DEAL_REASON_CLIENT in the DEAL_ENTRY_IN block covers it already...
The following is my DEAL_ENTRY_IN block of code and it worked as I wanted...
Regards,
Thanks for your help.... It worked! :-)
But one thing I need to ask you...
What is the need of putting DEAL_REASON_EXPERT & DEAL_REASON_CLIENT in the DEAL_ENTRY_IN block?
Because I want to distinguish between opening an order manually by the terminal and automatically by an expert advisor.
Matthias
Because I want to distinguish between opening an order manually by the terminal and automatically by an expert advisor.
Matthias
OK, gotcha!
Thanks again for your help...
Regards,