Gamestudio Links
Zorro Links
Newest Posts
NOMAX undeclared identifier.
by qin. 01/09/26 00:20
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 01/07/26 15:14
Zorro locks DLL
by jcl. 01/07/26 13:33
zorro with ccxt?
by qin. 01/07/26 07:50
The new evaluation system
by jcl. 01/05/26 08:50
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (qin), 3,224 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Namitha_NN, Syndrela, agasior, mosfet, MonsterX
19188 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Automatic price rounding and chart display inconsistency #489081
Yesterday at 09:49
Yesterday at 09:49
Joined: Jan 2022
Posts: 73
Budapest
N
NorbertSz Offline OP
Junior Member
NorbertSz  Offline OP
Junior Member
N

Joined: Jan 2022
Posts: 73
Budapest
Hello,

I am encountering a confusing and apparently inconsistent price-rounding behaviour in Zorro.

When placing limit entries, stop loss and take profit levels, Zorro seems to internally round the actual order prices. On top of that, the rounded execution prices are sometimes inconsistent with what is visually displayed on the chart.

Entry rounding (yellow marks):
  • I placed the limit order at 1.27162
  • The console log reports that the trade was opened at 1.27200
  • Visually, the chart also shows the entry at 1.27200


TP rounding mismatch (blue marks):
  • I placed the TP at 1.27317
  • The console log reports that the trade was closed at 1.27317
  • Visually, the chart shows the close at 1.27300


So in this second case, the console and the chart do not even agree with each other.
  • Why are order prices rounded at all?
  • What rounding logic is used for entry, SL and TP prices?
  • Why can the chart display differ from the console log?
  • Which one reflects the actual executed price?
  • How can one make visual display and actual execution strictly consistent?


Additional details:
  • Version: 2.70
  • Fill mode not set (left as default)
  • Spread = Commission = Slippage = RollLong = RollShort = 0 (for testing)
  • all trade price variables (Entry, Stop, TakeProfit) are double
  • set(LOGFILE, PLOTNOW, TICKS); so intrabar entry/exit is enabled


Thank you for your clarifications.

Attached Files rounding.png
Last edited by NorbertSz; Yesterday at 09:53.
Re: Automatic price rounding and chart display inconsistency [Re: NorbertSz] #489082
Yesterday at 20:03
Yesterday at 20:03
Joined: Jan 2022
Posts: 73
Budapest
N
NorbertSz Offline OP
Junior Member
NorbertSz  Offline OP
Junior Member
N

Joined: Jan 2022
Posts: 73
Budapest
Sorry, it was my configuration mistake.
When I printed PIP, I noticed that its value was 0.01, which is wrong for GBPUSD.

The reason is that I was not using Zorro’s built-in history, but instead loaded my broker’s own historical data under the symbol “GBPUSD”.
However, in Zorro’s packaged history data the symbol is “GBP/USD”, and in the AssetFix list has this exact symbol.
But there is no entry for “GBPUSD”.
Therefore no asset parameters were found for my symbol, and Zorro apparently fell back to the default, which was PIP = 0.01.

Zorro actually even warned me about this in the logs, and I overlooked:
"Warning 034: GBPUSD not in asset list"

However, there is still something that appears to be a bug.

In my ZorroFix.ini I have:
Code
HistoryFolder = "myHistory"

But regardless of what I put into "myHistory/AssetFix.csv", Zorro always use the file "History/AssetFix.csv".
So the custom AssetFix file in the custom history folder seems to be ignored.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1