Login Page - Create Account

Support Board


Date/Time: Sun, 24 Nov 2024 21:08:30 +0000



[Programming Help] - Intermittent odd scaling issue with Study

View Count: 101

[2024-10-24 12:55:03]
User846000 - Posts: 27
Hi,

I have been trying to work out an issue with what seems to be some kind of scaling problem with an ASCIL study I have built. Sometimes it works on a fresh build of the study from source perfectly. However the next time I open the chartbook up/restart SC, on either my existing installation or a fresh install for testing I get the same error with the scale or price multiplier (see screenshots). All the study does is measure and point at a price where a limit order or MBO order book event is taking place. I know it works on at least once, but after a restart it fails, It doesnt change behavior either if I use OpenGL or not.

I think it is something to do with price multiplier or scale, whether its in Global settings or Chart settings there seems to be an issue.

Screenshot 1: Shows the study is valid and working, it would just show a line pointing at the price level on the Chart DOM, however for some reason it is multiplied by 10x as seen on the Chart Values Tool.
Screenshot 2: Shows what it looks like on a fresh build of the source - working
Screenshot 3: Shows the fresh install of SC with no globals or any other changes to the Symbol settings as they are from Denali

I've tried different scale settings as well and the only thing I can ascertain is this symbol multiplier might be it from the Symbol settings as we are using different services. But note for some reason mine works fine if I rebuild from source each time regardless of the setting, but not on restart.

I fee like I've exhausted the options I have, what else could it be?

Thanks
Tim
Private File
Private File
Private File
[2024-10-24 22:37:06]
User846000 - Posts: 27
Update: I have solved this by using a list of price multipliers as the simplest option to scale the study to the price levels:

// Retrieve the selected scaling factor from the drop-down list
int ScalingFactorIndex = Input_PriceScalingFactor.GetIndex();
switch (ScalingFactorIndex)
{
case 0: PriceScalingFactor = 0.0001; break;
case 1: PriceScalingFactor = 0.001; break;
case 2: PriceScalingFactor = 0.01; break;
case 3: PriceScalingFactor = 0.1; break;
case 4: PriceScalingFactor = 1.0; break; // Default
case 5: PriceScalingFactor = 10.0; break;
case 6: PriceScalingFactor = 100.0; break;
case 7: PriceScalingFactor = 1000.0; break;
case 8: PriceScalingFactor = 10000.0; break;
default: PriceScalingFactor = 1.0; break; // Safety default
}

No longer an issue.

Thanks
Tim

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

Login

Login Page - Create Account