Code Amibroker Indicators

RWI with Bull vs Bear Warning for Amibroker

by admin December 28, 2018 2 min read 0 comments

Key Takeaways

  • Market conditions and their impact on trading decisions
  • Key levels and price action analysis
  • Risk management strategies for this setup

The random walk index (RWI) is a technical indicator that attempts to determine if a stock’s price movement is random or nature or a result of a statistically significant trend. The random walk index attempts to determine when the market is in a strong uptrend or downtrend by measuring price ranges over N and how it differs from what would be expected by a random walk (randomly going up or down). The greater the range suggests a stronger trend. The RWI states that the shortest distance between two points is a straight line and the further prices stray from a straight line, implies the market is choppy and random in nature.

_SECTION_BEGIN(“RWIHI”);
minperiods = Param( “Min Periods”, 9, 1, 200, 1 );
maxperiods = Param( “Max Periods”, 40, 1, 200, 1 );
Plot( RWIHi( minperiods, maxperiods) , _DEFAULT_NAME(), ParamColor( “Color”, colorCycle ), ParamStyle(“Style”) );
_SECTION_END();
_SECTION_BEGIN(“RWILO”);
minperiods = Param( “Min Periods”, 9, 1, 200, 1 );
maxperiods = Param( “Max Periods”, 40, 1, 200, 1 );
Plot( RWILo( minperiods, maxperiods) , _DEFAULT_NAME(), ParamColor( “Color”, colorCycle ), ParamStyle(“Style”) );
_SECTION_END();
_SECTION_BEGIN(“Line”);
Line = Param( “Line”, 1 );
Plot( Line, “Line”, colorRed, styleThick | styleDashed | styleNoLabel );
_SECTION_END();
_SECTION_BEGIN(“RWI System”);
Sell = Cross( Line, RWIHi( minperiods, maxperiods));
Buy = Cross( RWILo( minperiods, maxperiods), Line);
for( i = 0; i < BarCount; i++ )
{
if( Buy[i] ) PlotText( “Bull vs Bear” , i, 1,colorLavender);
if( Sell[i] ) PlotText( “Bull vs Bear” , i, 1, colorLavender);
}
_SECTION_END();

Trading Data Snapshot

Always verify current market conditions before executing any trade. Past performance does not guarantee future results.

A
admin
Trading analyst and market commentator with expertise in technical analysis, price action, and risk management. Dedicated to helping traders make informed decisions.

Leave a Reply