So in the moment i'm trying to build a indicator in the subwindow using ObjectSetCreate() ObjectSetText() ObjectSet() for text and SetIndexBuffer() SetIndexStyle() SetIndexLabel()
for the indicator.
Problem 1) The line up between a text line and the indicator line change by resizing the subwindow. Any hint to not do that? Thanks.
i created a OBJ_RECTANGLE_LABEL background behind the text so the indicator would not interfere with the text
Problem 2) The OBJ_RECTANGLE_LABEL shows borders i like to have invisible and the only way to do this is with ObjectSetInteger(0,"Backround",OBJPROP_BORDER_TYPE,clrRed);
clrRed??????????? realy???????? clrBlack does not work.
Thanks for any help to make that work.
#property indicator_minimum 0
#property indicator_maximum 100
extern int Frankfurt_Open = 8;
extern int Frankfurt_Close = 16;
int iBarsToCalc = Bars - IndicatorCounted();
if (iBarsToCalc < Bars) iBarsToCalc++;
for (int i=iBarsToCalc-1;i>=0;i--)
if (isMarketOpen(Frankfurt_Open, Frankfurt_Close, Time[i]))
Frankfurt[i] = 67; // 67 is the position from 0 to 100 on the subwindow
Frankfurt[i] = EMPTY_VALUE;
bool isMarketOpen(int iOpenHour, int iCloseHour, datetime timestamp)
int iBarHour = TimeHour(timestamp);
if (iOpenHour < iCloseHour && (iBarHour >= iOpenHour && iBarHour < iCloseHour))
if (iOpenHour > iCloseHour && (iBarHour >= iOpenHour || iBarHour < iCloseHour))
ObjectSetInteger(0,"Backround",OBJPROP_BORDER_TYPE,clrRed); //problem here is using clrRed hide's the border,should not be that way, should be clrBlack or 0
ObjectSetText ("text","Line Up Here ",14,"Tahoma",clrRed);
ObjectSet ("text", OBJPROP_CORNER, 0);
I'm already excited what's coming my way thanks to you all.
It happens because of the use of Time and Price for lines and X and Y for Text to specify the position. I think that you should use the same method for both.
ObjectSetText("text","Line Up Here ",14,"Tahoma",clrRed);
Thanks a lot for your help. It seems to be the right idea to go with, but you see is still not lining up. It seems to move in the same distance by resizing the subwindow.
If i change the settings so they're different from each other, not equal "67" and then resizing the window, the same problem like before, the are moving away from each other.
The other thing is, half the text is not visible.
Here is another thing i just found out, with the cursor over the indicator shows always 67.00000 by resizing the subwindow and by the text it always changes, is not standing on the 67.00000 or never does from the beginning.
I appreciate your help, Thanks very much regards Piero