Login Page - Create Account

Support Board


Date/Time: Sat, 18 May 2024 22:04:30 +0000



Post From: Setting the Constant Range Scale Mode in ACSIL

[2017-05-30 07:44:02]
Sporken - Posts: 82
Hi,

In ACSIL is there a way to change the Scale Settings -> Constant Range Scale Mode?

In Scale settings we see a drop down list with options "Manual Mode", "Keep the last bar in view", "Recenter to the last bar on every update", "Recenter to the last price on every update", "Recenter when the last bar exceeds a certain number of ticks from the center"

I see functions for setting the Scale Range Type and the Const Range value but not for setting the Constant Range Scale Mode.

      sc.BaseGraphScaleRangeType = SCALE_CONSTANT_RANGE;
      sc.BaseGraphScaleConstRange = (sc.Open[sc.ArraySize - 1] * the_percent) / 100.0f;

At scconstants.h:440 I see these enumerations:

enum ScaleConstantRangeModeEnum : int
{ CONST_RANGE_MODE_MANUAL = 0
, CONST_RANGE_MODE_AUTO_CENTER_LAST_BAR = 1
, CONST_RANGE_MODE_AUTO_CENTER_LAST_PRICE = 2
, CONST_RANGE_MODE_AUTO_KEEP_LAST_BAR_WITHIN_TICKS_FROM_EDGE = 3
, CONST_RANGE_MODE_AUTO_CENTER_WHEN_BAR_BEYOND_TICKS_FROM_CENTER = 4
};

But I cannot see a function for setting these modes.

I made a study which allows me to set all my charts to the same scale %, its very useful for comparing symbols side-by-side, but when I set sc.BaseGraphScaleRangeType = SCALE_CONSTANT_RANGE; The constant range scale mode defaults to "Re-Center to the last bar on every update".

Thanks for your help,

-Jason
ps. thank you for the very significant developments to memory usage etc. I've found the loading behaviour to be really excellent recently.