[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: Chart Title Issue



PureBytes Links

Trading Reference Links

Try adding
Title = Title + "\n" +CStatus + "\n " + P_status;
to the very end of your code.

R

--- In amibroker@xxxxxxxxxxxxxxx, Doji <dojistarbullish@xxx> wrote:
>
> Hi guys,
> I haver taken Herman's Candle Codes and put them in a price 
> chart/exploration. The Candle names appear in the Interpretation 
window. 
> My problem is how to display the Candle Names in chart title. 
Please help.
> Doji
> ====================
> _SECTION_BEGIN( "Price" );
> color = IIf( C > O, colorAqua, colorOrange);
> SetChartOptions( 0, chartShowDates | chartShowArrows | 
chartLogarithmic 
> | chartWrapTitle );
> _N( Title = StrFormat( "{{NAME}} - " + SectorID( 1 ) + " - 
{{INTERVAL}} 
> {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " + WriteVal( 
V, 
> 1.0 ) + " {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ) );
> Plot( C, "Close", Color, styleCandle | styleNoTitle | ParamStyle( 
> "Style" ) | GetPriceStyle() );
> 
> if ( ParamToggle( "Tooltip shows", "All Values|Only Prices" ) )
> {
>      ToolTip = StrFormat( "Open: %g\nHigh:  %g\nLow:   %g\nClose:  %
g 
> (%.1f%%)\nVolume: " + NumToStr( V, 1 ), O, H, L, C, SelectedValue( 
ROC( 
> C, 1 ) ) );
> }
> 
> _SECTION_END();
> 
> _SECTION_BEGIN("Herman's Candles");
> O1 = Ref(O,-1);O2 = Ref(O,-2);
> H1 = Ref(H,-1);H2 = Ref(H,-2);
> L1 = Ref(L,-1);L2 = Ref(L,-2);
> C1 = Ref(C,-1);C2 = Ref(C,-2);
> NearDoji = (abs(O-C)<= ((H-L)*0.1));
> BlackCandle = (O>C);
> LongBlackCandle = (O>C AND (O-C)/(0.001+H-L)>0.6);
> SmallBlackCandle = ((O>C) AND ((H-L)>(3*(O-C))));
> WhiteCandle = (C>O);
> LongWhiteCandle = ((C>O) AND ((C-O)/(0.001+H-L)>0.6));
> SmallWhiteCandle = ((C>O) AND ((H-L)>(3*(C-O))));
> BlackMaubozu = (O>C AND H==O AND C==L);
> WhiteMaubozu = (C>O AND H==C AND O==L);
> BlackClosingMarubozu = (O>C AND C==L);
> WhiteClosingMarubozu = (C>O AND C==H);
> BlackOpeningMarubozu = (O>C AND O==H);
> WhiteOpeningMarubozu = (C>O AND O==L);
> HangingMan = (((H-L)>4*(O-C)) AND ((C-L)/(0.001+H-L)>= 0.75) AND 
> ((O-L)/(0.001+H-L)>= 0.75));
> Hammer = (((H-L)>3*(O-C)) AND ((C-L)/(0.001+H-L)>0.6) AND 
> ((O-L)/(0.001+H-L)>0.6));
> InvertedHammer = (((H-L)>3*(O-C)) AND ((H-C)/(0.001+H-L)>0.6) AND 
> ((H-O)/(0.001+H-L)>0.6));
> ShootingStar = (((H-L)>4*(O-C)) AND ((H-C)/(0.001+H-L)>= 0.75) AND 
> ((H-O)/(0.001+H-L)>= 0.75));
> BlackSpinningTop = ((O>C) AND ((H-L)>(3*(O-C))) AND 
> (((H-O)/(0.001+H-L))<0.4) AND (((C-L)/(0.001+H-L))<0.4));
> WhiteSpinningTop = ((C>O) AND ((H-L)>(3*(C-O))) AND 
> (((H-C)/(0.001+H-L))<0.4) AND (((O-L)/(0.001+H-L))<0.4));
> BearishAbandonedBaby = ((C1 == O1) AND (C2>O2) AND (O>C) AND 
(L1>H2) AND 
> (L1>H));
> BearishEveningDojiStar = ((C2>O2) AND ((C2-O2)/(0.001+H2-L2)>0.6) 
AND 
> (C2<O1) AND (C1>O1) AND ((H1-L1)>(3*(C1-O1))) AND (O>C) AND (O<O1));
> DarkCloudCover = (C1>O1 AND ((C1+O1)/2)>C AND O>C AND O>C1 AND C>O1 
AND 
> (O-C)/(0.001+(H-L)>0.6));
> BearishEngulfing = ((C1>O1) AND (O>C) AND (O>= C1) AND (O1>= C) AND 
> ((O-C)>(C1-O1)));
> ThreeOutsideDownPattern = ((C2>O2) AND (O1>C1) AND (O1>= C2) AND 
(O2>= 
> C1) AND ((O1-C1)>(C2-O2)) AND (O>C) AND (C<C1));
> BullishAbandonedBaby = ((C1 == O1) AND (O2>C2) AND (C>O) AND 
(L2>H1) AND 
> (L>H1));
> BullishMorningDojiStar = ((O2>C2) AND ((O2-C2)/(0.001+H2-L2)>0.6) 
AND 
> (C2>O1) AND (O1>C1) AND ((H1-L1)>(3*(C1-O1))) AND (C>O) AND (O>O1));
> BullishEngulfing = ((O1>C1) AND (C>O) AND (C>= O1) AND (C1>= O) AND 
> ((C-O)>(O1-C1)));
> ThreeOutsideUpPattern = ((O2>C2) AND (C1>O1) AND (C1>= O2) AND 
(C2>= O1) 
> AND ((C1-O1)>(O2-C2)) AND (C>O) AND (C>C1));
> BullishHarami = ((O1>C1) AND (C>O) AND (C<= O1) AND (C1<= O) AND 
> ((C-O)<(O1-C1)));
> ThreeInsideUpPattern = ((O2>C2) AND (C1>O1) AND (C1<= O2) AND (C2<= 
O1) 
> AND ((C1-O1)<(O2-C2)) AND (C>O) AND (C>C1) AND (O>O1));
> PiercingLine = ((C1<O1) AND (((O1+C1)/2)<C) AND (O<C) AND (O<C1) 
AND 
> (C<O1) AND ((C-O)/(0.001+(H-L))>0.6));
> BearishHarami = ((C1>O1) AND (O>C) AND (O<= C1) AND (O1<= C) AND 
> ((O-C)<(C1-O1)));
> ThreeInsideDownPattern = ((C2>O2) AND (O1>C1) AND (O1<= C2) AND 
(O2<= 
> C1) AND ((O1-C1)<(C2-O2)) AND (O>C) AND (C<C1) AND (O<O1));
> ThreeWhiteSoldiers = (C>O*1.01) AND (C1>O1*1.01) AND (C2>O2*1.01) 
AND 
> (C>C1) AND (C1>C2) AND (O<C1) AND (O>O1) AND (O1<C2) AND (O1>O2) 
AND 
> (((H-C)/(H-L))<0.2) AND (((H1-C1)/(H1-L1))<0.2) AND 
> (((H2-C2)/(H2-L2))<0.2);
> DarkCloudCover = (C1>O1*1.01) AND (O>C) AND (O>H1) AND (C>O1) AND 
> (((C1+O1)/2)>C) AND (C>O1) AND (MA(C,13)-Ref(MA(C,13),-4)>0);
> ThreeBlackCrows = (O>C*1.01) AND (O1>C1*1.01) AND (O2>C2*1.01) AND 
> (C<C1) AND (C1<C2) AND (O>C1) AND (O<O1) AND (O1>C2) AND (O1<O2) 
AND 
> (((C-L)/(H-L))<0.2) AND (((C1-L1)/(H1-L1))<0.2) AND (((C2-L2)/(H2-
L2))<0.2);
> 
> Doji = (O == C);
> GapUpx = GapUp();
> GapDownx = GapDown();
> BigGapUp = L>1.01*H1;
> BigGapDown = H<0.99*L1;
> HugeGapUp = L>1.02*H1;
> HugeGapDown = H<0.98*L1;
> DoubleGapUp = GapUp() AND Ref(GapUp(),-1);
> DoubleGapDown = GapDown() AND Ref(GapDown(),-1);
> 
> cStatus =
> WriteIf(BlackMaubozu, "Marubozu, Black",
> WriteIf(WhiteMaubozu, "Marubzu, White",
> WriteIf(BlackClosingMarubozu, "Marubozu,Closing Black",
> WriteIf(WhiteClosingMarubozu, "Marubozu, Closing White",
> WriteIf(WhiteOpeningMarubozu, "Marubozu, Opening White",
> WriteIf(BlackOpeningMarubozu, "Marubozu,Opening Black",
> WriteIf(LongBlackCandle, "Black Candle, Long",
> WriteIf(LongWhiteCandle, "White Candle, Long",
> WriteIf(BearishAbandonedBaby, "Abandoned Baby, Bearish",
> WriteIf(BearishEveningDojiStar, "Doji, Evening Star",
> WriteIf(DarkCloudCover, "Dark Cloud Cover",
> WriteIf(BearishEngulfing, "Engulfing, Bearish",
> WriteIf(ThreeOutsideDownPattern, "Three Outside Down",
> WriteIf(HangingMan, "Hanging Man",
> WriteIf(BearishHarami, "Harami, Bearish",
> WriteIf(ThreeInsideDownPattern, "Three Inside Down",
> WriteIf(ThreeBlackCrows, "ThreeBlackCrows",
> WriteIf(Hammer, "Hammer",
> WriteIf(InvertedHammer, "Hammer, Inverted",
> WriteIf(ShootingStar, "Shooting Star",
> WriteIf(BullishAbandonedBaby, "Abandoned Baby, Bullish",
> WriteIf(BullishEngulfing, "Engulfing, Bullish",
> WriteIf(BullishHarami, "Harami, Bullish",
> WriteIf(BullishMorningDojiStar, "Doji, Morning Star",
> WriteIf(ThreeOutsideUpPattern, "Three Outside Up",
> WriteIf(ThreeInsideUpPattern, "Three Inside Up",
> WriteIf(PiercingLine, "Piercing Line",
> WriteIf(ThreeWhiteSoldiers, "Three White Soldiers",
> WriteIf(BlackSpinningTop, "Spinning Top, Black",
> WriteIf(WhiteSpinningTop, "Spinning Top, Whaite",
> WriteIf(BlackCandle, "Black Candle",
> WriteIf(SmallBlackCandle, "Black Candle, Small",
> WriteIf(SmallWhiteCandle, "White Candle, Small",
> WriteIf(WhiteCandle, "White Candle",
> WriteIf(doji, "Doji",
> "")))))))))))))))))))))))))))))))))));
> 
> "";
> P_status =
> WriteIf(GapUpx, "Gap Up",
> WriteIf(GapDownx, "Gap Down",
> WriteIf(BigGapUp, "Big Gap Up",
> WriteIf(BigGapDown, "Big Gap Down",
> WriteIf(HugeGapUp, "Huge Gap Up",
> WriteIf(HugeGapDown, "Huge Gap Down",
> WriteIf(DoubleGapUp, "Double Gap Up",
> WriteIf(DoubleGapDown, "DoubleGapDown",
> "Zilch" ))))))));
> 
> Filter = 1;
> 
> 
> AddTextColumn(cStatus, "Candle", 5.6, colorWhite,
> IIf(BlackMaubozu OR WhiteMaubozu OR BlackClosingMarubozu OR
> WhiteClosingMarubozu OR WhiteOpeningMarubozu OR 
BlackOpeningMarubozu OR
> LongBlackCandle OR LongWhiteCandle, colorBlue,
> IIf(BearishAbandonedBaby OR BearishEveningDojiStar OR 
DarkCloudCover OR
> BearishEngulfing OR ThreeOutsideDownPattern OR HangingMan OR 
> BearishHarami OR
> ThreeInsideDownPattern OR ThreeBlackCrows, colorRed,
> IIf(Hammer OR InvertedHammer OR ShootingStar OR 
BullishAbandonedBaby OR
> BullishEngulfing OR BullishHarami OR BullishMorningDojiStar OR
> ThreeOutsideUpPattern OR ThreeInsideUpPattern OR PiercingLine OR
> ThreeWhiteSoldiers, colorGreen,
> IIf(BlackSpinningTop OR WhiteSpinningTop OR BlackCandle OR
> SmallBlackCandle OR SmallWhiteCandle OR WhiteCandle OR doji, 
> colorDarkYellow,0)))));
> 
> 
> AddTextColumn(P_Status, "Bar Pattern", 5.6, colorWhite, IIf
(GapDownx OR
> BigGapDown OR HugeGapDown OR DoubleGapDown, colorRed,
> IIf(GapUpx OR BigGapUp OR HugeGapUp OR DoubleGapUp, colorGreen, 
> colorLightGrey)));
> _SECTION_END();.
>



------------------------------------

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/