Page 1 of 1

Print text and special graphics from an Indicator or Signal

Posted: 05 Jan 2012
by NW27
Hi,

Attached is a function to print text easily on a chart, from a indicator OR signal.

Prints Text or a Special Character (WindDing) at a certain Date&Time.
The font Size, position (relative to the current bar) and color can be set.
The text can be either written in a horizontal format or a vertical format.
Note - This function can be used within Signals. Greatly enhancing the veiwing of signal opeartion.

The special characters already defined are -
- Arrows Up,Dn,Left,Right, and in between ie Arrow in a North West direction (ArrNW)
- Triangles Up, Dn, Left, Right both in a Solid and Hollow form.

Examples
PrintText_S(date,time_s,High+3,1,2,black,15,True,"SHORT",False); // "Short" is written Vertically above the price

PrintText_S(date,time_s,ExitLevel,2,2,blue,10,False,"BE",False); // "BE" is written horizontally

PrintText_S(date,time_s,Low-4,2,2,DarkGreen,10,False,"TriHollowDn",True); // Display a Hollowed triangle

Note - The time input requires seconds ie 123456, which equals "12:45:56"

Neil.

Re: Print text and special graphics from an Indicator or Sig

Posted: 10 Jul 2012
by arjfca
Hi,

Attached is a function to print text easily on a chart, from a indicator OR signal.

Prints Text or a Special Character (WindDing) at a certain Date&Time.
The font Size, position (relative to the current bar) and color can be set.
The text can be either written in a horizontal format or a vertical format.
Note - This function can be used within Signals. Greatly enhancing the veiwing of signal opeartion.

The special characters already defined are -
- Arrows Up,Dn,Left,Right, and in between ie Arrow in a North West direction (ArrNW)
- Triangles Up, Dn, Left, Right both in a Solid and Hollow form.

Examples
PrintText_S(date,time_s,High+3,1,2,black,15,True,"SHORT",False); // "Short" is written Vertically above the price

PrintText_S(date,time_s,ExitLevel,2,2,blue,10,False,"BE",False); // "BE" is written horizontally

PrintText_S(date,time_s,Low-4,2,2,DarkGreen,10,False,"TriHollowDn",True); // Display a Hollowed triangle

Note - The time input requires seconds ie 123456, which equals "12:45:56"

Neil.
NW27, How do we print Triangle and Inverted Triangle.

Martin

Re: Print text and special graphics from an Indicator or Sig

Posted: 10 Jul 2012
by NW27
Have a look in the source code of the printtext for the different styles of built in symbols.
It uses the wing ding font so printtext could be changed to add what ever other symbols you like.
Neil

Re: Print text and special graphics from an Indicator or Sig

Posted: 10 Jul 2012
by arjfca
Have a look in the source code of the printtext for the different styles of built in symbols.
It uses the wing ding font so printtext could be changed to add what ever other symbols you like.
Neil
OK, I see

I'm trying to figure how to reference a letter like "r" to display TriHollowUp.

What I want to print is these characters that represent a triangle arrows in Wingding

0215 ×
0216 Ø
0217 Ù
0218 Ú

Thanks for the code

Martin
Montreal, Canada

Re: Print text and special graphics from an Indicator or Sig

Posted: 19 Sep 2012
by greenroomhoo
thank you so much for posting this...it is so much better than other options for putting stuff on the chart.

THANK YOU

Re: Print text and special graphics from an Indicator or Sig

Posted: 12 Aug 2014
by javamarket
I find if I apply this text function to more than 2 workspaces MC becomes unstable / unusable.
It really is a nice way to finally get some new icons on a chart - shame really.