Download MetaTrader 5
To add comments, please log in or register
Manage agents in your profile. It is easy!
Michael
492
Michael 2015.04.03 02:51 

Ok.  I'm trying to learn how to draw lines using the classes provided by MQL4.  I put this in a script to attempt to just draw a simple line.  But when I drop it on the chart, I don't get an object created. 

Can someone show me what I'm doing wrong?

#property strict
#include <ChartObjects\ChartObjectsLines.mqh>

CChartObjectVLine myVLine;
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//---
   myVLine.Create(ChartID(),"tester",0,Time[3]);
   myVLine.Color(clrYellow);
  }
Before anyone asks, yes this is not the final product I'm trying to create.  I want to LEARN first, then create.
Michael
492
Michael 2015.04.08 23:21  
Really?  Not even anyone from Metaquotes can answer this?
Michael
492
Michael 2015.04.08 23:43  
Ok.  So you can't create objects in a script anymore.  Thanks for the info.
/
To add comments, please log in or register