Showing posts with label Scale Fix. Show all posts
  • On MT4 Scale fix serves to fix the current chart scale. If the scale has not been fixed, the chart will be automatically scaled vertically. This option disables automatic scaling and fixes the current scale. When this option is selected, the fields of additional scaling parameters "Fixed maximum" and "Fixed minimum" are activated.

    This script enables you activate or deactivate that functionality. Set a hotkey(eg. ALT+S) to this script to make it easier for you.

    Scale Fix - MT4 Script
    Scale Fix - MT4 Script

    Here it is, the Scale Fix Script :


    //+------------------------------------------------------------------+
    //| ToggleScaleFix.mq4 |
    //| http://www.fxindi.net |
    //+------------------------------------------------------------------+
    #property copyright "Copyright 2015, www.fxindi.net"
    #property link "http://www.fxindi.net"
    #property version "1.00"
    #property strict
    //+------------------------------------------------------------------+
    //| Script program start function |
    //+------------------------------------------------------------------+
    void OnStart()
    {
    //---
    long chartID = ChartID(), scaleFix;

    //--- receive the property value and do the toggle
    if(ChartGetInteger(chartID, CHART_SCALEFIX, 0, scaleFix))
    {
    //Print("Turned On/Off ScaleFix");
    ChartSetInteger(chartID, CHART_SCALEFIX, 0, !(bool) scaleFix);
    ChartRedraw(chartID);
    }

    }
    //+------------------------------------------------------------------+