Hi subroto and other experts
I like to watch a 5 minute chart with trend of 5 minutes and 15 minutes on it.
now how to filter a 5 minute trend using 15minute trend and on chart show clearly the trending area and non synch area?
trade when 5 min trend is in harmony with 15minute trend is the concept. but showing it on chart clearly is a problem i face.
trend is ma(c,10) as I define it.
PLEASE CHECK THIS CODE if ok or need corrections
-----------------------------------------------------------------
//15min ma10 on 5min or 5min chart
MA10=MA(C,10);//MA10 ON CURRENT TIMEFRAME OF 5 MINUTE CHART
TimeFrameSet( in15Minute) ;
MA10_15 =MA(C,10);
TimeFrameRestore( );
TimeFrameSet( 2*in15Minute) ;
MA10_30 =MA(C,10);
TimeFrameRestore( );
MA1015EXP =TimeFrameExpand(MA10_15, in15Minute);
MA1030EXP =TimeFrameExpand(MA10_30, 2*in15Minute);
Plot(TimeFrameExpand(MA10_15, in15Minute) ,"MA10 on 15min", colorRed) ;
Plot(TimeFrameExpand(MA10_30, 2*in15Minute) ,"MA10 on 30min", colorBlack) ;
Plot(MA10,"MA10",colorBlue,styleThick) ;
//Plot(3*MA10,"3*MA10",colorCustom12,styleThick) ;
uptrend=MA10>MA1015EXP AND MA10>MA1030EXP;
downtrend=MA10<MA1015EXP AND MA10<MA1030EXP;
Plot( 1.5, /* defines the height of the ribbon in percent of pane width */"ribbon",
IIf( uptrend, colorGreen, IIf( downtrend, colorRed, 0 )), /* choose color */
styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );
-------------------------------------------------------
thanks
regards
I like to watch a 5 minute chart with trend of 5 minutes and 15 minutes on it.
now how to filter a 5 minute trend using 15minute trend and on chart show clearly the trending area and non synch area?
trade when 5 min trend is in harmony with 15minute trend is the concept. but showing it on chart clearly is a problem i face.
trend is ma(c,10) as I define it.
PLEASE CHECK THIS CODE if ok or need corrections
-----------------------------------------------------------------
//15min ma10 on 5min or 5min chart
MA10=MA(C,10);//MA10 ON CURRENT TIMEFRAME OF 5 MINUTE CHART
TimeFrameSet( in15Minute) ;
MA10_15 =MA(C,10);
TimeFrameRestore( );
TimeFrameSet( 2*in15Minute) ;
MA10_30 =MA(C,10);
TimeFrameRestore( );
MA1015EXP =TimeFrameExpand(MA10_15, in15Minute);
MA1030EXP =TimeFrameExpand(MA10_30, 2*in15Minute);
Plot(TimeFrameExpand(MA10_15, in15Minute) ,"MA10 on 15min", colorRed) ;
Plot(TimeFrameExpand(MA10_30, 2*in15Minute) ,"MA10 on 30min", colorBlack) ;
Plot(MA10,"MA10",colorBlue,styleThick) ;
//Plot(3*MA10,"3*MA10",colorCustom12,styleThick) ;
uptrend=MA10>MA1015EXP AND MA10>MA1030EXP;
downtrend=MA10<MA1015EXP AND MA10<MA1030EXP;
Plot( 1.5, /* defines the height of the ribbon in percent of pane width */"ribbon",
IIf( uptrend, colorGreen, IIf( downtrend, colorRed, 0 )), /* choose color */
styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );
-------------------------------------------------------
thanks
regards
Last edited: