Hi All
I have the following code that predicts price at RSI at 70 and 30. I would be greatful if someone can help me plot Buy signal at RSI Crossing over 30 and Sell signal when RSI touches 70. Also need exploration bit for Analysis.
---------------------------
_SECTION_BEGIN("RSI_Next_Bar");
Value1 = Param("RSI BearResistance", 70, 1, 100, 0.1 );
Value2 = Param("RSI BullSupport", 30, 1, 100, 0.1 );
WildPer = Param("Time periods", 15, 1, 100 );
ExpPer = 2 * WildPer - 1;
AUC = EMA( Max( C - Ref( C, -1 ), 0 ), ExpPer );
ADC = EMA( Max( Ref( C, -1 ) - C, 0 ), ExpPer );
x1 = (WildPer - 1) * ( ADC * Value1 / (100-Value1) - AUC);
RevEngRSI1 = IIf( x1 >= 0, C + x1, C + x1 * (100-Value1)/Value1 );
x2 = (WildPer - 1) * ( ADC * Value2 / (100-Value2) - AUC);
RevEngRSI2 = IIf( x2 >= 0, C + x2, C + x2 * (100-Value2)/Value2 );
Plot( Close, Date()+", Close ", colorWhite, styleCandle );
Plot( RevEngRSI1, "RSIBearResistance( "+WriteVal(WildPer,1.0)+", "+ WriteVal(Value1, 1.2)+" )", colorRed );
Plot( RevEngRSI2, "RSIBullSupport( "+WriteVal(WildPer,1.0)+", "+ WriteVal(Value2, 1.2)+" )", colorGreen );
_SECTION_END();
--------------------------
I know it might sound dumbed or may be too easy to do, but i am just starting to get a hang of AmiBroker. So need your help on this.
Cheers.....
I have the following code that predicts price at RSI at 70 and 30. I would be greatful if someone can help me plot Buy signal at RSI Crossing over 30 and Sell signal when RSI touches 70. Also need exploration bit for Analysis.
---------------------------
_SECTION_BEGIN("RSI_Next_Bar");
Value1 = Param("RSI BearResistance", 70, 1, 100, 0.1 );
Value2 = Param("RSI BullSupport", 30, 1, 100, 0.1 );
WildPer = Param("Time periods", 15, 1, 100 );
ExpPer = 2 * WildPer - 1;
AUC = EMA( Max( C - Ref( C, -1 ), 0 ), ExpPer );
ADC = EMA( Max( Ref( C, -1 ) - C, 0 ), ExpPer );
x1 = (WildPer - 1) * ( ADC * Value1 / (100-Value1) - AUC);
RevEngRSI1 = IIf( x1 >= 0, C + x1, C + x1 * (100-Value1)/Value1 );
x2 = (WildPer - 1) * ( ADC * Value2 / (100-Value2) - AUC);
RevEngRSI2 = IIf( x2 >= 0, C + x2, C + x2 * (100-Value2)/Value2 );
Plot( Close, Date()+", Close ", colorWhite, styleCandle );
Plot( RevEngRSI1, "RSIBearResistance( "+WriteVal(WildPer,1.0)+", "+ WriteVal(Value1, 1.2)+" )", colorRed );
Plot( RevEngRSI2, "RSIBullSupport( "+WriteVal(WildPer,1.0)+", "+ WriteVal(Value2, 1.2)+" )", colorGreen );
_SECTION_END();
--------------------------
I know it might sound dumbed or may be too easy to do, but i am just starting to get a hang of AmiBroker. So need your help on this.
Cheers.....