Thread: How to code?
View Single Post
  #880 (permalink)  
Old 05-08-2008, 02:15 AM
FerruFx FerruFx is offline
Senior Member
 
Join Date: Feb 2007
Posts: 876
FerruFx is on a distinguished road
Quote:
Originally Posted by Michel View Post
An arrow can be drawn as a value of one of the indicator's buffers; in this case, the color in the indicator's properties should give you the buffer's number, which is enough to call it by "ICustom()" function; You also need to fill all the values of the "Input" tab as parametres of the ICustom() call.
If the arrow is not a value of a buffer, it is an object. Select it to see its properties. Most of the time, it's easy to understand how the names are generate and then it will be possible to use ObjectFind().
The EA should watch ObjectsTotal(), and only when it is incremented it may try to recognize the last object. If the name is unknow, the EA cannot use OjectFind() and has to scan all objects to identify the last one. The last object is not obviously the one with the highest index (ObjectsTotal() - 1), but it's better to start to scan from the higest index as you probably can break faster. Now you have to compare the OBJPROP_TIME1 get by ObjectGet() to Time[0] or Time[1] for exemple, and check the color or the arrow type, or a substring of the name, to identify a buy or a sell signal.
It seems complex but it is not. Try to write it and dont hesitate to ask more precisions if needed.
Great explanation Michel ... 100% more complete than mine !

Thanks for who is interested.

FerruFx
__________________
THE HEART of FOREX & THE PROBABILITY METER - Trade with 100% confidence and ... Stress Less!!!
Coding services: Experts Advisors, indicators, alerts, etc ... more info by PM
NEW: video presentation of the Probability Meter ... 24hrs action on the website
Reply With Quote