How to keep y-axis from auto-adjusting?

I am entering orders long/short into the market directly from the chart by detecting a shift key / left mouse click combo.

The problem I'm having is that, when the market is moving fast, the y-axis will auto-adjust to try to keep the the price bars within view before the real-time price actually goes above or below the boundaries of the y-axis (auto-adjustment of the y-axis is what I call it). So what's happening is that prices are literally shifting out from under me and I cannot click on the price I want quickly without having a fixed y-axis (i.e., no auto-adjusting).

Is there any way to keep the y-axis from auto-adjusting?

Thanks.

Not thoroughly tested but maybe something like this.
I don’t use intraday data but it seems to work on bar replay.

KbdLShft = GetAsyncKeyState( 160 ) < 0; // Left Shift key down
if( KbdLShft )
{
    MinY = Status( "axisminy" );
    MaxY = Status( "axismaxy" );
    SetChartOptions( 1, 0, chartGridMiddle, MinY, MaxY );
}
else
{
    SetChartOptions( 1, 0, chartGridMiddle, 0, 0 );
}
2 Likes

Thanks John.

I'll give it a try, see how it works out on a 5 sec NQ chart next week.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.