Posted By: trader310
Trade Question - 06/03/20 05:13
HI all,
I'm a newbie to Zorro, am I'm backtesting trade signals produced by an AI model.
My question is why is this plotted as a losing trade? The logs show a winning trade, but the chart shows a red line, and a loss. (see the attached image):
Here's the log for what should be a winning trade:
The code for trading is the signals is:
Appreciate any guidance... what am I missing here?
I'm a newbie to Zorro, am I'm backtesting trade signals produced by an AI model.
My question is why is this plotted as a losing trade? The logs show a winning trade, but the chart shows a red line, and a loss. (see the attached image):
Here's the log for what should be a winning trade:
Code
BUY 1 [EURUSD_2020_CNN::L05401] Long 1000000@1.11824 at 12:00:00 Com 0000 Mrg 25000000 Net 0 Units 1.0000 MTotal 0.00 MCost 25.0000 PCost 0.01000 Opn 54 [55: Thu 20-01-02 12:15] 0000 -9490 0/1 1.11902/1.11920\1.11824/1.11875 -0.01000 [56: Thu 20-01-02 12:30] 0000 -9190 0/1 1.11912/1.11938\1.11875/1.11905 -0.01000 [57: Thu 20-01-02 12:45] 0000 -9300 0/1 1.11914/1.11938\1.11894/1.11894 -0.01000 [58: Thu 20-01-02 13:00] 0000 -9180 0/1 1.11925/1.11936\1.11894/1.11906 -0.01000 [59: Thu 20-01-02 13:15] 0000 -9130 0/1 1.11919/1.11965\1.11906/1.11911 -0.01000 SELL 2 [EURUSD_2020_CNN::L05401] exit [EURUSD_2020_CNN::L05401] Sell 1000000@1.11911: -9130 Bid 1.10911 at 13:15:00 Opn 1.11824 Cls 1.11911 Spr 0.01000000 Slp 0.00 Rol 0.00 Com 0.00 Net 1000000 Max Loss 0.00 -> 9130.01 Max Bars 0 -> 59-54
The code for trading is the signals is:
Code
int signal = (int)marketVal(); if (signal == 1 && (!TradeIsOpen)) { // signal printf("\nBUY %d", signal); enterLong(1000000); } else if (signal == 2) { printf("\nSELL %d", signal); exitLong(); }
Appreciate any guidance... what am I missing here?