Download MetaTrader 5

Results Tab and Modify SL/TP

To add comments, please log in or register
They are already making profit from their signals. Publish your signal and join them!
David
217
David 2010.08.13 12:09 

Hi everybody,
i sent in the past a similar question but didn't get any answer.
I will add some more info this time.

I developed the simplest EA using MQL5:

- Sell EURUSD
- Modify Position SL

 Run the backtest and see this result tab:

 

As you can see the test runs until the end of the test but i don't see here that the SL has been modified.
The Journal Tab tells me instead: "position modified [sell 0.10 EURUSD 1.38624 sl: 1.45000]"

If i switch to the  Orders section I see that S/L column is blank/empty (Why? probably because this column is filled only when SL and TP are valued before sending the trade ?)

 

 Again, change the code, and change the SL to 1.39, run the test:

 

 This time the SL will be hit (column price red colored) so this time the operation will be closed by the SL (see last column Comment)

So the question is, why (as in MT4) when the SL or TP is modified i cannot see a row in the results tab of type (as in the past "modify") stating that the position has been modified ?
You can modify the SL/TP more times but you won't see anything here. Difficult to understand what's going on.
Is there an option to show those modifications, i didn't see it. Strange behavior anyway.

Thank you.
Dev Team please give an answer about that. 

Alexey Da
Moderator
6606
Alexey Da 2010.08.20 12:15  

Just look at history tab. There you can see the same behavour.

Values in SL or TP columns are filled only if them have set in order. If them weren't set, any modifications of position don't change columns SL and TP in history tab.

Did you mean this? If I understand you wrong please explain what did you mean.

 

forexistence
285
forexistence 2010.08.21 17:13  

I suppose he means also this:


go to results window, click with right mouse button, and you will have a series of sub-windows where to choose.

Two of them (orders, deals) have the history with SL TP and modify as you usually do in mt4.


Bye

David
217
David 2010.08.26 17:26  
forexistence:

I suppose he means also this:


go to results window, click with right mouse button, and you will have a series of sub-windows where to choose.

Two of them (orders, deals) have the history with SL TP and modify as you usually do in mt4.


Bye

Hi forexistence,
i mean exactly this behaviour...  i see the different tabs (orders, deals, orders & deals) but i don't see  where the SP has been modified for example if i run the following code:

trade.PositionModify("EURUSD",1.45,0);
Print("RET: " + trade.ResultRetcode());

in the journal i see:

2010.02.01 00:01:05   position modified [sell 0.10 EURUSD 1.38624 sl: 1.45000]

2010.02.01 00:01:05   RET: 10009

so the resultcode is 10009 (which corresponds to "Request is completed") but where do you see a row which tells me that a modification of the SL has been done ?
Please see screenshot at the first post. I only see buy and sell but not modify.

For alexvd:

 As you can see the SL has been set but no evidence about that in the results tab.

Thank you. 

 

To add comments, please log in or register