Can Strategy Tester Calculate Multiple Close points When Testing EA?

 

I was wondering if strategy tester can calculate more than one close points when testing your expert adviser? It seems that I'm having problems getting the strategy tester to show more than one close points with my EA, another words, strategy tester will close the whole lot when it should be closing part of the lot. When I activate my EA for live trading, it will close part of the lot with no problems. Has anyone else encountered this problem or have a solution to fix this?

My closing codes look like this:

 void start()

{

Code......

int total=OrdersTotal();

for(int cnt=total-1;cnt>=0;cnt--)

{

OrderSelect(cnt, SELECT_BY_POS);

Closing Code......

{

OrderClose(OrderTicket(),OrderLots(),Bid,3,Violet); Time0=Time[0]; // close position

Code....

}

}

}

return;

}

//+------------------------------------------------------------------+


 
fxtrader86: I was wondering if strategy tester can calculate more than one close points when testing your expert adviser? It seems that I'm having problems getting the strategy tester to show more than one close points with my EA,

  1. Play video
    Please edit your post.
    For large amounts of code, attach it.

  2. OrderClose(OrderTicket(),OrderLots(),Bid,3,Violet); Time0=Time[0]; // close position
    I've used partial close in the tester (pre-B600) with no problems, but your code shows a complete close.
 
It isnt a partial close that im looking for, it is closing out multiple tickets one at a time
 
fxtrader86:

I was wondering if strategy tester can calculate more than one close points when testing your expert adviser? It seems that I'm having problems getting the strategy tester to show more than one close points with my EA, another words, strategy tester will close the whole lot when it should be closing part of the lot. When I activate my EA for live trading, it will close part of the lot with no problems. Has anyone else encountered this problem or have a solution to fix this?

My closing codes look like this:



fxtrader86:
It isnt a partial close that im looking for, it is closing out multiple tickets one at a time


Your posts contradict each other.

Explain clearly and post proper code and maybe somebody will be able to help you.

 
fxtrader86:

...in another words, strategy tester will close the whole lot when it should be closing part of the lot.

fxtrader86:
It isnt a partial close that im looking for ...
 
for example: if I buy .10 lots @ 1.2 then buy another .10 lots @1.21. I then close .10 lots @ 1.23 then close the other .10 lot @1.24
 
fxtrader86: I was wondering if strategy tester can calculate more than one close points when testing your expert adviser?
Of course the tester can handle multiple open orders.
 
WHRoeder:
Of course the tester can handle multiple open orders.


yeah thats what I figured. I can get the tester to calculate multiple buy or sell lots on different bars but I cant get the tester to close each individual buy or sell lot. It closes everything in one lot at one price. any suggestions on what I should change in the closing criteria to make this possible, or just please point me in the right direction so that I can figure it out myself.
 
fxtrader86: It closes everything in one lot at one price.
  1. No, your code is closing everything. fix your code to do what you want
  2. Or set the TP at the prices you want and be done.
Reason: