Forum

Disable chart scaling

I try to disable chart scrolling and scaling by the ChartSetInteger function with the property CHART_KEYBOARD_CONTROL (in MT4). Disabling scrolling is successful in this way, but unfortunately scaling cannot be disabled in this way. Every time you press "+" or "-" on the numeric keypad, the chart

Price scale changing

Can we detect that the scale of the price axis has changed when the price rises/falls outside the original interval on the price axis? I thought this should be handled by a function OnChartEvent with id CHARTEVENT_CHART_CHANGE, but unfortunately not

What derived class

I need to have a base class and several classes derived from that base class. Since the derived classes are derived from the base class, I can assign the variable (pointer) of any derived class to the variable (pointer) of the base class. So far, everything is clear. Is there any way to find out

STAT_MIN_MARGINLEVEL

I'm a little bit stuck with the function TesterStatistics (STAT_MIN_MARGINLEVEL). The documentation says the function returns "Minimum value of the margin level". What this exactly mean? I thought that the value is the minimum margin level but it seems to me it's not true. If I run a backtest where

Pointer to the function

Is there a possibility to set a pointer to the function as a class method (not a static method )? This example is without problems but only with a static method: typedef void (*TAction)(); class Foo { private : TAction m_Action; public : Foo( void ) {m_Action=Bar;} static void Bar() {

A custom indicator as a resource

A custom indicator included as a resource slow down 60 times tester against using the same indicator with the same inputs (not as a resource). Is it a bug? Or am I doing something wrong? Here is a simple EA so you can try it: #define INDI_AS_RESOURCE // If you want to run the EA without a resource

Parent destructor override

I want to use classes inherited from CChartObject (Metaquotes standard library ). For example, I want my script to draw a trend line by using CChartObjectTrend class. But the parent class (CChartObject) destructor contains deleting the object. That means when the script is ended the trend line is

Get indicator's buffer color

Hello everyone, I'm looking for a function in MQL4 that returns a color of a specific indicator's buffer. Something like PlotIndexGetInteger(plotNr,PLOT_LINE_COLOR) in MQL5. I know there is a constant indicator_colorN but if I change the color in the input window (tab colors) the indicator_colorN is

Leverage for each symbol

I know it isn't a new problem but with new ESMA rules (about leverages) it became "interesting" for me. Generally now we have a different leverage for each symbol. But I know only the function AccountLeverage() (or with the same result AccountInfoInteger(ACCOUNT_LEVERAGE) ) that provides something

Is there any way to load programmatically entire history (of a Symbol and a Period) from server?

I'm looking for programmatically solution of loading entire history for a symbol and a timeframe from server. I can do it manually by opening a chart with the required symbol and the required timeframe and then (unlock Scroll the chart button) by pressing Home and multiple pressing PgUp until I get