Draw arrow only when candle closed - page 2

 
Seng Joo Thio:

Nothing, just a "suitable" price level for drawing arrows - you can play around with other values and see what happens.

can i have the arrow still printed even if i have another new one from indicator i made?

 
penguinblaster:

can i have the arrow still printed even if i have another new one from indicator i made?

Yes, that's where Buffer2[i] = <different value> comes in handy... so that arrows from different indicators don't overlap if you don't want them to.

 
Seng Joo Thio:

Yes, that's where Buffer2[i] = <different value> comes in handy... so that arrows from different indicators don't overlap if you don't want them to.

show me what i have to do please.. i need to see the history,, i want to learn it

 
penguinblaster:

show me what i have to do please.. i need to see the history,, i want to learn it

penguinblaster:

iam combining repaint indicator and ma

From the codes you've attached (which cannot be compiled in the first place), it is not repainting and will show history.

So I can't tell you anything more as I don't know what you meant... unless you show me something that I can compile and run, including your repaint indicator.

 
Seng Joo Thio:

From the codes you've attached (which cannot be compiled in the first place), it is not repainting and will show history.

So I can't tell you anything more as I don't know what you meant... unless you show me something that I can compile and run, including your repaint indicator

no problem, thank you, since repaint indicator not so much considered by all.

 

do you know what is this mean ?

else

        {

         Buffer2[i] = 0;
 
penguinblaster:

do you know what is this mean ?

 When you  use if( smth )

{

here you should put not buffer1[] but


value1=x;

}


after if(){} construction you put

buffer1[]= value1;

before Init() initialize it:

int value1 =0;


so, it should be this:


int value1 =0;

...

...

if( smth )

{

value1=1;

}

buffer1[]=value1;

 
penguinblaster:

do you know what is this mean ?

That means when the condition for signal is false, set Buffer1 and Buffer2 to zero (so that nothing is drawn).

 
Seng Joo Thio:

That means when the condition for signal is false, set Buffer1 and Buffer2 to zero (so that nothing is drawn)

thank you.. what if the arrow shows 3 candle closed after crossing, what should i change?

sorry I just dabbled on it :)

Files:
3rd.jpg  88 kb
 
penguinblaster:

thank you.. what if the arrow shows 3 candle closed after crossing, what should i change?

sorry I just dabbled on it :)

Can't comment on that, because that's dependent on your condition and how your "indicatory" works...:

if(iMA(NULL, PERIOD_CURRENT, Period1, 0, MODE_LWMA, PRICE_CLOSE, i) < iCustom(NULL, PERIOD_CURRENT, "indicatory", i)
&& iMA(NULL, PERIOD_CURRENT, Period1, 0, MODE_LWMA, PRICE_CLOSE, i+1) > iCustom(NULL, PERIOD_CURRENT, "indicatory", i+1) //test it

Reason: