Attachments forums

List of attachments posted on this forum.


All files on forums: 135270

Re: Coding Help

mladen, Sun Nov 19, 2017 4:22 am

wojtek wrote: Sun Nov 19, 2017 3:29 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...
Wojtek

Try it out now
All files in topic