Can I show info in a separate window in an EA?

 

Hi everyone,

If I don't have a separate window from any indicator, am I able to create a new window from EA to show info/debug msg

void iDraw(string name, string text, int x, int y, color c, string font, int size, 
                int corner, int angle=0, bool back=false)
{
   ObjectDelete(name);
   ObjectCreate(name,OBJ_LABEL,WINDOW_MAIN,0,0);
   ObjectSetText(name,text,size,font,c);
   ObjectSet(name,OBJPROP_XDISTANCE,x);
   ObjectSet(name,OBJPROP_YDISTANCE,y);
   ObjectSet(name,OBJPROP_CORNER,corner);
   ObjectSet(name,OBJPROP_ANGLE,angle);
      
   if(back) ObjectSet(name,OBJPROP_BACK,true);
}

I am using above codes to draw objects on EA chart.

Is there anyway I can create a new window, many thanks.

 
holdenmcgorin:

Hi everyone,

If I don't have a separate window from any indicator, am I able to create a new window from EA to show info/debug msg

I am using above codes to draw objects on EA chart.

Anyway I can create a new window, many thanks.

Are you asking question or telling something ???

Write an Indicator separate window, define it's maximum and minimum values - so it will be opened ...

#property indicator_separate_window
#property indicator_minimum 0
#property indicator_maximum 100 // or whatever

Change this only code ...

ObjectCreate(name,OBJ_LABEL,WindowFind (WindowExpertName()),0,0);

... then attach this CI and the EA using template :)

Sample at bottom of https://www.mql5.com/en/articles/1378

 

wow, big thanks.

it is more than expected, cheers :)

 
holdenmcgorin:

wow, big thanks.

it is more than expected, cheers :)

You're welcome :)

I won't edit my reply though :)

 

lol

thumb up

Reason: