Several issue with Backtesting and realtime trading

Created at 17 Jan 2013, 14:14
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
ZE

Zenner

Joined 14.07.2012

Several issue with Backtesting and realtime trading
17 Jan 2013, 14:14


Hi

I have unfourtunatly had some issue with the backtesting engine in the last couple of days culminating today where the robots do not take the trades which are taken when backtesting.

I have some questions regarding the screen posted below.

1. How can it be that the equity gets larger by around 128 when the trade was a win of 74 pips?

2. How can the ending balance be +77 the gross profit +286,70 but the equity +2020 ?

3. Why does the backtest only react to dates until the 09.01.2013 after that no signals are taken?

3. Could anyone explain to be how that can be and the concepts of equity in cAlgo?

 

Next question and a little more problematic, is that my Robot did not respond to the signals it should responded to tonight. At 00:00 tonight GMT+2 it should have opened a position in USDJPY h4 which it did not do, some ideas why this did not happen? The entry at 01:43 is from another Robot the one with the issue only enters at OnBar so every 4 hours if there is an signal.

 


@Zenner
Replies

admin
17 Jan 2013, 16:00

The equity is the value of an account if all positions were closed. The winning trade of 74 pips, for the position that was closed is the profit of one of the two positions in this case. The equity will not reflect the amount of that one position that was closed, but the total profit/loss of the account if all positions were closed at that instance.

The ending balance equals the starting balance plus the net profit. The gross profit minus the gross loss will give you the net profit.
When the backtesting ends there usually are positions that were not closed, therefore the equity will not reflect the amount actually earned by the positions that were closed but the amount on the account if all positions had been closed.

In order to answer the rest of the questions we need to see the code. If you like you may post the code in the forum or email us.

Hopefully, the above clarifies things.


@admin

Zenner
17 Jan 2013, 17:12

Thanks for your fast answer. 

Maybe you could answer another question I have: Is it possible to several robots use the same major pair at the same time? ex. 3 different Robots that open trades in EURJPY at the same time without any croos reference and other problematic stuff?

 

Regards,

Zenner


@Zenner

admin
17 Jan 2013, 18:06

It is possible but in order to ensure that one robot does not affect the trades of another, the code of each robot should only affect the positions opened by itself. I hope this makes sense. If you need help with the code please let us know.


@admin

Zenner
18 Jan 2013, 12:06

Hi

Yes I would very much like to know how to identify which Robot has opened which position or which robot has posted which pending order if that is possible.

 

Regards,

Zenner


@Zenner

admin
18 Jan 2013, 14:03

We will introduce label as a parameter to the Trade methods soon. This way it will be possible to identify which trades are initiated by which robot.


@admin