MACD histogram direction change help - page 2

 
fabian waldo:

Hi Radic, 

 

Do you know how I can get arrow to display on current candle - I have tried changing  "for(int i=limit; i>-0; i--)" to "for(int i=limit; i>=0; i--)" but this did not work... any thoughts please...? :)

 

Thanks 

If you want it to be displayed on the current bar/candle too, that change will do. But if you want to display it on a bar/candle different from the bar/candle where it happened, why would you do that (change where it is displayed)? What you intend to do (if I am not mistaken) is usually referred to as "repainting" or "placing signals at false places" - a thing that is considered to be a very bad practice regardless of what is the intention.

PS: I am assuming that the question was addressed to me (even though I am Rakic not Radic)
 
Mladen Rakic:
If you want it to be displayed on the current bar/candle too, that change will do. But if you want to display it on a bar/candle different from the bar/candle where it happened, why would you do that (change where it is displayed)? What you intend to do (if I am not mistaken) is usually referred to as "repainting" or "placing signals at false places" - a thing that is considered to be a very bad practice regardless of what is the intention.

PS: I am assuming that the question was addressed to me (even though I am Rakic not Radic)

My apologies Rakic*,

Yes I want it to display on the bar after it occured (so if it happen on candle 7, I would like arrow displayed on candle 6. This is because I am using it for visual entry points to help develop my strategy - and this makes it a lot easier to see at exactly which point trade would be opened. 

Can I ask why and what are the implications for 'placing signals at false places'. Is it not a case of just changing creation of arrow to bar/candle +/-1... ?

How would I go about doing this as I am yet to find an answer on forums or anywhere online and everything I have tried has not worked?

 

Many thanks for your help Rakic! :) 

 
fabian waldo:

My apologies Rakic*,

Yes I want it to display on the bar after it occured (so if it happen on candle 7, I would like arrow displayed on candle 6. This is because I am using it for visual entry points to help develop my strategy - and this makes it a lot easier to see at exactly which point trade would be opened. 

Can I ask why and what are the implications for 'placing signals at false places'. Is it not a case of just changing creation of arrow to bar/candle +/-1... ?

How would I go about doing this as I am yet to find an answer on forums or anywhere online and everything I have tried has not worked?

 

Many thanks for your help Rakic! :) 

What you are describing is repainting 101. Better not to do that (if nothing else, that would be deliberate misleading of anybody else using the indicator)
 
Mladen Rakic:
What you are describing is repainting 101. Better not to do that (if nothing else, that would be deliberate misleading of anybody else using the indicator)
From my understanding repainting is using future information to change an already determined outcome (in this case the arrow). However no future information will be used to redetermine display of arrow, I merely want it to be displayed on the candle after it happened (everytime)
 
fabian waldo:
From my understanding repainting is using future information to change an already determined outcome (in this case the arrow). However no future information will be used to redetermine display of arrow, I merely want it to be displayed on the candle after it happened (everytime)
Why is displaying the signal at the place where it actually happened something that you want to change?

In any case, if it happens on the current bar, you don't have where to display it - you are lacking a bar where to pin it.
 
Mladen Rakic:
Why is displaying the signal at the place where it actually happened something that you want to change?

In any case, if it happens on the current bar, you don't have where to display it - you are lacking a bar where to pin it.

I would like arrow to represent where trade would be opened rather than bar before. 

If arrow is not calculated and displayed till candle is closed is there not a function that can just draw arrow on the following candle?

 
fabian waldo:

I would like arrow to represent where trade would be opened rather than bar before. 

If arrow is not calculated and displayed till candle is closed is there not a function that can just draw arrow on the following candle?

You can simply use buffer shift (and have the arrow displayed on the future bar)
Reason: