Download MetaTrader 5
To add comments, please log in or register
Move from theory to practice. Code Base will help you!
dori.claudino
36
dori.claudino 2014.03.10 12:38 
Hi!

Could anyone help me in this log?
I have an EA that calculates orders and batches that will balance the final balance (if I have any drawdown, or the market change position).


BUY
SELL


The part of the log:

19:29:44 2011.01.07 16:54 mGRID EA branch_dori USDJPY,M1: Account Balance: 25333.4924
19:29:44 2011.01.07 16:54 mGRID EA branch_dori USDJPY,M1: open #44 buy stop 0.10 USDJPY at 83.230 sl: 82.780 tp: 83.380 ok
19:29:44 2011.01.07 16:54 mGRID EA branch_dori USDJPY,M1: cpt(0) BuyGoalProfit(149)
19:29:44 2011.01.07 16:54 mGRID EA branch_dori USDJPY,M1: open #45 sell stop 0.10 USDJPY at 82.930 sl: 83.380 tp: 82.780 ok
19:29:44 2011.01.07 16:54 mGRID EA branch_dori USDJPY,M1: cpt(0) SellGoalProfit(150)
19:29:44 2011.01.07 18:29 Tester: order #45, sell 0.10 USDJPY is opened at 82.930
19:29:44 2011.01.07 18:29 mGRID EA branch_dori USDJPY,M1: BuyGoalProfit(-300) < SellGoalProfit*4(600)
19:29:44 2011.01.07 18:29 mGRID EA branch_dori USDJPY,M1: op.:83.23
19:29:44 2011.01.07 18:29 mGRID EA branch_dori USDJPY,M1: tp.:0.15
19:29:44 2011.01.07 18:29 mGRID EA branch_dori USDJPY,M1: diferenca.:900
19:29:44 2011.01.07 18:29 mGRID EA branch_dori USDJPY,M1: novo lote compra 0.61
19:29:44 2011.01.07 18:29 mGRID EA branch_dori USDJPY,M1: open #46 buy stop 0.61 USDJPY at 83.230 sl: 82.780 tp: 83.380 ok
19:29:44 2011.01.07 18:29 mGRID EA branch_dori USDJPY,M1: antes BuyGoalProfit(-300)
19:29:44 2011.01.07 18:29 mGRID EA branch_dori USDJPY,M1: depois BuyGoalProfit(614)
19:29:44 2011.01.10 07:55 Tester: order #44, buy 0.10 USDJPY is opened at 83.230
19:29:44 2011.01.10 07:55 Tester: order #46, buy 0.61 USDJPY is opened at 83.230
19:29:44 2011.01.10 07:55 mGRID EA branch_dori USDJPY,M1: SellGoalProfit(-3044) < BuyGoalProfit*4(2456)
19:29:44 2011.01.10 07:55 mGRID EA branch_dori USDJPY,M1: op.:82.93
19:29:44 2011.01.10 07:55 mGRID EA branch_dori USDJPY,M1: tp.:1500
19:29:44 2011.01.10 07:55 mGRID EA branch_dori USDJPY,M1: diferenca.:5500
19:29:44 2011.01.10 07:55 mGRID EA branch_dori USDJPY,M1: novo lote venda 3.68
19:29:44 2011.01.10 07:55 mGRID EA branch_dori USDJPY,M1: open #47 sell stop 3.68 USDJPY at 82.930 sl: 83.380 tp: 82.780 ok
19:29:44 2011.01.10 07:55 mGRID EA branch_dori USDJPY,M1: antes SellGoalProfit(-3044)
19:29:44 2011.01.10 07:55 mGRID EA branch_dori USDJPY,M1: depois SellGoalProfit(2476)
19:29:45 2011.01.10 15:15 Tester: order #47, sell 3.68 USDJPY is opened at 82.930
19:29:45 2011.01.10 15:15 mGRID EA branch_dori USDJPY,M1: BuyGoalProfit(-15945) < SellGoalProfit*4(9904)
19:29:45 2011.01.10 15:15 mGRID EA branch_dori USDJPY,M1: op.:83.23
19:29:45 2011.01.10 15:15 mGRID EA branch_dori USDJPY,M1: tp.:0.15
19:29:45 2011.01.10 15:15 mGRID EA branch_dori USDJPY,M1: diferenca.:25849
19:29:45 2011.01.10 15:15 mGRID EA branch_dori USDJPY,M1: novo lote compra 17.24
19:29:45 2011.01.10 15:15 mGRID EA branch_dori USDJPY,M1: open #48 buy stop 17.24 USDJPY at 83.230 sl: 82.780 tp: 83.380 ok
19:29:45 2011.01.10 15:15 mGRID EA branch_dori USDJPY,M1: antes BuyGoalProfit(-15945)
19:29:45 2011.01.10 15:15 mGRID EA branch_dori USDJPY,M1: depois BuyGoalProfit(9914)
19:29:45 2011.01.10 16:00 Tester: stop loss #44 at 82.780 (82.786 / 82.872)
19:29:45 2011.01.10 16:00 Tester: stop loss #46 at 82.780 (82.786 / 82.872)
19:29:45 2011.01.10 16:00 mGRID EA branch_dori USDJPY,M1: close #45 sell 0.10 USDJPY at 82.930 sl: 83.380 tp: 82.780 at price 82.872
19:29:45 2011.01.10 16:00 mGRID EA branch_dori USDJPY,M1: delete #48 buy stop 17.24 USDJPY at 83.230 sl: 82.780 tp: 83.380 ok
19:29:45 2011.01.10 16:01 mGRID EA branch_dori USDJPY,M1: close #47 sell 3.68 USDJPY at 82.930 sl: 83.380 tp: 82.780 at price 82.893
19:29:45 2011.01.10 16:02 mGRID EA branch_dori USDJPY,M1: Account Balance: 25118.7232


If the order # 48 had been open, it would close along with orders # 44 and # 46
I do not know why the order #48 was not open?

This order was responsible to avoid losses.

I can not understand why this happened.
Thanks!


Keith Watford
Moderator
7983
Keith Watford 2014.03.10 12:52  

The order was opened but it did not trigger because it was a BuyStop and price did not go up to 83.230

If it had triggered the losses would have been greater

dori.claudino
36
dori.claudino 2014.03.11 12:39  
Hummm!

Hello, I just did not realize the kind of order that was open, so I need to adjust the logic to open more lots and balance the account.
If you want to see the code, is this repository:
https://github.com/doriclaudino/mGrid/tree/branch_dori

file:
mGRID EA branch_dori.mq4
/
To add comments, please log in or register