Simple Coding Help - No Promise.

mastermind007

Well-Known Member
Hi

I am using Hurst Band instead of Bollinger Bands
Hurst Band is repainting on chart, I want to fix the bands, once formed should not re-paint

Kindly help


CY1 = Param("Short Cycle Length?" ,10, 1 ,1000 ,1 )/2;
CY2 = Param("Medium Cycle Length?" ,80, 1 ,1000 ,1 )/2;
M1 = Param("Short Cycle Multiplyer?" ,1, 0.01 ,10 ,1 );
M2 = Param("Medium Cycle Multiplyer?" ,3, 0.01 ,10 ,1 );
T1 = Ref(MA(Close ,CY1 ),CY1/2)+ M1*ATR(CY1 );
B1 = Ref(MA( Close ,CY1 ),CY1/2)- M1*ATR(CY1 );
T2 = Ref(MA(Close ,CY2 ),CY2/2)+ M2*ATR(CY2 );
B2 = Ref(MA( Close ,CY2 ),CY2/2)- M2*ATR(CY2 );

//Plot(T1, "", colorLime);
//Plot(B1, "", colorLime);
Plot(T2, "", colorLime);
Plot(B2, "", colorLime);
Your AFL code is looking into future. What is definition of Hurst Band and what are its advantages over B.B.?
 

pratapvb

Well-Known Member
Hi

I am using Hurst Band instead of Bollinger Bands
Hurst Band is repainting on chart, I want to fix the bands, once formed should not re-paint

Kindly help


CY1 = Param("Short Cycle Length?" ,10, 1 ,1000 ,1 )/2;
CY2 = Param("Medium Cycle Length?" ,80, 1 ,1000 ,1 )/2;
M1 = Param("Short Cycle Multiplyer?" ,1, 0.01 ,10 ,1 );
M2 = Param("Medium Cycle Multiplyer?" ,3, 0.01 ,10 ,1 );
T1 = Ref(MA(Close ,CY1 ),CY1/2)+ M1*ATR(CY1 );
B1 = Ref(MA( Close ,CY1 ),CY1/2)- M1*ATR(CY1 );
T2 = Ref(MA(Close ,CY2 ),CY2/2)+ M2*ATR(CY2 );
B2 = Ref(MA( Close ,CY2 ),CY2/2)- M2*ATR(CY2 );

//Plot(T1, "", colorLime);
//Plot(B1, "", colorLime);
Plot(T2, "", colorLime);
Plot(B2, "", colorLime);
this must only be changing (as u call repainting) for the last bar until that bar is completed...but this will happen

Thanks for drawing attention to Hurst band. Interesting views when checking out 3min and 15min band together and 15min and 60min band together etc
 
Hi Experts !

My afl always takes buyprice value at the LOW and shortprice at HIGH of a bar, irrespective of actual prices at which the buy or short was made. So profit calculations go wrong. How do I set it right?

Thanks in advance!

PS:

I tried those Get/Set Options functions, but somehow they didn't work, due to wrong syntax perhaps?
 

Nehal_s143

Well-Known Member
I found this afl on net, I dont have definition, I have e-book J. M. Hurst - The Profit Magic Of Stock Transaction Timing and Cyclic.Analysis_.A.Dynamic.Approach.to.T.J.M.Hurst if interested to know in detail about JM Hurst cyclic analysis, theory is too complicated.

Sir, If you plot both BB & Hurst both you will come to know easily the difference and Hurst Band advantage over BB :) Hurst Band is more reliable to detect trend reversal along with your other indicators confirmation



Your AFL code is looking into future. What is definition of Hurst Band and what are its advantages over B.B.?
 

Nehal_s143

Well-Known Member
this must only be changing (as u call repainting) for the last bar until that bar is completed...but this will happen

Thanks for drawing attention to Hurst band. Interesting views when checking out 3min and 15min band together and 15min and 60min band together etc
No sir, it is repainting, if it changes for last bar until that bar is completed, i can understand.

Please see Nifty1 5 min chart till yesterday close and today after gap up opening at marked place

Nifty1 5 min Chart as on 04.12.13


Nifty1 5 min Chart as on 05.12.13


Uploaded with ImageShack.us
 

Nehal_s143

Well-Known Member
Small info on JM Hurst, if this name is not know to you


J.M. Hurst is known by many contemporary market technicians as the 'father' of modern cyclic analysis. When he first introduced his concepts in the early 1970's through his classic work "The Profit Magic of Stock Transaction Timing", he quickly developed a loyal following from market technicians all over the country, eager to learn his techniques and apply the principles. For a few short years, he even taught a course on cyclic analysis.

Unfortunately, like W.D. Gann before him, most of Hurst's techniques were too complicated for the average trader, and only a relative few know how to apply the concepts in real-time in today's markets. In irony, Hurst disappeared shortly thereafter, taking most of what he knew and understood along with him. Sadly, Mr. Hurst passed away in 2005

Hurst's theory of channel and envelope analysis was the cornerstone of his work, with time cycles and classic trendline analysis used to aid the forecasting techniques. Although likely impossible to do for an
extended period of time, a 13-week real-time experiment from the Hurst group produced a 90% accuracy in buying and selling stocks, using his proprietary techniques of cyclical analysis.

one of the leading stock market software Sentient Trader (http://sentienttrader.com) is completely based on trading methods of JM Hurst
 

pratapvb

Well-Known Member
No sir, it is repainting, if it changes for last bar until that bar is completed, i can understand.

Please see Nifty1 5 min chart till yesterday close and today after gap up opening at marked place

Nifty1 5 min Chart as on 04.12.13


Nifty1 5 min Chart as on 05.12.13


Uploaded with ImageShack.us
It is actually doing forward reference of MA which does not make sense to me

maybe -ve sign missed....so try this

T2 = Ref(MA(Close ,CY2 ), -CY2/2)+ M2*ATR(CY2 );
B2 = Ref(MA( Close ,CY2 ), -CY2/2)- M2*ATR(CY2 )

I put -ve sign in ref 2nd argument

but this will change the way it will draw but will not repaint what is completed
 

Similar threads