Ich habe das ganze nun mal in eine Funktion gepackt (mache ich zunmindest immer so) aber ich bekomme immer noch kein "Ergebnis", im Sinne eines Prints, geschweige denn, wenn ich mit "Trend" weiterarbeite.
Code:
string Trend;
string up, down;
string Rect1Name = "FXVTF1";
string Rect2Name = "FXVTF2";
string Rect3Name = "FXVTF3";
long UpColor = 16711680;
long DnColor = 255;
string FXVTF()
{
if( ObjectGetInteger(0,Rect1Name,OBJPROP_COLOR) == UpColor
&& ObjectGetInteger(0,Rect2Name,OBJPROP_COLOR) == UpColor
&& ObjectGetInteger(0,Rect3Name,OBJPROP_COLOR) == UpColor)
{
Trend = up;
}
if( ObjectGetInteger(0,Rect1Name,OBJPROP_COLOR) == DnColor
&& ObjectGetInteger(0,Rect2Name,OBJPROP_COLOR) == DnColor
&& ObjectGetInteger(0,Rect3Name,OBJPROP_COLOR) == DnColor)
{
Trend = down;
}
else Trend = "";
Print(Trend);
return(Trend);
}
Habe ich doch noch was falsch verstanden?
Grüße