Download MetaTrader 5
To add comments, please log in or register
MQL5 Reference is available in 8 languages. Learn MQL5 in the language that suits you best!
TradeMachine
57
TradeMachine 2012.07.09 11:54 

Dear Experts,

I encounter the issue that the Lines are drawn into the "first Window" but not into the Window where I want them to be seen...

So: I´m doing this for PERIOD_15, PERIOD_H1...:

//SNAP

.....

   if(CopyRates(_Symbol,PERIOD_M15,0,500,rates_M15)<0)
     {
      Print("Error copying rates/history data H1 (TradeMachine) - error:",GetLastError(),"!!");
      ResetLastError();
      return;
     }

....

Then I´m declarating:

.....

CChartObjectTrend    Down_uL; 

.....

And then I´m drawing:

...

        Up_uL.Create(0,"Down_uL"+ name,0,....)

...

And then the line(s) is(are) drawn into the PERIOD_M15 Window  in the Strategy Tester....



...but I´d like to see the lines in the EURUSD, Daily Window.

Can you explain to me what I have to change?

Thank you so much for your support!

Best,

Thomas

meisme
39
meisme 2012.07.11 10:04  

Hi,

Based on document here:

https://www.mql5.com/en/docs/standardlibrary/chart_object_classes/obj_lines/cchartobjecttrend/cchartobjecttrendcreate

You can draw the object to certain chart_id and window.

bool  Create(
   long      chart_id,     // Chart identifier
   string    name,         // Object name
   int       window,       // Chart window
   datetime  time1,        // 1st time coordinate
   double    price1,       // 1st price coordinate
   datetime  time2,        // 2nd time coordinate
   double    price2        // 2nd price coordinate
   )


Cheers.




Documentation on MQL5: Standard Library / Classes for Graphic Objects / Objects Lines / CChartObjectTrend / Create
  • www.mql5.com
Standard Library / Classes for Graphic Objects / Objects Lines / CChartObjectTrend / Create - Documentation on MQL5
/
To add comments, please log in or register