Hi there.
I am using an EA and it closes some orders prematurely. Sometimes it is just over a dollar, making the trade a win, but with commission a loss. Please I am begging, can someone help add a considercommission function?
Consider commission
-
phil_trade
Re: Consider commission
Hishoshanna wrote: Hi there.
I am using an EA and it closes some orders prematurely. Sometimes it is just over a dollar, making the trade a win, but with commission a loss. Please I am begging, can someone help add a considercommission function?
you are using OrderProfit() to detect profit. But MQL help say for Orderprofit() :
Returns the net profit value (without swaps or commissions) for the selected order. For open positions, it is the current unrealized profit. For closed orders, it is the fixed profit.
Returns profit for the currently selected order.
So you have to calculate Net Profit with OrderProfit()+Orderswap()+OrderCommission()
Philippe
-
shoshanna
Re: Consider commission
Thank you for the reply Philippe.
I don't know the first thing about programming so I am clueless what to do next.
Can you please help?
I don't know the first thing about programming so I am clueless what to do next.
Can you please help?
-
phil_trade
Re: Consider commission
sorry but no time to do this. So you have to find a MQL programmer to do this for you.shoshanna wrote:Thank you for the reply Philippe.
I don't know the first thing about programming so I am clueless what to do next.
Can you please help?
-
dietcoke
- Trader
- Posts: 162
- Joined: Tue Nov 15, 2011 9:59 pm
Re: Consider commission
phil_trade wrote:sorry but no time to do this. So you have to find a MQL programmer to do this for you.shoshanna wrote:Thank you for the reply Philippe.
I don't know the first thing about programming so I am clueless what to do next.
Can you please help?
I won't touch decompiled code personally but as phillipe says, you could try replacing all instances of
Code: Select all
OrderProfit()Code: Select all
(OrderProfit()+OrderSwap()+OrderCommission())-
shoshanna
Re: Consider commission
Thank you very much dietcoke.
I don't even know what compiled/decompiled means. Am I understanding correctly : I have to load this in Metaeditor, press ctrl-f, find all instances of Orderprofit and replace them with Orderprofit+orderswap+ordercommission ?(with the brackets of course - will copy and paste from here) and then press F5 to see if it compiles?
I don't even know what compiled/decompiled means. Am I understanding correctly : I have to load this in Metaeditor, press ctrl-f, find all instances of Orderprofit and replace them with Orderprofit+orderswap+ordercommission ?(with the brackets of course - will copy and paste from here) and then press F5 to see if it compiles?
- SteveHopwood
- Owner
- Posts: 9904
- Joined: Tue Nov 15, 2011 8:43 am
- Location: Misterton - an insignificant village in England. Very pleasant to live in.
Re: Consider commission
So, you say you understand nothing of all this, then show that you actually understand everything that is going on.shoshanna wrote:Thank you very much dietcoke.
I don't even know what compiled/decompiled means. Am I understanding correctly : I have to load this in Metaeditor, press ctrl-f, find all instances of Orderprofit and replace them with Orderprofit+orderswap+ordercommission ?(with the brackets of course - will copy and paste from here) and then press F5 to see if it compiles?
After offering up decompiled code in a public forum whose owner has a track record of banning members stupid enough to flout copyright.
Wow. This is a rare form of idiocy. Congratulations on reaching a new low level of stupidity.
This thread disappears in 24 hours come what may. You have the intervening period to convince me not to delete your membership here. The clock is ticking and I do not mess around when acting to preserve the future of my forum.
In the meantime, this thread is locked. I have deleted the file from your post 1 in case it breeches copyright.
Read the effing manual, ok?
Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.
I still suffer from OCCD. Good thing, really.
Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.
To see The Weekly Roundup of stuff you guys might have missed Click here
My special thanks to Thomas (tomele) for all the incredible work he does here.
Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.
I still suffer from OCCD. Good thing, really.
Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.
To see The Weekly Roundup of stuff you guys might have missed Click here
My special thanks to Thomas (tomele) for all the incredible work he does here.
