Login Page - Create Account

Support Board


Date/Time: Sat, 01 Mar 2025 17:33:24 +0000



[Programming Help] - Problem with PositionData.PriceHighDuringPosition

View Count: 408

[2021-10-07 21:07:44]
User890876 - Posts: 3
I'm using PositionData.PriceHighDuringPosition in my trade strategy and despite I have a position that is already filled, this attribute PriceHighDuringPosition return the following value when i print them on the consol:
179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368

any idea what the problem could be ?

code:
if (TradeEntry1.TradeType > 0 ) {
          NewPrice = PositionData.PriceHighDuringPosition - bandwidth;
        }
br
[2021-10-07 22:13:11]
User890876 - Posts: 3
so from the source code, I figured out that it is set to a pre-defined max value called:
#define DBL_MAX 1.7976931348623158e+308 // max value

But why when having a position, the proper PriceHighDuringPosition is not calculated ?

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

Login

Login Page - Create Account