Horizontal arrows. Is it possible to display?

Questions about MultiCharts and user contributed studies.
arjfca
Posts: 1273
Joined: 23 Nov 2010
Has thanked: 721 times
Been thanked: 222 times

Horizontal arrows. Is it possible to display?

Postby arjfca » 26 Sep 2011

Hello

I kow I could display vertical arrrows, but how about horizontal one? I have not seen how to code for it.

Any help appreciated

Martin

User avatar
Henry MultiСharts
Posts: 8510
Joined: 25 Aug 2011
Has thanked: 1213 times
Been thanked: 2733 times

Re: Horizontal arrows. Is it possible to display?

Postby Henry MultiСharts » 27 Sep 2011

This feature has not been implemented yet. You may want to submit a feature request to the Project Management of our web site so other users can vote for it: https://www.multicharts.com/pm/
As a workaround you can plot an arrow with the help of three trend lines.
These users thanked the author Henry MultiСharts for the post:
arjfca

User avatar
TJ
Posts: 6586
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 971 times
Been thanked: 1907 times

Re: Horizontal arrows. Is it possible to display?

Postby TJ » 27 Sep 2011

I use the text characters > and < as substitute.

you can also change the font and use wingding characters.

http://en.wikipedia.org/wiki/Wingdings

Image
These users thanked the author TJ for the post (total 4):
Henry MultiСhartsarjfcaNW27JoshM

arjfca
Posts: 1273
Joined: 23 Nov 2010
Has thanked: 721 times
Been thanked: 222 times

Re: Horizontal arrows. Is it possible to display?

Postby arjfca » 27 Sep 2011

TJ Thank you!

Excuse my ignorance but how do you change the characters table?

Martin

User avatar
TJ
Posts: 6586
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 971 times
Been thanked: 1907 times

Re: Horizontal arrows. Is it possible to display?

Postby TJ » 27 Sep 2011

arjfca wrote:TJ Thank you!

Excuse my ignorance but how do you change the characters table?

Martin


use
Text_SetFontName

Windows has a large collection of fonts,
many are already installed in your computer.

You can check them in your Windows program
Start > Control Panel > Fonts
These users thanked the author TJ for the post (total 2):
arjfcaJoshM

NW27
Posts: 177
Joined: 25 Dec 2010
Has thanked: 40 times
Been thanked: 83 times

Re: Horizontal arrows. Is it possible to display?

Postby NW27 » 28 Sep 2011

Hi,

You may also want to download some code that I have posted on the BigMikeTrading website.
http://www.bigmiketrading.com/download/multicharts/968-download.html?view
Basically, it allows you to easily write text on a chart.
In this instance, it writes the day of the week ie "Wednesday" vertically on the chart at the beginning of the day.
I created a function that is called PrintText.
The PrintText function has input parameters for the Day,time,position,text,size,color AND printing of the text in either a horizontal or vertical format.
So a single line plonks the text onto the chart.
This function could be easily expanded to permit easy printing of the Wingdings.
Neil.

P.S. There are a couple of other downloads I have created there as well that people may find interesting.
1) BarTimer with notification via a WAV file just prior to the end of the bar.
2) Intraday Event Reminder. Good to remind you of upcoming News events etc.
These users thanked the author NW27 for the post (total 2):
arjfcakiasom

NW27
Posts: 177
Joined: 25 Dec 2010
Has thanked: 40 times
Been thanked: 83 times

Re: Horizontal arrows. Is it possible to display?

Postby NW27 » 28 Sep 2011

OK, here is your Horizontal arrows and plenty of others to play with.

First you need to create a function in the Power Language editor.
Select File\New\Function and call it "PrintText". Obviously leave the quotes out.
Now copy and paste the below code into the editor.
Press F3 to compile and you should now have a new function called PrintText.

Code: Select all

{
   Type - Function
   Name - PrintText
   Desc - Prints the text in the require format
        Written by Neil Wrightson

   Version    Date       Reason
   1         04/10/2007   Start
   2         29/09/2011   Add WingDings

}


Inputs:    DateInp(Numeric),      // Enter in the required date that the text is to be plotted on ie (Date)
         TimeInp(Numeric),      // Enter in the required time that the text is to be plotted on ie (Date)
         Price(Numeric),      // This is the base position from where to start writing the text
         HorizPl(Numeric),      // See below usage notes
         VertPl(Numeric),      // See below usage notes
         Color(Numeric),      // ie Red, Green, DarkBlue
         Size(Numeric),         // This is the point size ie 10,20, 40
         Vertical(TrueFalse),   // If true the text will be written vertically (must be either true or false)
         TextInp(String),      // Actual text to be displayed - (must be in double quotes ie "FRED")
         UseWingDings(TrueFalse); // If True then select Winding 3 font else normal text font


{   Usage Notes
HorizPl - a numerical expression specifying the horizontal placement style for the text object:

 0 - to the right of the specified bar
 1 - to the left of the specified bar
 2 - centered on the specified bar

VertPl - a numerical expression specifying the vertical placement style for the text object:

 0 - below the specified price value
 1 - above the specified price value
 2 - centered on the specified price value

Price value represents the vertical position corresponding to a value on the price scale of a chart.

WingDing3 examples at http://en.wikipedia.org/wiki/Arrow_(symbol)
}


Variables: Value1(0),Counter(0),Str("");

   Str = "";
   If Vertical then
      Begin
         For Counter=1 to Strlen(Textinp)
            Begin
               Str = Str+midstr(TextInp,Counter,1);
               Str = Str+"\n";
            End;
      end
   else
      Str = TextInp;
      
   
   If UseWingDings = False then
      Begin
         Value1 = Text_New(DateInp, TimeInp, Price ,"");
         Text_SetStyle(Value1, HorizPl, VertPl);
         Text_SetColor(Value1,Color);
         text_setsize(Value1,Size);
         Text_Setstring(Value1,Str);
         PrintText = Value1;
      End
   else
      begin
         Str = UpperStr(Str)      ;
         If Str = UpperStr("ArrUp") then
            Str = "h";
         If Str = UpperStr("ArrDn") then
            Str = "i";
         If Str = UpperStr("ArrRight") then
            Str = "g";
         If Str = UpperStr("ArrLeft") then
            Str = "f";
         If Str = UpperStr("ArrNW") then
            Str = "j";
         If Str = UpperStr("ArrNE") then
            Str = "k";
         If Str = UpperStr("ArrSE") then
            Str = "m";
         If Str = UpperStr("ArrSW") then
            Str = "l";
         If Str = UpperStr("TriSolidUp") then
            Str = "p";
         If Str = UpperStr("TriSolidDn") then
            Str = "q";
         If Str = UpperStr("TriSolidLeft") then
            Str = "t";
         If Str = UpperStr("TriSolidRight") then
            Str = "u";
         If Str = UpperStr("TriHollowUp") then
            Str = "r";
         If Str = UpperStr("TriHollowDn") then
            Str = "s";
         If Str = UpperStr("TriHollowLeft") then
            Str = "v";
         If Str = UpperStr("TriHollowRight") then
            Str = "w";
         If Str = UpperStr("ArrBigRight") then
            Str = "_";
         If Str = UpperStr("ArrBigLeft") then
            Str = "^";
   
         Value2 = Text_New(DateInp, TimeInp, Price ,"");
         Text_SetStyle(Value2, HorizPl, VertPl);
         Text_SetColor(Value2,Color);
         Text_SetAttribute(Value2,1,True);
         text_setsize(Value2,Size);
         Text_SetFontName(Value2,"WingDings 3");
         Text_Setstring(Value2,Str);
         PrintText = Value2;
      End
   


Sample Usages -

1. Print normal text onto the screen
PrintText(date,time+Time_offset,Price_Position,HorizPl,VertPl,Text_Color,Text_Size,false,"This is normal",False);
ie
PrintText(date,1234,High+5,2,2,green,20,False,"This is normal",False);

2. Print vertical text onto the screen
PrintText(date,time+Time_offset,Price_Position,HorizPl,VertPl,Text_Color,Text_Size,true,"This is vertical",False);
ie
PrintText(date,1234,Low-2,2,2,Blue,20,true,"This is Vertical",False);

3. Print a South East direction Arrow
PrintText(date,time,Price_Position,HorizPl,VertPl,green,Text_Size,Vertical,"ArrSE",True);
ie
PrintText(date,1234,High+5,2,2,green,20,False,"ArrSE",True);

Have a look at the code. You can print arrows Up,Dn,Left,Right, NE,NW,SE,SW Large Small and you can also print Triangles Up,Dn,Left & Right in both a solid form and a hollow form.

Note - If you don't type the name correctly you get gobbly gook, so check your spelling.
Upper or Lower case is fine.

Neil.
These users thanked the author NW27 for the post (total 5):
TJarjfcaJoshMkiasomCrazyNasdaq


Return to “MultiCharts”