Skip to main content

DTOscillator 2TF 5M-15M for Amibroker (AFL)

hemsvg over 15 years ago Amibroker (AFL)

  • Rating:
    5 / 5 (Votes 1)
  • Tags:
    oscillator, amibroker, timeframe

This version of DTOscillator AFL will display 5min and 15 min DTOscillator in the same panel. Gives best results when you understand the underlying market structure and use it accordingly.

It helps to trade in the direction of the 15Min chart time frame from within 5Min chart time frame.

Screenshots

Indicator / Formula

Copy & Paste Friendly
/* DT Oscillator 
**
** AFL translation by X-Trader
** http://www.x-trader.net
**
*/

PeriodRSI= Param("PeriodRSI", 13, 1, 250, 1);
PeriodStoch=Param("PeriodStoch", 8, 1, 250, 1);
MAType=Param("MAType", 1, 1, 2, 1);
PeriodSK=Param("PeriodSK", 5, 1, 250, 1);
PeriodSD=Param("PeriodSD", 3, 1, 250, 1);
Upper=Param("Upper", 70, 50, 100, 1);
Lower=Param("Lower", 30, 0, 50, 1);


StoRSI= 100*(( RSI( PeriodRSI) - LLV( RSI( PeriodRSI ) , PeriodStoch ) ) / ( (
HHV( RSI( PeriodRSI) , PeriodStoch ) ) - LLV(RSI( PeriodRSI ), PeriodStoch ) )
);

if(MAType==1)
	{
		SK=MA(StoRSI,PeriodSK);
		SD=MA(SK,PeriodSD);
	}

if(MAType==2)
	{
		SK=EMA(StoRSI,PeriodSK);
		SD=EMA(SK,PeriodSD);
	}

Plot(SK,"DTOscSK",ParamColor( "ColorSK", colorBlue ),styleLine|styleNoLabel); 
Plot(SD,"DTOscSD",ParamColor( "ColorSD", colorBlack ),styleDashed|styleNoLabel);
Plot(0,"ZeroLine",ParamColor( "ColorZero", colorBlack ),styleLine|styleNoLabel);
Plot(Upper,"Upper",ParamColor( "ColorUpper", colorRed ),styleLine);
Plot(Lower,"Lower",ParamColor( "ColorLower", colorGreen ),styleLine);

//////
///Following lines of code is added by me to
///display 15 min oscillator
//////

TimeFrameSet(in15Minute);
PeriodRSI= Param("PeriodRSI", 13, 1, 250, 1);
PeriodStoch=Param("PeriodStoch", 8, 1, 250, 1);
MAType=Param("MAType", 1, 1, 2, 1);
PeriodSK=Param("PeriodSK", 5, 1, 250, 1);
PeriodSD=Param("PeriodSD", 3, 1, 250, 1);
Upper=Param("Upper", 70, 50, 100, 1);
Lower=Param("Lower", 30, 0, 50, 1);


StoRSI= 100*(( RSI( PeriodRSI) - LLV( RSI( PeriodRSI ) , PeriodStoch ) ) / ( (
HHV( RSI( PeriodRSI) , PeriodStoch ) ) - LLV(RSI( PeriodRSI ), PeriodStoch ) )
);

if(MAType==1)
	{
		SK=MA(StoRSI,PeriodSK);
		SD=MA(SK,PeriodSD);
	}

if(MAType==2)
	{
		SK=EMA(StoRSI,PeriodSK);
		SD=EMA(SK,PeriodSD);
	}
TimeFrameRestore();
k=TimeFrameExpand(SK,in15Minute);
d=TimeFrameExpand(SD,in15Minute);
Plot(k,"DTOscSK1",ParamColor( "ColorSK1", colorRed ),styleLine|styleDots|styleNoLabel); 
Plot(d,"DTOscSD1",ParamColor( "ColorSD1", colorOrange ),styleLine|styleDots|styleNoLabel);

5 comments

over 15 years ago

its wonderfull code …

its very helpfulll for me in mcx…
once we understood the logic we willl start earn throughout our career …
thaxs author..

2. gopal
over 15 years ago

Request the author to kindly explain how to trade using this indicator.

Thanks,
Gopal

3. hemsvg
over 15 years ago

hi gopal,
instruction to use this indicator is in the description itself.

“It helps to trade in the direction of the 15Min chart time frame from within 5Min chart time frame.”

Trade in the direction of 15Min DTOsc. when the 5Min DTOsc turns in the direction of the 15Min DTOsc – take your trade.Keep in mind – the underlying market structure.

Hope this helps you.

All the best
hemsvg

Leave Comment

Please login here to leave a comment.