ccou:
Why does ObjectFind() never find my object??
It does.
You are not interpreting the return code of ObjectFind() properly.
Consider the what the documentation says:
If successful the function returns the number of the subwindow (0 means the main window of the chart), in which the object is found. If the object is not found, the function returns a negative number. To read more about the error call GetLastError().
Hello,
Try this:
double t_SL[1]; t_SL[0]= Bid; ObjectCreate("t_SL"+IntegerToString(0),OBJ_HLINE,0,0,t_SL[0]); ObjectSet("t_SL"+IntegerToString(0),OBJPROP_PRICE1,t_SL[0]); if(ObjectFind("t_SL"+IntegerToString(1))) Comment("Found"); else Comment("Not found");
Thank you very much!!!
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi everyone,
Why does ObjectFind() never find my object??
Thanks!