Why do My INDICATOR repaints - page 2

 
Mladen Rakic:

Does it? I have a suggestion then : why don't we leave the current bar out of the chart completely? That way nothing will "repaint" and we will not be "confused" why the hell does the current indicator value change when the current price changes too


That changing is not repainting. Repainting is and always was a coding error. Limiting the work of any tool to only closed bars because the current bar "repaints" is not leading to any meaningful solution. Using signals for a closed bar is a widely accepted solution but if you use open price for calculation then you have limited yourself to using, in 99.9999% of cases, something very similar to the close of the previous bar for calculation, instead of using all the available prices. Judge for yourself where does that lead

The whole concept of the indicator is like this

Point no 1) If some specific conditions are met on the last COMPLETED BAR IN H1 timeframe.

Point no2 ) After the completion of the last H1 bar, during the formation till the CLOSE of the Current H1 bar, if we have some specific conditions met in Lower time frames like M5, M15, M30

Point no 3) Only then we should be having an Arrow on the chart

Having said that, if once the current H1 bar is completed and the condition on lower time frames are not met then there is NO ARROW.


So this is how I have developed this indicator, now to my surprise I see my Arrows were repainting, and thats why I was looking for some help i n coding, but during this help another problem has started, I can see some strange ARROWS at the bottom of my M5 chart now how to remove that

 
pkeylb:

The whole concept of the indicator is like this

Point no 1) If some specific conditions are met on the last COMPLETED BAR IN H1 timeframe.

Point no2 ) After the completion of the last H1 bar, during the formation till the CLOSE of the Current H1 bar, if we have some specific conditions met in Lower time frames like M5, M15, M30

Point no 3) Only then we should be having an Arrow on the chart

Having said that, if once the current H1 bar is completed and the condition on lower time frames are not met then there is NO ARROW.


So this is how I have developed this indicator, now to my surprise I see my Arrows were repainting, and thats why I was looking for some help i n coding, but during this help another problem has started, I can see some strange ARROWS at the bottom of my M5 chart now how to remove that

When you develop an indicator, there is no need to limit yourself to a closed bar


Simply do the business as usual : make sure that all that is necessary to be done on a single bar is done (ie: clean up, do the work, set some values ...) and then work on a current bar will be no issue either. Leave to users and code that will eventually call your indicator to chose if they want to use current or some past bar to test (that is one single number change in iCustom() call, and one hartbeat to check if current or past bar has a signal for humans) and then your code will be usable in any usable mode

 
Mladen Rakic:

When you develop an indicator, there is no need to limit yourself to a closed bar


Simply do the business as usual : make sure that all that is necessary to be done on a single bar is done (ie: clean up, do the work, set some values ...) and then work on a current bar will be no issue either. Leave to users and code that will eventually call your indicator to chose if they want to use current or some past bar to test (that is one single number change in iCustom() call, and one hartbeat to check if current or past bar has a signal for humans) and then your code will be usable in any usable mode

The RE-PAINTING issue is not about the current Bar, I can see some Arrows appears on my 1 computer and I cant see them on my other laptop with same Time Frame and same Currency pair ( This is not current bar) Now can u sujjest me how to solev this problem. I have understood well about the current bar PRICE_CLOSE issue which you have explained me. But this is not the issue here.

Sir, I request you, if you have 2 different computers, can u load that indicator and see why there is difference of Arrows in numbers and also in positions.

Files:
1.jpg  503 kb
2.jpg  459 kb
4.png  76 kb
5.png  76 kb
 
pkeylb:

The RE-PAINTING issue is not about the current Bar, I can see some Arrows appears on my 1 computer and I cant see them on my other laptop with same Time Frame and same Currency pair ( This is not current bar) Now can u sujjest me how to solev this problem. I have understood well about the current bar PRICE_CLOSE issue which you have explained me. But this is not the issue here.

Sir, I request you, if you have 2 different computers, can u load that indicator and see why there is difference of Arrows in numbers and also in positions.

You are combining multi time frame values with current time frame values + you are using

Time[1+i]

for "other" time frame shift. Why ? Please check how multi time frame should be used before doing that

 
Mladen Rakic:

You are combining multi time frame values with current time frame values + you are using

for "other" time frame shift. Why ? Please check how multi time frame should be used before doing that

Time[i] I am using to restrict the indicator to generate Arrows only on MONDAY, else the basic calculation has nothing to do with this. Even if I remove that part, still the problem of jumping Arrows remains the same. I could not figure it out how to solve the JUmping Arrows. Please Help
Reason: