Login Page - Create Account

Support Board


Date/Time: Sat, 04 May 2024 13:33:22 +0000



Post From: Potential Error with Position avg - specific to when you add volume profile to trading dom

[2019-06-22 05:52:12]
enemyspy - Posts: 304
Ok I did More Testing. I was originally using sc.GetTradePositionForSymbolAndAccount() due to different trade/quote symbol. I tried Testing sc.GetTradePosition() this time. Here Are my observations:

The Chart Settings used:

Symbol: GC-201908-NYMEX
Trade And Quote Symbol : MGC-201908-NYMEX-USD-10
Chart Settings >> Advanced Settings3 >> Open Position Average Price : Use Theoretical Position Average


Observations:

1. Filling the s_SCPositionData using sc.GetTradePosition():
-The AveragePrice member does indeed match what is displayed.
-However it is using the tick value of GC instead of MGC to caclulate the PL (10x > what it should be)

2. Filling the s_SCPositionData using sc.GetTradePositionForSymbolAndAccount(PositionData, sc.GetTradeSymbol(),sc.SelectedTradeAccount):
-The AveragePrice member does not match what is displayed on the Dom unless you are using the default FIFO method.
-It is using the tick value of GC instead of MGC to caclulate the PL (10x > what it should be).

Unless I have gone completely crazy (which there is a good chance of), There might be some cross references of the symbols when the struct gets filled. Did you try testing it that way?
Date Time Of Last Edit: 2019-06-22 05:52:59