Login Page - Create Account

Support Board


Date/Time: Fri, 29 Mar 2024 09:04:40 +0000



PositionData.PriceHighDuringPosition And PositionData.PriceLowDuringPosition

View Count: 284

[2022-05-18 16:36:12]
Richard Chinn - Posts: 28
RE: s_SCPositionData PositionData;        
sc.GetTradePosition(PositionData);
PositionData.PriceHighDuringPosition AND PositionData.PriceLowDuringPosition

I am not sure of the correct behavior for these two items.
The PriceHighDuringPosition and PriceLowDuringPosition return -inf until the position experiences a high or low different from the entry price.
I would expect an initial default to a price value like the entry price.

Is this the correct behavior?

It does not cause any errors in my code but it does skew my calculations by not having a value until after a high or low different from the open price is experienced.

Thanks,
Richard
[2022-05-30 08:48:42]
Sierra Chart Engineering - Posts: 104368
Not sure you would see those particular values. We would think they would be 0 or DBL_MAX. DBL_MAX would indicate that the variables are in unset state. The entry price does not set those variables.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2022-05-30 08:49:03

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account