Attachments forums

List of attachments posted on this forum.


All files on forums: 70359

Re: Coding Help

wojtek, Sun Nov 19, 2017 3:28 am

Dear Mladen,

how to introduce the (general) function to the code of the enclosed indicator
to switch between all the arrows and the selected arrows visible (as in the screen)?
The function should draw only the first arrow in the sequence of the arrows with the same color.
I mean the general function - which can be used in each indicator of that kind.

I'm trying to do this using the following code:

Code: Select all

if(ArrUp[i] != EMPTY_VALUE){
                  for(k = 1; k <= Bars-1; k++){
                       if(ArrUp[i+k] != EMPTY_VALUE)
                         {ArrUpSel[i] = EMPTY_VALUE; break;}
                       if(ArrDn[i+k] != EMPTY_VALUE)
                         {ArrUpSel[i] = High[i] + ... ; break;}
                       }
                 }
      
if(ArrDn[i] != EMPTY_VALUE){
                  for(k = 1; k <= Bars-1; k++){
                       if(ArrDn[i+k] != EMPTY_VALUE)
                         {ArrDnSel[i] = EMPTY_VALUE; break;}
                       if(ArrUp[i+k] != EMPTY_VALUE)
                         {ArrDnSel[i] = Low[i] - ... ; break;}
                       }  
                 }
but it doesn't work properly, unfortunately...
#Stochastic_Cross_Alert_SigOverlayM_cw.mq4
(5.93 KiB) Downloaded 474 times
EURUSDM5.png
All files in topic