Can any one Please help me I have an indicator but it repaint.

 
please help me.
Files:
kwan.mq4  4 kb
 
Please do not double post . . . https://www.mql5.com/en/forum/139312
 
RaptorUK:
Please do not double post . . . https://www.mql5.com/en/forum/139312


ok sorry sir. can u tell me, any one slove this repaint.

any paid website is their.

 
If you don't want it to repaint don't process bar 0.
 
RaptorUK:
If you don't want it to repaint don't process bar 0.

Dear sir,

In this code, where is the (process bar 0) How can i edit, please sir.

//+------------------------------------------------------------------+
//| |
//| Copyright © 1999-2008, MetaQuotes Software Corp. |
//| http://www.metaquotes.ru |
//+------------------------------------------------------------------+
#property copyright "MetaTrader4 Code by jjk2. Based on MBA Thesis from Simon Fraser University written by C.E. ALDEA."
#property link ""
#property indicator_buffers 2
#property indicator_color1 Blue
#property indicator_color2 Red
//----
extern int Count_Bars=1000;
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double Formula[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicator drawing
IndicatorBuffers(4);
SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,3);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,3);
SetIndexBuffer(1,ExtMapBuffer3);
SetIndexStyle(2,DRAW_NONE,STYLE_SOLID,3,Yellow);//DRAW_NONE,EMPTY,EMPTY);
SetIndexBuffer(2,ExtMapBuffer2);
SetIndexBuffer(3,Formula);
///-----Name of Indicator
string short_name="ZigZag BETA Current value calculated by indicator:";
IndicatorShortName(short_name);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int pos=0;
if (Count_Bars>Bars) {pos=Bars;}else{pos=Count_Bars;}
int temp=pos;
while(pos>=0)
{
//string xxx = "pos";
double Stoch=iStochastic(NULL,0,9,6,2,MODE_SMA,1,0,pos);
double RSI=iRSI(NULL,0,9,PRICE_CLOSE,pos);
double moment=(iMomentum(NULL,0,9,PRICE_CLOSE,pos));
//Main Forumla
//double preFormula = (/Momentum);
if (moment!=0)
ExtMapBuffer2[pos]=Stoch*(RSI)/moment;
//Alert("MACD: ", MACD," ","Stoch: ", Stoch," ", "RSI: ", RSI," ","Momentum: ", momentum," ","Volume: ", Volu);
//Alert(Stoch*(RSI)/Roc);
pos--;
}
while(temp >=0)
{
ExtMapBuffer1[temp]=EMPTY_VALUE;
ExtMapBuffer3[temp]=EMPTY_VALUE;
Formula[temp]=iMAOnArray(ExtMapBuffer2,0,2,0,MODE_SMA,temp);
if (Formula[temp]>Formula[temp+1])
{
ExtMapBuffer1[temp]=Formula[temp];
if (ExtMapBuffer1[temp+1]==EMPTY_VALUE) ExtMapBuffer1[temp+1]=Formula[temp+1];
}
else
{
ExtMapBuffer3[temp]=Formula[temp];
if (ExtMapBuffer3[temp+1]==EMPTY_VALUE) ExtMapBuffer3[temp+1]=Formula[temp+1];
}
temp--;
}
//----
return(0);
}
//+------------------------------------------------------------------+
 
RaptorUK:
If you don't want it to repaint don't process bar 0.


Dear sir,

we need Accurate indicator. any website is their.

 
 

Last bar signal will always be recounted in most of the indicators. You can only hide the last bar signal, if you not process bar 0,

by writing while(temp >=1) in place of while(temp >=0).

But there is another repainting issue, watch white circles:

It is a common two-coloring mistake, when you want to draw one line bit after one pause, MT will fill that pause. A possible solution is to use an extra buffer to cover the unwanted line bit, find this in the attached file (it does not contain the 0 bar issue).

Files:
kwan_2.mq4  5 kb
 
erzo:

Last bar signal will always be recounted in most of the indicators. You can only hide the last bar signal, if you not process bar 0,

by writing while(temp >=1) in place of while(temp >=0).

But there is another repainting issue, watch white circles:

It is a common two-coloring mistake, when you want to draw one line bit after one pause, MT will fill that pause. A possible solution is to use an extra buffer to cover the unwanted line bit, find this in the attached file (it does not contain the 0 bar issue).


ok sir i will check it once thanks

 
sanjayraju:


ok sir i will check it once thanks


Dear sir

Still its repainting ok thanks for comment.

Any Acccurate indicator in forex market, already we paid somany trading system. please provide us any accurate indicator or website.

Reason: