Why the heck does MT4 repaint this icustom indicator

 

OK..

So i've setup an indicator to just show me when price is above or below a few MA's. It's actually based on the Madro Golden Filter Indicator.

If I set the indicator to pull the current bar it repaints when you refresh the indicator.. When I set to it doesn't repaint. I can't allow the indicator to be one full bar late or else what's the point of having it, I might as well have the MA's up on the screen.

Anyone mind enlightening me on how to get this fixed? or what i'm doing sooo wrong here..

thanks

-dgv

 

Repainting

drgoodvibe:
OK..

So i've setup an indicator to just show me when price is above or below a few MA's. It's actually based on the Madro Golden Filter Indicator.

If I set the indicator to pull the current bar it repaints when you refresh the indicator.. When I set to it doesn't repaint. I can't allow the indicator to be one full bar late or else what's the point of having it, I might as well have the MA's up on the screen.

Anyone mind enlightening me on how to get this fixed? or what i'm doing sooo wrong here..

thanks

-dgv

DGV

There is nothing wrong with MT4 or your coding but rather your understanding of the 'repaint' factor.

People run around like chooks with their heads cut off asking if a indicator repaints and they don't even know what it means or more importantly WHY it occurs (not nec talking about you).

For those other than DGV that don't know what repainting is, it's when an indicator performs one signal on chart (Live/forward run) but then later when refreshed on historical will often place a better signal. This then makes the indicator out to be more efficient than it really is.

Hybrid indicators such as DGV's 'icustom' are built on other base indicators such moving averages within the code. Moving av's are horrendous for repainting because YOU WILL NOT KNOW A TRUE CROSSOVER UNTIL THE CANDLE IS COMPLETE!

Unlike some other indicators (RSI perhaps), Moving avs may crossover each other 100's of times within a particular candle (dependant TF) due to price volatility. The nature of whether the cross has TRULY occurred is not known until after the candle/bar is complete. If you code +1 bar (Such as DGV suggested) then you will no longer experience the historical repaint issue.

On a slightly separate note for newbie traders whom have become enamoured with MA's, I warn you not to be so hasty in chasing a crossover system. These look wonderful historically on chart because there APPEARS to be few crossovers (exception channel markets which will kill you). However, don't forget historical charts have finished the candle within trend and hence the MA's appear parallel until a true price occurs. What you don't see on a static chart is the right hand side of live screen when price is moving all over the place with many crosses occurring.

I suggest you open MT4 strategy tester and run the charts on 'visual mode' in your chosen TF to simulate a live moving market. Place some MA's on the chart and try trading a crossover system. Within minutes you will realize how difficult it is.

With regard to many indicators at TSD, YES they repaint and this is because the +1 bar factor and refreshing of current bar has not been written correctly.

It always comes back to - KNOW what runs the machine before trusting it!

I'm sorry Doctor, but if you wish to continue using moving avs, then you MUST wait until current bar has closed and this applies whether you are building EA or trading manually. Otherwise, how else does one know whether the cross is true or fake?

Oceanfx

 

why not use the open of the candle?

 

Same thing

ElectricSavant:
why not use the open of the candle?

ES

We are talking the same thing assuming you meant "start trade at the open of NEXT candle AFTER MA crossover.

Bottom line is you must wait for the previous candle to close, ensure a crossover has occurred and THEN open your trade on the open of new candle (just opened).

Oceanfx

 

OceanFX,

Thank you very much for a complete answer. I think this will enlighten a few people..

 

Wait until bar close you lose, dont wait for bar close you lose.

How do you expect an average of data to give you a realistic prediction of average of movement when the data its running on has been manipulated and isn't realistic?

Can you imagine nasa using manipulated changed data to calculate re entry to the earths atmosphere for space shuttles?

None of them would ever make it back....

 
kjhfdgjfhdghdf:
Wait until bar close you lose, dont wait for bar close you lose.

How do you expect an average of data to give you a realistic prediction of average of movement when the data its running on has been manipulated and isn't realistic?

Can you imagine nasa using manipulated changed data to calculate re entry to the earths atmosphere for space shuttles?

None of them would ever make it back....

Yep you're right.. I suppose when someone get's to the professional level they should be leaving the MT4 platform towards something like MetaStock or Tradestation.

 

It doesnt matter

drgoodvibe:
Yep you're right.. I suppose when someone get's to the professional level they should be leaving the MT4 platform towards something like MetaStock or Tradestation.

Not sure whether the previous posts sank in but your repaint problem HAS NOTHING TO DO WITH MT4.

As regards 'professional level' trading, I have been in this industry for +10 years and used both Metastock and TS. They are OK but believe me when I say that MT4 is more than adequate and very professional for what it is. You can trade a $100 or $10 million dollar account with it.

TS has plenty more indicators and looks a bit fancier with extra features but those do not make you a trader. MT4 standard + all the custom indicators you can source here are more than enough to build a brilliant system. When it comes down to execution, both platforms only need to do a couple things...buy, sell, place stops etc and run EA's which all three do. TS just has fancier window dressing.

Dealing stations are like racing cars, they still require a good driver. A brilliant driver with a fractionally slower vehicle will always win against a crap driver whom cannot handle the high performance machine.

Trading is about knowledge, learning the art through many years of hard work and controlling your emotions, not a fancy piece of software.

Oceanfx

Reason: