Last active
June 19, 2020 14:16
-
-
Save fxindi-net/72b0a13870a267fbb4ff to your computer and use it in GitHub Desktop.
Toggle Scale Fix - MT4 Script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//+------------------------------------------------------------------+ | |
//| 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); | |
} | |
} | |
//+------------------------------------------------------------------+ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment