Can you said to me, where is the BUG in the formula Below
When I'm use it on Weekly, daily, 60, 30 and 15 minute it is O.K.
But when I'm use It in time frame below 15 minute
I'm obtain a graphe who use around the 25% on the top of the graphe
And he have nothing in the 75% of the bottom.
What is the problem in this formula below
Thank
YLTech
------------------------------
//_SECTION_BEGIN("Bad-Screen");
SetChartOptions (0,chartShowArrows|chartShowDates);
_N (Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
//////////// Candlestick, OBV et MA20,50,100 et 200 sur Time Frame Inférieur a DAILY
Plot ( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
Plot (MA(C,20),"MA20",colorCustom12,styleLine);
Plot (MA(C,50),"MA50",colorRed,styleLine);
Plot (MA(C,100),"MA10",colorBlue,styleLine);
IIf (Interval()<85000,
Plot(MA(C,200),"MA200",colorBlack,styleLine), 0 );
Plot (OBV(),"OBV",colorTurquoise,styleLine|styleThick|styleOwnScale);
///// SECTION_BEGIN("B/S MA20-50") //////////////////////////
DMa20= DEMA(C,20) ;
DMa50= DEMA(C,50) ;
Ma20= MA( C, 20 );
Ma50= MA( C, 50 );
CrMaH= BarsSince(Cross(MA20,MA50))<25 AND MA20>MA50 ;
CrMaB= BarsSince(Cross(MA50,MA20))< 25 AND MA20<MA50 ;
St= StochK(9,3) ;
MSt= StochD(9,3,3) ;
CrStH= Cross(St,MSt) AND (LLV(St,3)<60) ;
CrStB= Cross(St,MSt) AND (LLV(St,3)>40);
// Use CrossMacd in 15 min. with B/S in 5 min.
CrMacdH= BarsSince(Cross(MACD(),Signal()))< 12 AND MACD()>Signal() ;
CrMacdB= BarsSince(Cross(Signal(),MACD()))< 12 AND Signal()>MACD() ;
Buy_MA= CrMaH AND CrStH ;
Sell_MA= CrMaB AND CrStB ;
PlotShapes (Buy_MA*shapeUpArrow,colorBlue,0,L,-20);
PlotShapes (Sell_MA*shapeDownArrow,colorRed,0,H,-20);
///// _SECTION_BEGIN("trend MA 20-50") ////////////
uptrend= Ma20>Ma50 OR DMa20>DMa50 ;
downtrend= Ma20<Ma50 OR DMa20<DMa50 ;
Plot ( 2, /* defines the height of the ribbon in percent of pane width */"\nribbon",
IIf ( uptrend, colorBlue, IIf( downtrend, colorCustom12, 0 )), /* choose color */
styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );
//////// SECTION_BEGIN("Buy H/B 10-20-Intra Day"); ////////////
Haut= IIf(Interval()==3600, Ref(HHV(C,20),-1),
IIf(Interval()==1800, Ref(HHV(C,40),-1),
IIf(Interval()==900, Ref(HHV(C,80),-1),0 ))) ;
Bas= IIf(Interval()==3600, Ref(LLV(C,10),-1),
IIf(Interval()==1800, Ref(LLV(C,20),-1),
IIf(Interval()==900, Ref(LLV(C,40),-1),0 ))) ;
Plot (Haut,"HautP",colorBlue,styleLine);
Plot (Bas,"BasP",colorRed,styleLine);
//_SECTION_END();
-----------------------------------------
Merci YLTech ( Yves L. ) Le présent message et les documents qui y sont joints sont réservés exclusivement au destinataire indiqué. Il est strictement interdit d'en utiliser ou d'en divulguer le contenu. Si vous recevez le présent message par erreur, veuillez le détruire S.V.P. et nous en aviser immédiatement afin que nous puissions corriger nos dossiers. Merci. This message and the attached documents may contain privileged or confidential information that are intended to the addressee only. Any unauthorized disclosure is strictly prohibited. If you happen to receive this message by error, please delete it and notify us immediately so that we may correct our internal records. Thank you. yltech@xxxxxxxxxxxx |