Displaying a diamond over a bar
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: Displaying a diamond over a bar
There is no "diamond" drawing object.Hello
How can i display a diamond over a bar.
I know how to plot a dot, or put text, but can't figure how to display a diamond.
Martin
You can draw an arrow, if that helps.
if you insist on a diamond,
you can use the text objects, and select the diamond character.
use Text_SetFontName to select the font "Wingdings".
then use the corresponding diamond character as the text object.
http://en.wikipedia.org/wiki/Wingdings
[edit] Also, please do a google search for
wingdings character map
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: Displaying a diamond over a bar
please do a google search forHello,
has anyone the PDF for download? The link is defect.
Best regards
Kinko
wingdings character map
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: Displaying a diamond over a bar
At MultiCharts,Hello TJ,
thank you. But how can i plot the diamond to the Chart?
Can you give me an example?
If... then plot ???
Greats
Kinko
Press [F1], do a search for Text_SetFontName.
Usage example is there.
You replace whatever alphabetic character with the mapping.
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: Displaying a diamond over a bar
Yes, you have the right page.Hello TJ,
i think you mean this.
But i don´t know, how i can plot it in the Chart, excuse me.
Best reagrds
Kinko
Did you read any of the links on the page?
Re: Displaying a diamond over a bar
Yes, so i try this:
But it doesn´t create s symbol in the Chart.
Best Regards
Kinko
Code: Select all
if RSi > 40 then
Plot Text_GetFontName(3);
Best Regards
Kinko
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: Displaying a diamond over a bar
Please read the information on that page carefully.Yes, so i try this:But it doesn´t create s symbol in the Chart.Code: Select all
if RSi > 40 then
Plot Text_GetFontName(3);
Best Regards
Kinko
Please refer to post #2.
Please refer to post #8 AGAIN.
Re: Displaying a diamond over a bar
I think i have no change. It doesn´t running.
Here is my code:
Best regards
Kinko
Here is my code:
Code: Select all
inputs:
Price( Close ),
Length( 14 ),
OverSold( 30 ),
OverBought( 70 ),
OverSColor( Cyan ),
OverBColor( Red ) ;
variables: var0( 0 ) ;
var0 = RSI( Price, Length ) ;
Plot1( var0, "RSI" ) ;
Plot2( OverBought, "OverBot" ) ;
Plot3( OverSold, "OverSld" ) ;
if var0 > OverBought then
Text_SetFontName(3, "Verdana")
else if var0 < OverSold then
Text_SetFontName(3, "Verdana");
Kinko
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: Displaying a diamond over a bar
Please start here:I think i have no change. It doesn´t running.
Here is my code:
Best regards
Kinko
EasyLanguage Essentials Programmers Guide
Text Objects.... pg 112
https://www.multicharts.com/multicharts ... mentation/
- furytrader
- Posts: 354
- Joined: 30 Jul 2010
- Location: Chicago, IL
- Has thanked: 155 times
- Been thanked: 217 times
Re: Displaying a diamond over a bar
When the signal generates, you set the character to display using the Text_New command and then set you the font for the text you just created to windings, so it's something like:
value1 = Text_New(bar date, bar time, price value, "u")
value2 = Text_SetFontName(value1, "Wingdings")
... since "u" corresponds to the diamond symbol in wingdings.
Hope this helps.
value1 = Text_New(bar date, bar time, price value, "u")
value2 = Text_SetFontName(value1, "Wingdings")
... since "u" corresponds to the diamond symbol in wingdings.
Hope this helps.
Re: Displaying a diamond over a bar
Yeah! That looks fine. Now i have the Text in the Chart.
With this Code.
The second part is not needed. Can you tell me, how i made the text "10-Bar-High" to an diamond?
Best regards
Kinko
With this Code.
Code: Select all
if High > Highest(High,10)[1] then
Value1 = Text_New (Date, Time, High, "10-Bar High");
if High > Highest(High,10)[1] then
Value1 = Text_SetFontName(3, "Verdana");
Best regards
Kinko
- furytrader
- Posts: 354
- Joined: 30 Jul 2010
- Location: Chicago, IL
- Has thanked: 155 times
- Been thanked: 217 times
Re: Displaying a diamond over a bar
Change your code as follows:
I'm assuming you have a font called "Wingdings" on your computer.
Code: Select all
if High > Highest(High,10)[1] then begin
Value1 = Text_New (Date, Time, High, "u");
Value2 = Text_SetFontName(value1, "Wingdings");
End;
- furytrader
- Posts: 354
- Joined: 30 Jul 2010
- Location: Chicago, IL
- Has thanked: 155 times
- Been thanked: 217 times
Re: Displaying a diamond over a bar
You would do something like:
There is a whole list of colors you can use, and you can also use RGB values too. See the sections on the Wiki and in the documentation on colors.
Code: Select all
if High > Highest(High,10)[1] then begin
Value1 = Text_New (Date, Time, High, "u");
Value2 = Text_SetFontName(value1, "Wingdings");
value3 = Text_SetColor(value1, yellow);
End;
- furytrader
- Posts: 354
- Joined: 30 Jul 2010
- Location: Chicago, IL
- Has thanked: 155 times
- Been thanked: 217 times
Re: Displaying a diamond over a bar
You're welcome. Can we see what the chart looks like? (I've never seen this used before!)
- furytrader
- Posts: 354
- Joined: 30 Jul 2010
- Location: Chicago, IL
- Has thanked: 155 times
- Been thanked: 217 times
Re: Displaying a diamond over a bar
I see them in Wingdings as character code 217 -- maybe try this character: ȗ and Ș
Re: Displaying a diamond over a bar
It looks like everyone is trying things the hard way..
Kinko, give my edit to your code a try:
Kinko, give my edit to your code a try:
Code: Select all
inputs:
Length( 14 ),
OverSold( 30 ),
OverBought( 70 ),
OverSColor( Cyan ),
OverBColor( Red ),
ArwSize( 1 ),
ArwUpColor( Green ),
ArwDownColor( Red ) ;
variables: var0( 0 ), arw( 0 ) ;
var0 = RSI( C, Length ) ;
Plot1( var0, "RSI" ) ;
Plot2( OverBought, "OverBot" ) ;
Plot3( OverSold, "OverSld" ) ;
if var0 crosses over OverBought then begin
arw = arw_New(Date, Time, Low, false );
arw_setsize(arw, arwsize);
arw_SetColor(arw, arwupcolor);
end ;
if var0 crosses under OverSold then begin
arw = arw_New(Date, Time, High, true );
arw_setsize(arw, arwsize);
arw_SetColor(arw, arwdowncolor);
end ;
- Attachments
-
- 2013-03-16_1154.png
- (29.3 KiB) Downloaded 2202 times
Re: Displaying a diamond over a bar
Or, you could just download the code I wrote and do it in a single line.
http://www.multicharts.com/discussion/v ... 785#p46708
As per -
if var0 crosses over OverBought then begin
PrintText_S(date,time_s,Low-4,2,2,DarkGreen,10,False,"TriHollowDn",True); // Display a Hollowed triangle
end ;
Neil.
http://www.multicharts.com/discussion/v ... 785#p46708
As per -
if var0 crosses over OverBought then begin
PrintText_S(date,time_s,Low-4,2,2,DarkGreen,10,False,"TriHollowDn",True); // Display a Hollowed triangle
end ;
Neil.