Learning to draw lines... the new way

Back to topics list To post a new topic, please log in or register
avatar
147
nondisclosure 2015.04.03 04: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.


avatar
147
nondisclosure 2015.04.09 01:21 #
 
Really?  Not even anyone from Metaquotes can answer this?
avatar
147
nondisclosure 2015.04.09 01:43 #
 
Ok.  So you can't create objects in a script anymore.  Thanks for the info.
Back to topics list  

To add comments, please log in or register