'iSubWindow' - undeclared identifier

Post Reply
sheriffonline
Posts: 6
Joined: Fri Aug 28, 2015 8:09 pm

'iSubWindow' - undeclared identifier

Post by sheriffonline »

Code: Select all

  int iChartID = ChartID ( );
 
  ObjectCreate (iChartID, "ButtonSell", OBJ_BUTTON, iSubWindow, 0, 0);
  ObjectSetInteger (iChartID, "ButtonSell", OBJPROP_XDISTANCE, 10);
  ObjectSetInteger (iChartID, "ButtonSell", OBJPROP_YDISTANCE, 10);
  ObjectSetInteger (iChartID, "ButtonSell", OBJPROP_XSIZE, 50);
  ObjectSetInteger (iChartID, "ButtonSell", OBJPROP_YSIZE, 25);
  ObjectSetString (iChartID, "ButtonSell", OBJPROP_TEXT, "SELL");
Error says: 'iSubWindow' - undeclared identifier
User avatar
renexxxx
Trader
Posts: 860
Joined: Sat Dec 31, 2011 3:48 am

'iSubWindow' - undeclared identifier

Post by renexxxx »

sheriffonline » Thu Oct 15, 2015 3:26 am wrote:
Error says: 'iSubWindow' - undeclared identifier
That is probably because you don't have anywhere in your code a line:

Code: Select all

int    iSubWindow = 0;
The sub_window parameter in ObjectCreate refers to the panel onto which you want to create the object. If sub_window == 0, the object is created on the main panel. sub_window == 1, 2 and above refer to the panels underneath the main panel, created by (custom) indicators.
Post Reply

Return to “Coders Hangout”