False Bar Stochastic

Hello,
The False Bar Stochastic for Advanced Get can be duplicated in Amibroker thus

_SECTION_BEGIN("Stochastic_45-4-2_833");

ColorX=colorBlack;
//ColorX=colorWhite;

SetChartBkColor(ParamColor("Panel color ",ColorX));

periods = Param( "Periods", 45, 1, 200, 1 );
K1smooth = Param( "%K1 avg", 4, 1, 200, 1 );
//Plot( StochK( periods , K1smooth), _DEFAULT_NAME(), colorCustom3, styleNoLabel | styleThick | styleDots);

periods = Param( "Periods", 45, 1, 200, 1 );
K1smooth = Param( "%K1 avg", 4, 1, 200, 1 );
D1smooth = Param( "%D1 avg", 2, 1, 200, 1 );
//Plot( StochD( periods , K1smooth, D1Smooth ), _DEFAULT_NAME(), colorCustom3, styleNoLabel | styleThick | styleDots);

A = StochK( periods , K1smooth);
B = StochD( periods , K1smooth, D1Smooth );

Plot (20, "", colorTan, styleNoLabel);
Plot (50, "", colorLavender, styleNoLabel);
Plot (80, "", colorTan, styleNoLabel);

PlotOHLC( 100, 100 , 95 , 95 , "", IIf(A>80,colorAqua,ColorX), styleCloud | styleNoLabel);
PlotOHLC( 5, 5 , 0 , 0 , "", IIf(A<20,colorAqua,ColorX), styleCloud | styleNoLabel);

periods = Param( "Periods", 8, 1, 200, 1 );
K1smooth = Param( "%K1 avg", 3, 1, 200, 1 );

periods = Param( "Periods", 8, 1, 200, 1 );
K2smooth = Param( "%K1 avg", 3, 1, 200, 1 );
D2smooth = Param( "%D1 avg", 3, 1, 200, 1 );

M = StochK( periods , K2smooth);
N = StochD( periods , K2smooth, D2Smooth );

ColorK=IIf(A>B,colorBrightGreen,colorRed);

Plot( M,"StoK", ColorK, styleNoLabel|styleThick);
Plot( N,"StoD", colorDarkYellow, styleNoLabel|styleDashed);

//PlotOHLC( 0, A , B , B , "Cloud", IIf(A > B ,colorAqua,colorRed), styleCloud | styleNoLabel);

_SECTION_END();

What I want is an exploration to return the first instance of a false bar appearance in a security
I tried

k = StochK(); 
d = StochD(); 

overbought = k > 80; 
falseSignal = Ref( overbought, -1 ) AND C > Ref( C, -1 ); 

Filter = falseSignal; 
AddColumn( Close, "Close" ); 
AddColumn( Ref( Close, -1), "Prev Close" ); 
AddColumn( Ref( k, -1), "Prev %k" );

But this did not work either

Can somebody help?

Regards,

Dr.Chatterjee

Start from: How to use this site

(I added code tags that are required on this forum but formulas are still wrong. You have to correct them yourself because there are typing errors probably caused by the fact that you copy-pasted formulas from either web site or other HTML content. That is for the start).

1 Like

Hello,
I am reposting this thread as the original one contained many errors as I had not followed the forum formatting rules.
The False Bar Stochastic oscillator from Advanced Get can be created in Amibroker
This False Bar appears either on top or bottom of the stochastic oscillator instructing the trader to ignore the buy (bottom) or sell (top) signal as the down or up trend is expected to continue.
see---https://www.youtube.com/watch?v=TRJpfNsum6Q

_SECTION_BEGIN("Stochastic_45-4-2_833");

ColorX=colorBlack;
//ColorX=colorWhite;

SetChartBkColor(ParamColor("Panel color ",ColorX));

periods = Param( "Periods", 45, 1, 200, 1 );
K1smooth = Param( "%K1 avg", 4, 1, 200, 1 );
//Plot( StochK( periods , K1smooth), _DEFAULT_NAME(), colorCustom3, styleNoLabel | styleThick | styleDots);


periods = Param( "Periods", 45, 1, 200, 1 );
K1smooth = Param( "%K1 avg", 4, 1, 200, 1 );
D1smooth = Param( "%D1 avg", 2, 1, 200, 1 );
//Plot( StochD( periods , K1smooth, D1Smooth ), _DEFAULT_NAME(), colorCustom3, styleNoLabel | styleThick | styleDots);



A = StochK( periods , K1smooth);
B = StochD( periods , K1smooth, D1Smooth );


Plot (20, "", colorTan, styleNoLabel);
Plot (50, "", colorLavender, styleNoLabel);
Plot (80, "", colorTan, styleNoLabel);

PlotOHLC( 100, 100 , 95 , 95 , "", IIf(A>80,colorAqua,ColorX), styleCloud | styleNoLabel);
PlotOHLC( 5, 5 , 0 , 0 , "", IIf(A<20,colorAqua,ColorX), styleCloud | styleNoLabel);

periods = Param( "Periods", 8, 1, 200, 1 );
K1smooth = Param( "%K1 avg", 3, 1, 200, 1 );



periods = Param( "Periods", 8, 1, 200, 1 );
K2smooth = Param( "%K1 avg", 3, 1, 200, 1 );
D2smooth = Param( "%D1 avg", 3, 1, 200, 1 );

M = StochK( periods , K2smooth);
N = StochD( periods , K2smooth, D2Smooth );

ColorK=IIf(A>B,colorBrightGreen,colorRed);

Plot( M,"StoK", ColorK, styleNoLabel|styleThick);
Plot( N,"StoD", colorDarkYellow, styleNoLabel|styleDashed);



//PlotOHLC( 0, A , B , B , "Cloud", IIf(A > B ,colorAqua,colorRed), styleCloud | styleNoLabel);


_SECTION_END();

What I want is an exploration to return the first instance of a false bar appearance in a security
I tried

k = StochK();
d = StochD();

overbought = k > 80;
falseSignal = Ref( overbought, -1 ) AND C > Ref( C, -1 );

Filter = falseSignal;
AddColumn( Close, "Close" );
AddColumn( Ref( Close, -1), "Prev Close" );
AddColumn( Ref( k, -1), "Prev %k" );

But this did not work either

Can somebody help?

Regards,

Dr.Chatterjee

@gorachand You do not have the indicator. The video and a brief internet search, clearly state that it is a proprietary indicator and they have not given you the formula have they?

Perahps you believe that you have "reverse-engineered" this proprietary indicator. That would be great, and I love trying to find unique indicator's and if necessary making an effort to reverse-engineer them. So let us take a look at your effort.

Hmmm, :confused: That seems pretty simple for an "advanced" proprietary indicator doesn't it?

Let us see what your video has to say (good grief it's almost 20 minutes of useless information!). But the narrator states on several occasions that the intent of the indicator is to filter out Stochastic mean reversion signals by identifying a security that is trending. Your code identifies this as "overbought" stochastic and the current Close is greater than the previous Close.

Please do not tell me that you think that identifies a "trend" filter. The video shows several bars with a "False Bar Stochastic" that have the Close both higher and lower than the previous Close. So clearly your interpretation is incorrect.

The narrator also mentions Elliot Wave analysis several times but does not specifically mention that it is involved in the calculation. Perhaps just an effort to sell more software.

Lastly, if you intend on using AmiBroker and the Stochastic, then I suggest that you familiarize yourself with the software. Good luck.

4 Likes