Originally Posted by lonew0lf I have fairly simple question (at least i think it is for anyone who codes). I'd like the following indicator to plot the text of the type of candlestick rather than dots.
Below is from MC and this indicates doji. Looking to have the text display above/below the bar, thanks.
inputs: Percent( 5 ) ;
if C_Doji( Percent ) = 1 then
begin
Plot1( Close, "Doji" ) ;
Alert( "Doji" ) ;
end ; |
This is how its done in TS, it should work in MC too.
//-------------------------------------------------------------------------------------------------------------------
Input: My_TEXT ("Doji");
Input: Txt_below_bar (2);
Input: Long_Clr (magenta);
Input: Horizdown (3);
Input: Vertdown (2);
inputs: Percent( 5 ) ;
variables:Text_ID2(0),one tick(0);
onetick = minmove/pricescale;
if C_Doji( Percent ) = 1 then
begin
Text_ID2 = Text_New( Date, Time, low-Txt_below_bar*onetick, My_TEXT );
text_setcolor( Text_ID2,long_clr) ;
Text_SetStyle(Text_ID2, horizdown, vertdown);
end;
//--------------------------------------------------------------------------------------------------------------------