Draw arrow or line

 

Hello!

How can I make option of drawing arrow or line? I tried like this but it does draw arrows but not lines. Any idea?

extern int Style=1;
int init(){
   if (Style==2){
      SetIndexStyle(2, DRAW_ARROW);// UP
      SetIndexArrow(2, 233);
      SetIndexBuffer(2, bullish);
      SetIndexStyle(3, DRAW_ARROW);// DOWN
      SetIndexArrow(3, 234);       
      SetIndexBuffer(3, bearish);
      SetIndexStyle(1, DRAW_ARROW);// UP
      SetIndexArrow(1, 233);
      SetIndexBuffer(1, bullish2);
      SetIndexStyle(0, DRAW_ARROW);// DOWN
      SetIndexArrow(0, 234);       
      SetIndexBuffer(0, bearish2);
   }
   else if(Style==1){
      SetIndexStyle(2, DRAW_LINE);//UP
      SetIndexBuffer(2, bullish);
      SetIndexStyle(3, DRAW_LINE);// DOWN
      SetIndexBuffer(3, bearish);
      SetIndexStyle(1, DRAW_LINE);// UP
      SetIndexBuffer(1, bullish2);
      SetIndexStyle(0, DRAW_LINE);// DOWN
      SetIndexBuffer(0, bearish2);
   }
   return(0);
}
 
01005379:

Hello!

How can I make option of drawing arrow or line? I tried like this but it does draw arrows but not lines. Any idea?



Hey! I really need some help! Thank you!
 
01005379:


Hey! I really need some help! Thank you!

Anyone, please.
 
I'd really like to help you but indicators are Not my strong suit. It's the final chapter for me in The Book and I just started reading on indicators. Here's a suggestion in the mean-time try flipping the DRAW_ARROW with the DRAW_LINE and report back here if it draws line. Also, don't you need some form of Buffer ex)  SetIndexBuffer(1, bullish2[i]);
Reason: