kazuna8
 ( 42.83% )
- ago
I have been working on migrating some of my strategies from WL6 to WL8.
I noticed some differences in the daily data using the same IQFeed provider.

For example:

Date: 2021/12/23
Symbol: TQQQ

Open / High / Low / Close prices from WL8, WL6, and IQFeed Charts:
WL8: 81.08 / 83.64 / 80.98 / 82.74
WL6: 81.09 / 83.65 / 80.99 / 82.74
IQFeed Charts: 81.0850 / 83.6450 / 80.9850 / 82.7400

So it looks like WL8 is rounding down and WL6 is rounding up.
Is there any way to make WL8 the same as WL6?

I want the same prices between WL6 and WL8 to validate the migration.
0
218
Solved
5 Replies

Reply

Bookmark

Sort
Cone8
 ( 5.57% )
- ago
#1
The data from IQFeed in any client application WL4, 5, 6, 7, or 8 will be:
"12/23/2021" 81.085 83.645 80.985 82.74 32827064

Right click the chart, copy the Price data, and paste it somewhere to inspect it.

I'm not sure why the rounding is different - although there are several MidpointRounding options for Math.Round() - the result is only for display and has no effect on a backtest, which is run at full precision.
0
kazuna8
 ( 42.83% )
- ago
#2
Thank you for the advice about the Copy Price Data on the chart.
Yes, the data looks fine on both WL6 and WL8.

After digging into the data between WL8 and WL6, apparently this is a WL6 issue.

On WL6, when I sell at a limit order, the position exit price (Position.ExitPrice) seems to be rounded up.

On WL6:
TQQQ - 2022/01/05 : LimitPrice = 74.675
TQQQ - 2022/01/06 : EntryPrice = 81.085 / ExitPrice = 74.68

On WL8:
TQQQ - 2022/01/05 LimitPrice = 74.675
TQQQ - 2022/01/06 EntryPrice = 81.085 / ExitPrice = 74.675

So WL8 is doing the right thing but WL6 was wrong.
Does it make sense?
0
kazuna8
 ( 42.83% )
- ago
#3
Yeah, it looks like a WL6 issue.

If I do like this on WL8, I get the same results on WL8 as WL6.
ExitPrice = Math.Round(Position.ExitPrice, 2, MidpointRounding.AwayFromZero)
0
Cone8
 ( 5.57% )
- ago
#4
v6 has an Advanced Option in Preferences for Pricing Decimal Places. If you set it to 3 or more, then that test will probably be the same as v8.

I can't remember v6 too well, but this all comes down to the "Tick value", which to 0.01 for stocks in v6 by default. I think that Pricing Decimal Places changes that.
v6 isn't "wrong", it's just a different design.
0
Best Answer
kazuna8
 ( 42.83% )
- ago
#5
Setting the Pricing Decimal Places to 4 on v6 makes the results exactly the same on v8.

Thanks a lot!
1

Reply

Bookmark

Sort