gsudariojr:
Returns the number of objects ObjectsTotal, and ENUM_OBJECT = OBJ_ARROWED_LINE or another type.how to calculate the total number of arrows on the chart and put an alert when emerging a new arrow
Karputov Vladimir:
Returns the number of objects ObjectsTotal, and ENUM_OBJECT = OBJ_ARROWED_LINE or another type.
Show me an example please :/
Returns the number of objects ObjectsTotal, and ENUM_OBJECT = OBJ_ARROWED_LINE or another type.
Please.
Advisor counts the number of objects in a given sub-window:
//+------------------------------------------------------------------+ //| ObjectsTotal.mq5 | //| Copyright © 2015, Vladimir Karputov | //| http://wmua.ru/slesar/ | //+------------------------------------------------------------------+ #property copyright "Copyright © 2015, Vladimir Karputov" #property link "http://wmua.ru/slesar/" #property version "1.00" #property description "Returns the number of objects of the specified type." //--- input input ENUM_OBJECT inpObject=OBJ_ARROW_THUMB_UP; // object type input int inpSub_Window=-1; // window index //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { //--- int intCount=ObjectsTotal(0,inpSub_Window,inpObject); string count_windows=""; if(inpSub_Window==-1) count_windows="all subwindows"; else count_windows="subwindow № "+IntegerToString(inpSub_Window); string text="On the chart in "+count_windows+" is "+IntegerToString(intCount)+" "+EnumToString(inpObject); Alert(text); //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { //--- } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { //--- } //+------------------------------------------------------------------+
Vladimir Karputov:
Please.
Advisor counts the number of objects in a given sub-window:
Thanks!
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
how to calculate the total number of arrows on the chart and put an alert when emerging a new arrow