The only ways I can think of doing this are:
- Store the fib name and current timeframe when you create each fib. Your method of storage will have to cope with terminal restarts and chart timeframe changes. So maybe look at global variables or writing to file.
- Change the fib name when you create it to include the timeframe e.g. Fibo1677 becomes Fibo1677 - PERIOD_H1.
- Add the current timefame to the description when you create the fib. But, this may be a problem if you display object descriptions. Or maybe a bonus if you want to be reminded visually?
- Set the visibility of the fib to the current timeframe when you create it. This will then be your reference for the timeframe it was created on. But, this is a problem if you want to see your fib on other timeframes.
- Change the fib name when you create it to include the timeframe e.g. Fibo1677 becomes Fibo1677 - PERIOD_H1. You can't actually rename an object, so you will need to create a new object with the new name and then delete the old one.
You can't rename an object?
You can in mq4, don't know about mq5
You can't rename an object?
You can in mq4, don't know about mq5
ObjectSetString() with OBJPROP_NAME in mq4
Haha, thank you very much! Every day is a school day.
Very early on I had read that you couldn't rename objects and I just took that as a given from that point forward. With no real need for it, I never explored it.
Haha, thank you very much! Every day is a school day.
Very early on I had read that you couldn't rename objects and I just took that as a given from that point forward.
Haha, thank you very much! Every day is a school day.
Very early on I had read that you couldn't rename objects and I just took that as a given from that point forward. With no real need for it, I never explored it.
Having explored this a little more today, it would seem that OBJPROP_NAME does trigger a CHARTEVENT_OBJECT_DELETE followed by a CHARTEVENT_OBJECT_CREATE.
So, the "renaming" is actually just a convenient way of deleting the old object and creating a new one.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I draw some Fibos at 5Min, 15Min, 1H and 1Day, I use the function ObjectsTotal() and it sends me 12 and it's OK, but I want to know for example:
Fibo1677 was draw at 5Min Period
Fibo 1900 was draw at 1H Period
Fibo 1873 was draw at 15Min Period
Fibo 1123 was draw at 5Min Period
Fibo 7125 was draw at 1H Period.... etc etc
Beforehand, thank you