How to get commission fee before open order?

 

Hi there,

I'd like to know any MQL4/5 function to get commission fee before open order.

Thanks in advance.

 
tradelife:

Hi there,

I'd like to know any MQL4/5 function to get commission fee before open order.

Thanks in advance.

ask your broker. they might be best to answer that
 
Roszey:
ask your broker. they might be best to answer that

My question: Is there any MQL function (method or way) to calculate commission value before open order?

 I'd like to integrate this function into my MQL program.

 
tradelife:

My question: Is there any MQL function (method or way) to calculate commission value before open order?

 I'd like to integrate this function into my MQL program.

There is 2 ways :

  • You know the commission fee asked by your broker, then it's simple math to calculate it for any order.
  • You don't know it. Then calculate it from an existing order and apply the simple math as in the first case.
 

I have the same problem. I would want to know what is the way in which system will calculate commissions and swaps. But I need to know it while my EA is running and before sending orders to a concrete instrument. Sure that the broker will tell me that question, but I'd want to certify it by my program.  The question is that my EA will be searching for interesting instruments and it needs to know which are the specific characteristics of each instrument, before sending orders to them.

If the system is able to calculate commissions after the order is sent, I'm sure that the EA would be able to know the conditions before sending orders.

I think this property should be another MarketInfo() parameter, or perhaps is in MarketInfo(), but I don't find it.  Thanks a lot !!

 
jickgm:

I have the same problem. I would want to know what is the way in which system will calculate commissions and swaps. But I need to know it while my EA is running and before sending orders to a concrete instrument. Sure that the broker will tell me that question, but I'd want to certify it by my program.  The question is that my EA will be searching for interesting instruments and it needs to know which are the specific characteristics of each instrument, before sending orders to them.

If the system is able to calculate commissions after the order is sent, I'm sure that the EA would be able to know the conditions before sending orders.

I think this property should be another MarketInfo() parameter, or perhaps is in MarketInfo(), but I don't find it.  Thanks a lot !!

Seems no answer since long years
I am also searching for that ...
 
Mohammad Soubra:
Seems no answer since long years
I am also searching for that ...

************************

 
Nguyen Nga:************************

Thx
But that is only with this broker
Each broker has another rules 
Some brokers have fixed commissions for all of the pairs as well
..
But we are searshing about something such as MODE_COMMISSION that should be a parameter on the MarketInfo(()
 
Still no way of doing this except manually maintaining a file of values read from contract specification in market watch and reading it at runtime, or as pointed out elsewhere, opening and closing a position on each asset and generating the file from there. What is wrong with metaquotes...
 
Xiangdong Guo:

Hi there,

I'd like to know any MQL4/5 function to get commission fee before open order.

Thanks in advance.

For some reason MQL doesn't like us to get broker commisision from MetaTrader 5, I still don't know how is it possible.