| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Consider commission https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=2595 |
Page 1 of 1 |
| Author: | shoshanna [ Fri Jun 21, 2013 9:48 am ] |
| Post subject: | Consider commission |
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? |
|
| Author: | phil_trade [ Fri Jun 21, 2013 2:07 pm ] |
| Post subject: | Re: Consider commission |
Hi 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 |
|
| Author: | shoshanna [ Sat Jun 22, 2013 8:00 am ] |
| Post subject: | 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? |
|
| Author: | phil_trade [ Sat Jun 22, 2013 8:26 am ] |
| Post subject: | Re: Consider commission |
sorry but no time to do this. So you have to find a MQL programmer to do this for you. |
|
| Author: | shoshanna [ Sat Jun 22, 2013 10:13 am ] |
| Post subject: | Re: Consider commission |
Thank you. ☺ |
|
| Author: | dietcoke [ Sat Jun 22, 2013 3:14 pm ] |
| Post subject: | Re: Consider commission |
I won't touch decompiled code personally but as phillipe says, you could try replacing all instances of Code: Select all Code: Select all |
|
| Author: | shoshanna [ Sat Jun 22, 2013 3:34 pm ] |
| Post subject: | 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? |
|
| Author: | SteveHopwood [ Sat Jun 22, 2013 10:12 pm ] |
| Post subject: | Re: Consider commission |
So, you say you understand nothing of all this, then show that you actually understand everything that is going on. 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. |
|
| All times are UTC | Page 1 of 1 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|