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.
Print text and special graphics from an Indicator or Signal
Print text and special graphics from an Indicator or Signal
- Attachments
-
- PrintText_S.zip
- (3.67 KiB) Downloaded 665 times
Re: Print text and special graphics from an Indicator or Sig
NW27, How do we print Triangle and Inverted Triangle.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.
Martin
Re: Print text and special graphics from an Indicator or Sig
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
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
OK, I seeHave 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
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
-
- Posts: 62
- Joined: 03 Nov 2011
- Has thanked: 12 times
- Been thanked: 2 times
Re: Print text and special graphics from an Indicator or Sig
thank you so much for posting this...it is so much better than other options for putting stuff on the chart.
THANK YOU
THANK YOU
-
- Posts: 55
- Joined: 10 Jul 2014
- Has thanked: 10 times
- Been thanked: 18 times
Re: Print text and special graphics from an Indicator or Sig
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.
It really is a nice way to finally get some new icons on a chart - shame really.