Download MetaTrader 5

Manually open/close positions in the tester?

To add comments, please log in or register
The entire MQL5.community history on a single page!
ugo
50
ugo 2014.06.22 19:07 

Hi guys,

someone kindly knows if it is possible to open/close positions manually in the tester?

 

I tried to put a button and use OnChartEvent() like in: https://www.mql5.com/en/docs/eventfunctions/eventchartcustom 

but it did not work.

 

any suggestions? 

thanks

 

ugo

Documentation on MQL5: Working with Events / EventChartCustom
Documentation on MQL5: Working with Events / EventChartCustom
  • www.mql5.com
Working with Events / EventChartCustom - Reference on algorithmic/automated trading language for MetaTrader 5
Rodrigo Malacarne
Moderator
9904
Rodrigo Malacarne 2014.06.22 19:57  
ugo:

Hi guys,

someone kindly knows if it is possible to open/close positions manually in the tester?

I tried to put a button and use OnChartEvent() like in: https://www.mql5.com/en/docs/eventfunctions/eventchartcustom 

No, unfortunately it's not possible.

Regarding the button idea, there are several limitations to use objects on the Strategy Tester, so, unfortunately this idea will not work as well.

Marco vd Heijden
Moderator
4706
Marco vd Heijden 2014.06.22 22:06  
ugo:

Hi guys,

someone kindly knows if it is possible to open/close positions manually in the tester?

 

I tried to put a button and use OnChartEvent() like in: https://www.mql5.com/en/docs/eventfunctions/eventchartcustom 

but it did not work.

 

any suggestions? 

thanks

 

ugo

its a good question. I would sinput a int which relates to the bar count so say i set it to ten then it will count ten bars then set it to pop up a messagebox askin me if i want to open an buy order then a sell order if cancel none otherwise order and continue another ten bars or i would set it so that the box comes up when an interesting trigger like rsi 70 is hit or somethin but you can't just hit an order button directly so use your imagination.
Stuart Browne
5817
Stuart Browne 2014.06.22 23:53  
There is an MT4 simulator out there that lets you do this. It uses scripts to open/close/modify positions. Can't think of the name of it right now but will have a look when I get home. Or you should be able to find it with a bit of googling.
exedir
2975
ugo nuvoloni 2014.06.24 09:12  
Thecreator1:
its a good question. I would sinput a int which relates to the bar count so say i set it to ten then it will count ten bars then set it to pop up a messagebox askin me if i want to open an buy order then a sell order if cancel none otherwise order and continue another ten bars or i would set it so that the box comes up when an interesting trigger like rsi 70 is hit or somethin but you can't just hit an order button directly so use your imagination.
MessageBox() is not triggered in the tester. This ether would not work.
To add comments, please log in or register