can some one help me to fix repainting issue in my indicator

 

my Indicator has currently this condition that (prev_adx<_adxVal[0]) since the current bar is not closed i am getting false signals/Repainting

i want to have non repainting signal. how my condition should be changed. can any one tell me that 


Example : 

By comparing value of  (i-2) and (i-1) 

ADX value of (i-1) need  be greater than (i-2)


Please help

 

Help you with what?

  1. Almost all indicators adjust to bar zero (the forming one.) That is not repainting. Stop looking at bar zero values.
  2. i-2 and i-1 are meaning less. Depends on whether you are processing arrays as-series or non-series.
  3. Do you really expect an answer? We can't see your broken code. There are no mind readers here and our crystal balls are cracked.