Forum

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'

Problems with FileIsEnding()

I am reading data from a csv file but not all of the data is being read. The code I am using is below: #property strict #include <stderror.mqh> #include <stdlib.mqh> datetime open_time; string symb; string type; double lots; double price; void ReadTradeData() { int i = 0 ; int

Unresolved import function call

HI guys, Has anyone else experienced this recently? I have an indicator which I was using perfectly well this morning - I have changed nothing and tonight I get this error while trying to run it: I have enabled dll imports . This has occurred before and I had to reboot the pc to get it to run

Another iMAOnArray problem

Hi Guys, I am trying to extract MA values (with iMAOnArray) when I attach a 13 SMA to the OBV indicator by drag and drop using the First Indicator option: My code is below and the param2 values are all zero. I have read many of the other posts about iMAOnArray and I think I have used it correctly