PureBytes Links
Trading Reference Links
|
nice coding, I love the feel of it and the 3D view very nice coding.
thanks for sharing.
--- In amibroker@xxxxxxxxxxxxxxx, "Brian" <brian@xxxx> wrote:
>
> I tend to use Tom DeMark's Range Expansion Index (REI) alongside
the
> Inverse Fisher Transform (of RSI). REI is more of a leading
> indicator. My REI is slightly different than the one posted in the
AB
> library.
>
> /*
> Tom DeMark's Range Expansion Index
> */
>
> // Set variables here
> varOversoldSignal = (-45);
> varOverboughtSignal = 45;
> // End set variables
>
> HighMom = H - Ref( H, -2 );
> LowMom = L - Ref( L, -2 );
>
> Cond1 = ( H >= Ref( L,-5) OR H >= Ref( L, -6 ) );
> Cond2 = ( Ref( H, -2 ) >= Ref( C, -7 ) OR Ref( H, -2 ) >= Ref( C, -
> 8 ) );
> Cond3 = ( L <= Ref( H, -5 ) OR L <= Ref( H, -6) );
> Cond4 = ( Ref( L, -2 ) <= Ref( C, -7 ) OR Ref( L, -2 ) <= Ref( C, -
> 8 ) );
>
> Cond = ( Cond1 OR Cond2 ) AND ( Cond3 OR Cond4 );
>
> Num = IIf( Cond, HighMom + LowMom, 0 );
> Den = abs( HighMom ) + abs( LowMom );
>
> TDREI = 100 * Sum( Num, 8 )/Sum( Den, 8 ) ;
> VarREI = WMA(TDREI,3);
> TDREI10 = 100 * Sum( Num, 8 )/Sum( Den, 8 ) ;
>
>
> //Plot(WMA(TDREI,50),"REI10",colorBlue,styleDots);
> varOversoldSignal = (-45); // default (-45)
> varOverboughtSignal = 45; // default 45
>
>
> TDREI2 = 100 * Sum( Num, 20 )/Sum( Den, 20 ) ;
> /*
> VarREISignal = WMA(TDREI2,3);
> Plot(VarREISignal,"REI20",colorYellow,styleDots);
> Graph0BarColor=IIf(VarREISignal>45 AND VarREI>45,colorRed,
> IIf(VarREISignal<-45 AND VarREI<-45,colorYellow,colorBlue));
> */
>
> Plot(VarREI,"REI8",colorWhite,styleThick);
> Graph0BarColor=colorWhite;
>
> Plot(Ref(WMA(TDREI,3),-1),"",colorBlack,styleThick);
> Graph1BarColor=colorBlack;
>
> Plot(varOversoldSignal,"",colorGreen,styleDots);
> Plot(varOverboughtSignal,"",colorRed,styleDots);
> Plot(-25,"",colorGreen,styleThick);
> Plot(25,"",colorRed,styleThick);
>
>
>
> // Identify oversold conditions, marked with red arrow to denote
> downtrend
> varOversold = IIf(Ref(TDREI,-5)<=varOversoldSignal
> AND Ref(TDREI,-4)<=varOversoldSignal
> AND Ref(TDREI,-3)<=varOversoldSignal
> AND Ref(TDREI,-2)<=varOversoldSignal
> AND Ref(TDREI,-1)<=varOversoldSignal
> AND TDREI<=varOversoldSignal ,1,0);
> //IIf(VarOversold>0,PlotShapes
(shapeUpArrow*varOversold,colorRed),0);
>
> // Identify overbought conditions, marked with green arrow to
denote
> uptrend
> varOverbought = IIf(Ref(TDREI,-5)>=varOverboughtSignal
> AND Ref(TDREI,-4)>=varOverboughtSignal
> AND Ref(TDREI,-3)>=varOverboughtSignal
> AND Ref(TDREI,-2)>=varOverboughtSignal
> AND Ref(TDREI,-1)>=varOverboughtSignal
> AND TDREI>=varOverboughtSignal ,1,0);
> //IIf(varOverbought>0,PlotShapes
> (shapeUpArrow*varOverbought,colorGreen),0);
>
> Title ="TDREI - CONFIRMATION";
>
> /*
> Tom DeMark Price Oscillator Qualifier (TD POQ)
> Primary and Secondary Buy Setups apply to EOD of today
> For Primary, Buy = H > (H,-1)
> */
> varPrimaryBuySetup = (Ref(C,-1) > Ref (C,-2)
> AND O < Ref(H,-1)
> AND H > Ref(H,-1));
> varSecondaryBuySetup = (Ref(C,-1) > Ref(C,-2)
> AND O > Ref(H,-1)
> AND O < Ref(H,-2)
> AND H > Ref(H,-1));
> varPrimaryBuySetupOutput = IIf(varPrimaryBuySetup
> AND varOversoldSignal<1,1,0);
> varSecondaryBuySetupOutput = IIf(varSecondaryBuySetup,2,0);
>
> //IIf(varPrimaryBuySetupOutput>0 AND TDREI<=varOversoldSignal,
> //PlotShapes(shapeDigit1*varPrimaryBuySetup,colorGreen),0);
------------------------ Yahoo! Groups Sponsor --------------------~-->
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|