Get Back Your Money

Thursday, June 18, 2009

Profit Calculation

I make backtest today since I don't run my demo, and find something that I can't explain why it can be happened even in the back test. At the first time I guess that maybe there is something wrong, and then using my MQL version, I made back test in visual mode, and tell EA to show current pip profit in chart window.This is just calling my TotalProfit function in MQL4.
Take a look at the left corner, even price at 1.5063/5066, but the total profit (pip) is 0.

Let see the last 3 trades. The first trade is executed at 1.5067. Then the second trade is triggered at 1.5075. The second trade is closed at 1.5069 and made profit about 6 pips (as much current ATR). The first trade still in the market until the third trade is triggered at 1.5077. When price (ask) hit 1.5071 (at this point our sum profit from 2 orders is 1, 1.5077-1.5071=5 and 1.5067-1.5071= -4), the EA close the profitable trade (3rd trade) and made profit 5 pips.
Unfortunately, when price (ask) hit 1.5066 the total profit (pip) that EA record is 0. And the EA didn’t close the first trade, then there is a spike after this, and hit 1st trade stop loss.
Correct
I don’t know if it also happened at live trade not just in the back test. At the other picture the EA show current profit calculation correctly.

I try to close with 0 pips profit at this point by changing the target, and then I get slippage 2 pips. The order is closed at 1.5065/1.5068.
Slippage

What I can say, this is always happen in our real trade. If you watch your trade carefully, then you may find sometimes your profit doesn’t change while market has been move for a pip.

2 komentar:

Syarif said...

Actually I run my demo, just after first trade at 22, I was disconnected from my provider for several hour, and then start again, so my demo show difference result

Anonymous said...

What is the solution?

Post a Comment

Risk Warning

Please note that Trading in the Foreign Exchange market might carry potential rewards, but also potential risks. You must be aware of the risks and are willing to accept them in order to trade in the foreign exchange market. Don't trade with money you can't afford to lose.