Gamestudio Links
Zorro Links
Newest Posts
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
LPDIRECT3DCUBETEXTUR
E9

by Ayumi. 04/12/24 11:00
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 04/11/24 14:56
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 456 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
11honza11, ccorrea, sakolin, rajesh7827, juergen_wue
19045 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Wrong Trade Status on HTML page for Trade profits #487489
05/16/23 06:08
05/16/23 06:08
Joined: May 2023
Posts: 23
Hamburg, Germany
M
Martin_HH Offline OP
Newbie
Martin_HH  Offline OP
Newbie
M

Joined: May 2023
Posts: 23
Hamburg, Germany
Probably this is a recent bug, but I just noticed it during live trading. The HTML status page and the trades.csv file are displaying incorrect profit results:
1. A short trade with a win of 387 EUR was shown as a loss of -387 EUR.
2. A long trade with a loss was displayed as a win.

I did not find any documentation of this bug. Any confirmation?

BR

Martin

Last edited by Martin_HH; 05/16/23 06:11.
Re: Wrong Trade Status on HTML page for Trade profits [Re: Martin_HH] #487490
05/16/23 11:13
05/16/23 11:13
Joined: May 2023
Posts: 23
Hamburg, Germany
M
Martin_HH Offline OP
Newbie
Martin_HH  Offline OP
Newbie
M

Joined: May 2023
Posts: 23
Hamburg, Germany
Additional Info:

- I am using 2.53.
- I did not recognise this behaviour with my demo account (FXCM)

Could it be a difficulty with the plugin to FXCM Live account?

Re: Wrong Trade Status on HTML page for Trade profits [Re: Martin_HH] #487492
05/17/23 08:35
05/17/23 08:35
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
You mean the HTML page got a wrong sign of the profit, but the .csv file and the log got the correct sign? With all trades or only with some?

Re: Wrong Trade Status on HTML page for Trade profits [Re: Martin_HH] #487493
05/17/23 13:12
05/17/23 13:12
Joined: May 2023
Posts: 23
Hamburg, Germany
M
Martin_HH Offline OP
Newbie
Martin_HH  Offline OP
Newbie
M

Joined: May 2023
Posts: 23
Hamburg, Germany
The trades.csv and the ...real.log were also wrong.
Example long trade: buy 1.25304 sell: 1.25288 (175.000 units)
Broker shows: -25,75 EUR Zorro: +42.66 EUR

I saw another error which I decribed above with a short trade.
It seems the error does not occur always. Today a losing Long trade was shown correctly. I will have a further look in the next days and give a statement, when I have updates:

Thanks for your response.

Last edited by Martin_HH; 05/17/23 14:49.
Re: Wrong Trade Status on HTML page for Trade profits [Re: Martin_HH] #487495
05/18/23 14:41
05/18/23 14:41
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
The profit of any trade is the difference of entry and exit price minus spread and commission. This is not different in backtest and in live trading. If something looks wrong, look up the trade in the log and check it from start to end.

Re: Wrong Trade Status on HTML page for Trade profits [Re: jcl] #487505
05/23/23 08:02
05/23/23 08:02
Joined: May 2023
Posts: 23
Hamburg, Germany
M
Martin_HH Offline OP
Newbie
Martin_HH  Offline OP
Newbie
M

Joined: May 2023
Posts: 23
Hamburg, Germany
Danke jcl
As usual the problem may be caused from another area. I just recognised that there is a link to my use of the trailing functionalities (not TMF).
I coded:
Trail = Stop = optimize(1,0.5,2.2,0.1)*ATR(100);
TrailSlope=optimize(25,100,300,25);
TrailSpeed=optimize(100,100,300,25);

It seems to work only in Long trades correctly. In the manual the trailing is described with "raising" the SL. Is this right... only in Long trades? Or do I have to use the TMF system instead ?? But I am using two loops (Markets and different strategies). Does it work?

Today, I was with a short position in profit, but I saw that the SL and Trail field, shown in the html file, are much to low. I stopped the position manually. Actually I got a win of 517 Euros. The html has shown -527 Euros. The status off Zorros shows : -527 EUR, but equity of 50519 EUR (519 EUR comes from the broker)

Sell: 1.243410 Buy: 1.241310 -527 EUR is shown in the demotrades.csv. Of course the FXCM broker shows a win as I stated.

Is there a side effect of my trailing use at short positions? Or do I have a general problem?
Additional info, I have a FXCM EU account and therefore it shoud be not a NFA flag issue, right?

Last edited by Martin_HH; 05/23/23 11:56.
Re: Wrong Trade Status on HTML page for Trade profits [Re: Martin_HH] #487508
05/23/23 15:19
05/23/23 15:19
Joined: May 2023
Posts: 23
Hamburg, Germany
M
Martin_HH Offline OP
Newbie
Martin_HH  Offline OP
Newbie
M

Joined: May 2023
Posts: 23
Hamburg, Germany
Well, I checked the manual again and of course short positions should be possible as well, when I set Trail and Stop variable. Therefore, I still have two issues during short trades. My algorithm for entries are synchron.
1. Trailing does not work for me as it should
2. Live status does not work as it should = Backtesting seems to work correctly..... This seems not logical....

I do further tests and try to figure out why I have this behaviour. Log files. FXCM has no comission, only spread, therefore there is no rocket science behind......


Maybe the error is in front of the screen....?

Last edited by Martin_HH; 05/23/23 15:24.
Re: Wrong Trade Status on HTML page for Trade profits [Re: Martin_HH] #487512
05/24/23 09:08
05/24/23 09:08
Joined: May 2023
Posts: 23
Hamburg, Germany
M
Martin_HH Offline OP
Newbie
Martin_HH  Offline OP
Newbie
M

Joined: May 2023
Posts: 23
Hamburg, Germany
I understood now the trailing functionality correctly with the double distance of the stop and trail value. I will further test, but it will be ok.
There is still the issue with the wrong html status. This I cannot explain, but I will continue to search:

Last edited by Martin_HH; 05/24/23 09:09.
Re: Wrong Trade Status on HTML page for Trade profits [Re: Martin_HH] #487513
05/24/23 10:36
05/24/23 10:36
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
The belief that FXCM has no commssion might be a reason of a wrong profit. Make sure to set the correct commission in the asset list.

Check a trade in the log, and determine where the printed profit deviates from the real profit. And do not confuse phantom and real trades.

Re: Wrong Trade Status on HTML page for Trade profits [Re: Martin_HH] #487514
05/24/23 16:26
05/24/23 16:26
Joined: May 2023
Posts: 23
Hamburg, Germany
M
Martin_HH Offline OP
Newbie
Martin_HH  Offline OP
Newbie
M

Joined: May 2023
Posts: 23
Hamburg, Germany
Danke.
Yes, FXCM has spreads (they call it markups in pips) and rollover. Commission is really zero. I just downloaded via API the AssetFix.csv (asset.csv) and this was confirmed. No commission. And also in the Broker reports no commision, which is the case for many neobrokers novadays as well.
I will check the values of the trades based on this updated AssetFix file in the next days.
For me it was strange that the issue was found for short positions only. The strange thing was that the profit was almost the expected value, but only with an opposite sign.On the other hand it has shown a gain, even when I had a real loss???
I have no explanation for this so far. I will do as you have recommended. Calculate the .log of the trade data from start to the end. I let you know the result of my investigation.

Last edited by Martin_HH; 05/24/23 16:29.
Page 1 of 2 1 2

Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1