SuperTrend - page 23

 
Anyway:
I'm not using it :(
because you are not fresh enrolled :)
 
mntiwana:
Looks like you forcing users inverse mode :) anyway decrease periods you using for early signaling.

please show me how

thanks 

 
Pava:
What a Wonderful! idea for a new thread...."Make it Repaint Please!"...with exclamation mark at the end...

according to bar 1 the signal is still buy (green). at bar 0 price plunges. signal at bar 0 turns to sell(red) according to repainting. but according to nonrepainting signal is still a buy because it looks back at the bar 1. thats why i want to have the repainting supertrend indicator for my ea.

the code given by  mladen works great but  could someone modify it to make it calculate signal at the current bar?

would be greatly appreciated,

thanks 

 
tsedawa:

according to bar 1 the signal is still buy (green). at bar 0 price plunges. signal at bar 0 turns to sell(red) according to repainting. but according to nonrepainting signal is still a buy because it looks back at the bar 1. thats why i want to have the repainting supertrend indicator for my ea.

the code given by  mladen works great but  could someone modify it to make it calculate signal at the current bar?

would be greatly appreciated,

thanks 

I always was wondering will my trading improves if I had 10-20 interchanging signals on same current bar...and I would follow each one of them...
 
Pava:
I always was wondering will my trading improves if I had 10-20 interchanging signals on same current bar...and I would follow each one of them...

when there is  price spike or plunge i do not expect 10-20 interchanging signals on that current bar. the whole point of my argument is that my ea should not look back at the past bar 1 for the signal. the problem is when those price spikes are to the opposite direction of the signal at bar 1. for manual trading you can wait for the bar to close but for my ea waiting means looking back at the bar 1 again, a vicious cycle.

so please help me get  the following code to repaint.

 
tsedawa:

when there is  price spike or plunge i do not expect 10-20 interchanging signals on that current bar. the whole point of my argument is that my ea should not look back at the past bar 1 for the signal. the problem is when those price spikes are to the opposite direction of the signal at bar 1. for manual trading you can wait for the bar to close but for my ea waiting means looking back at the bar 1 again, a vicious cycle.

so please help me get  the following code to repaint.

tsedawa

What exactly do you think that repainting is?

Did you actually try to compare the non-repainting version and the repainting version on the current bar?

If you did not, then please do take some time to compare how they work (since you are going to be surprised that the two are doing exactly the same thing on the current bar). What you are describing is not what "repainting" is doing and you can avoid it only if only open price is used for calculation (repainting or no repainting). But since that version of super trend is using close, high and low, there is no way whatsoever to make it (the repainting or the non-repainting version) not change signals on the current bar

 
mladen:

This is the code for non-repainting super trend in new metatrader 4 format (even though there is no need for conversion of the "old" non-repainting version to this format - it works too, but just in case that someone wants to learn how the "new format" can be used)



Look good to me, Dear mladen would you please added your usual set of alerts and filter too

 

Regards 

 
mladen:

tsedawa

What exactly do you think that repainting is?

Did you actually try to compare the non-repainting version and the repainting version on the current bar?

If you did not, then please do take some time to compare how they work (since you are going to be surprised that the two are doing exactly the same thing on the current bar). What you are describing is not what "repainting" is doing and you can avoid it only if only open price is used for calculation (repainting or no repainting). But since that version of super trend is using close, high and low, there is no way whatsoever to make it (the repainting or the non-repainting version) not change signals on the current bar

dear mladen,

if what you said is indeed true i am extremely happy. i always had the gut feeling that repainting is on the chart for visual sake only .  so it confirms it. thank you mladen very much. i will indeed compare the two as you suggested.

thankyou very much dear mladen.

p.s. your code runs far quicker than the old version in strategy tester . thanks again for that wonderful code.

 
Melajah_Forex:

Look good to me, Dear mladen would you please added your usual set of alerts and filter too

 

Regards 

Melajah_Forex

Here is a version with alerts added


 

New versions of super trend, posted :

version has the additional :
  • standard error option
  • custom standard deviation - with sample correction option
  • custom standard deviation - without sample correction option
in the option of how the "super trend" should be calculated(apart from having atr and built in deviation for calculating option)
a version with different way of calculating the mid price



version with new set of averages and prices used for calculation



metatrader 5 version


Reason: