Strategy Tester query

 

Hi,

I ran a strategy simulation and all orders with Order ticket numbers prior to 72 are not logged in the Journal and I'm not sure why (see screenshots).


Here's the start of the Tester Journal...

Next, the Journal shows the first successfully opened order as Order ticket number 72. This happens to be a Buy order. Sell orders were unsuccessfull and generate error 130, but I will investigate this later.


First successfull Buy order is ticket 72.

But, the Tester Results tab shows Buy order tickets which have been made earlier than order number 72, which is why I am confused. Why are these orders not shown in the Journal view? (see below)


Results tab order ticket numbers prior to ticket 72.

I've checked and double-checked and there are no other entries in the Journal view showing successfully opened trade operations between the start of the Journal and order ticket number 72.

Any tips or advice would be greatly appreciated.

Wilbur.

 

Don't just look at the Journal window - right-click on the Journal window, Open, and view the actual log file with a text editor.


The journal does not contain ALL entries.

 
blogzr3:

Don't just look at the Journal window - right-click on the Journal window, Open, and view the actual log file with a text editor.


The journal does not contain ALL entries.

Thanks. Great tip.

You're spot on.

The folder; '\tester\logs' contains the relevant log and all the successfully opened trades are in there, starting at order ticket 1, going right through to 86.

I did have to do some searching to find them amongst all the error 130's.


Wilbur

 

Your 130s are caused either:

- by having invalid stops

- by having your stops too close to the price or

- (with certain brokers only) by attempting to set stops in the order send when you need to set them at 0 and then subsequently select and modify the order


Check MarketInfo(Symbol(),MODE_STOPLEVEL) to assess where you can set your stops.


CB

 
cloudbreaker wrote >>

Your 130s are caused either:

- by having invalid stops

- by having your stops too close to the price or

- (with certain brokers only) by attempting to set stops in the order send when you need to set them at 0 and then subsequently select and modify the order

Check MarketInfo(Symbol(),MODE_STOPLEVEL) to assess where you can set your stops.

CB

My broker is an Alpari UK demo account. I assume that they allow setting stops in the ordersend since the buy orders were successfully opened.

I suspect the stops for the sell orders have been placed too close to the current market price. I need to review this part of the code.

Thanks for the help.

Wilbur

Reason: