stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

'iSubWindow' - undeclared identifier
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=4453
Page 1 of 1
Author:  sheriffonline [ Wed Oct 14, 2015 5:26 pm ]
Post subject:  'iSubWindow' - undeclared identifier

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
Author:  renexxxx [ Wed Oct 14, 2015 7:56 pm ]
Post subject:  'iSubWindow' - undeclared identifier

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.
All times are UTC Page 1 of 1