How to Draw Arrow using Buffer

 

Hi everyone,

I am trying to show arrow once the bearish pattern is found but my code is not giving me any error nor even it is showing anything on chart. Please read the below code and your help is very much appreciated.


Many thanks.

Documentation on MQL5: Constants, Enumerations and Structures / Indicator Constants / Drawing Styles
Documentation on MQL5: Constants, Enumerations and Structures / Indicator Constants / Drawing Styles
  • www.mql5.com
When creating a custom indicator, you can specify one of 18 types of graphical plotting (as displayed in the main chart window or a chart subwindow), whose values are specified in the ENUM_DRAW_TYPE enumeration. Depending on the drawing style, you may need one to four value buffers (marked as INDICATOR_DATA). If a style admits dynamic...
Files:
Code.mq4  4 kb
 
Ephor Daps: but my code is not giving me any error nor even it is showing anything on chart. 
  1. Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
              General rules and best pratices of the Forum. - General - MQL5 programming forum 2019.05.06
              Messages Editor

  2.       if(O2<C2 && O1>C1 && O2>C1){ ArrowsBuffer[i]=C1;
               }
             else                      ArrowsBuffer[i]=0;
    Unless the last TF you check is true, you've set your buffer to zero.
 
William Roeder:
  1. Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
              General rules and best pratices of the Forum. - General - MQL5 programming forum 2019.05.06
              Messages Editor

  2. Unless the last TF you check is true, you've set your buffer to zero.

Many thanks William for your prompt reply and guiding me. Really appreciate that.


I am sorry I am not good in OOP and trying to learn it. I have removed else part of the program but still its not working. Could you please help me make it working? Thanks.

 
In future please post in the correct section
I will move your topic to the MQL4 and Metatrader 4 section.
 
Keith Watford:
In future please post in the correct section
I will move your topic to the MQL4 and Metatrader 4 section.
I am really sorry Keith, I thought it is the right section to post. Thanks for your guidance.
Reason: