Forum

GlobalVariableSet().....baffling!!!

int OnInit () { Print ( GlobalVariableCheck (price)); if (! GlobalVariableCheck (price)) GlobalVariableSet (price, 0 ); Print ( GlobalVariableCheck (price)); return ( INIT_SUCCEEDED ); } Print statement output. Has anybody seen this before? OK..please let me know what I am doing wrong? thanks

Moving Average vs iMAOnArray

Hello guys, I have a very simple indicator drawn in a subwindow, the code of which is below: #property indicator_separate_window #property indicator_buffers 2 #property indicator_minimum 0 #property indicator_color1 Lime #property indicator_color2 Red double val1[]; double val2[]; double dXecn = 1 ;

Stacked histogram

Hello, I have a very simple histogram indicator displayed in a subwindow. It displays fine unless val2 > val1 then the val2 histogram 'covers' the val1 indicator colour. Is there a simple fix to this? Is there a way to send val2 colour to the background so that both histogram colours show on this

Object delete in chart event

Hi guys, I have an indicator that duplicates horizontal lines across multiple charts on different timeframes. The code to place and move the lines works fine but the code that deletes the lines does not work. #property strict #property indicator_chart_window #include <stdlib.mqh> #include

ChartOpen() problem

hi all, I am closing all open charts and then opening a defined set of charts afterwards. void OnStart () { long nextChart = ChartNext ( ChartID ()); //closes all open charts while (nextChart > 0 || ChartFirst () != ChartID ()) { nextChart = ChartNext ( ChartID ()); if (nextChart > 0 )

VWAP Indicator

Hi guys, I'm trying to produce a VWAP indicator over a daily time period using the 'OnCalculate' event handler as most still use the 'start()' version. After many hours of struggling with this it works about 90%. The indicator does draw on the chart but I get an ' array out of range ' error on this

Problem with chart ID

Hi guys, Have run into a small problem regarding chart ID 's. I have this code in a script: long chart_id; chart_id = ChartOpen ( "GBPUSD" , PERIOD_D1 ); GlobalVariableSet ( "chart_id" ,chart_id); Print (chart_id); This is the 'Print' output: This is the Global

RadioButton Group control

I am creating a radio button group in a separate indicator window on my charts but having difficulty with some of the settings. My code so far: #property indicator_chart_window #include <stderror.mqh> #include <stdlib.mqh> #include <Controls\Dialog.mqh> #include <Controls\RadioButton.mqh> #include

RadioButtons Confusion

I am trying to create some simple radiobuttons and below is my code to create either a single radiobutton using CRadioButton class and comparing to a single creation using CRadioGroup class. #include <Controls\RadioButton.mqh> #include <Controls\RadioGroup.mqh> #include <Controls\Dialog.mqh>

Adding rectanglelabel to a panel

hello guys, I have created a panel with several controls and labels on (code not shown but working) - for aesthetic reasons I wanted to add some separator lines at various places and I am trying to do this with a rectanglelabel purely for ease of being able to use x,y coord placement. The 'Add'