Displaying a diamond over a bar

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

Displaying a diamond over a bar

Postby arjfca » 05 May 2011

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

User avatar
TJ
Posts: 6553
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 966 times
Been thanked: 1893 times

Re: Displaying a diamond over a bar

Postby TJ » 05 May 2011

arjfca wrote: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


There is no "diamond" drawing object.

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

arjfca
Posts: 1270
Joined: 23 Nov 2010
Has thanked: 720 times
Been thanked: 222 times

Re: Displaying a diamond over a bar

Postby arjfca » 05 May 2011

Thanks TJ

Your a real encyclopedia :) :)

Martin

User avatar
TJ
Posts: 6553
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 966 times
Been thanked: 1893 times

Re: Displaying a diamond over a bar

Postby TJ » 05 May 2011

arjfca wrote:Thanks TJ

Your a real encyclopedia :) :)

Martin


you are welcome.

Kinko Hyo
Posts: 44
Joined: 10 Jan 2012
Has thanked: 1 time

Re: Displaying a diamond over a bar

Postby Kinko Hyo » 15 Mar 2013

Hello,

has anyone the PDF for download? The link is defect.

Best regards
Kinko

User avatar
TJ
Posts: 6553
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 966 times
Been thanked: 1893 times

Re: Displaying a diamond over a bar

Postby TJ » 15 Mar 2013

Kinko Hyo wrote:Hello,

has anyone the PDF for download? The link is defect.

Best regards
Kinko

please do a google search for

wingdings character map

Kinko Hyo
Posts: 44
Joined: 10 Jan 2012
Has thanked: 1 time

Re: Displaying a diamond over a bar

Postby Kinko Hyo » 15 Mar 2013

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

User avatar
TJ
Posts: 6553
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 966 times
Been thanked: 1893 times

Re: Displaying a diamond over a bar

Postby TJ » 15 Mar 2013

Kinko Hyo wrote: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

At MultiCharts,
Press [F1], do a search for Text_SetFontName.
Usage example is there.

You replace whatever alphabetic character with the mapping.

Kinko Hyo
Posts: 44
Joined: 10 Jan 2012
Has thanked: 1 time

Re: Displaying a diamond over a bar

Postby Kinko Hyo » 15 Mar 2013

Hello TJ,

i think you mean this.
Image

But i don´t know, how i can plot it in the Chart, excuse me. :-)

Best reagrds
Kinko

User avatar
TJ
Posts: 6553
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 966 times
Been thanked: 1893 times

Re: Displaying a diamond over a bar

Postby TJ » 15 Mar 2013

Kinko Hyo wrote: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

Yes, you have the right page.

Did you read any of the links on the page?

Kinko Hyo
Posts: 44
Joined: 10 Jan 2012
Has thanked: 1 time

Re: Displaying a diamond over a bar

Postby Kinko Hyo » 15 Mar 2013

Yes, so i try this:

Code: Select all

if RSi > 40 then

Plot Text_GetFontName(3);


But it doesn´t create s symbol in the Chart.

Best Regards
Kinko

Kinko Hyo
Posts: 44
Joined: 10 Jan 2012
Has thanked: 1 time

Re: Displaying a diamond over a bar

Postby Kinko Hyo » 15 Mar 2013

look at this please.

Image

That is my target. :-)

Best regards
Kinko

User avatar
TJ
Posts: 6553
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 966 times
Been thanked: 1893 times

Re: Displaying a diamond over a bar

Postby TJ » 15 Mar 2013

Kinko Hyo wrote:Yes, so i try this:

Code: Select all

if RSi > 40 then
Plot Text_GetFontName(3);

But it doesn´t create s symbol in the Chart.
Best Regards
Kinko

Please read the information on that page carefully.

Please refer to post #2.
Please refer to post #8 AGAIN.

Kinko Hyo
Posts: 44
Joined: 10 Jan 2012
Has thanked: 1 time

Re: Displaying a diamond over a bar

Postby Kinko Hyo » 15 Mar 2013

I think i have no change. It doesn´t running.

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");


Best regards
Kinko

User avatar
TJ
Posts: 6553
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 966 times
Been thanked: 1893 times

Re: Displaying a diamond over a bar

Postby TJ » 15 Mar 2013

Kinko Hyo wrote:I think i have no change. It doesn´t running.

Here is my code:
Best regards
Kinko

Please start here:

EasyLanguage Essentials Programmers Guide
Text Objects.... pg 112

https://www.multicharts.com/multicharts/ ... mentation/

User avatar
furytrader
Posts: 353
Joined: 30 Jul 2010
Location: Chicago, IL
Has thanked: 154 times
Been thanked: 215 times

Re: Displaying a diamond over a bar

Postby furytrader » 15 Mar 2013

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.

Kinko Hyo
Posts: 44
Joined: 10 Jan 2012
Has thanked: 1 time

Re: Displaying a diamond over a bar

Postby Kinko Hyo » 15 Mar 2013

Yeah! That looks fine. Now i have the Text in the Chart.

Image

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");


The second part is not needed. Can you tell me, how i made the text "10-Bar-High" to an diamond?

Best regards
Kinko

User avatar
furytrader
Posts: 353
Joined: 30 Jul 2010
Location: Chicago, IL
Has thanked: 154 times
Been thanked: 215 times

Re: Displaying a diamond over a bar

Postby furytrader » 15 Mar 2013

Change your code as follows:

Code: Select all

if High > Highest(High,10)[1] then begin
    Value1 = Text_New (Date, Time, High, "u");
    Value2 = Text_SetFontName(value1, "Wingdings");
End;

I'm assuming you have a font called "Wingdings" on your computer.

Kinko Hyo
Posts: 44
Joined: 10 Jan 2012
Has thanked: 1 time

Re: Displaying a diamond over a bar

Postby Kinko Hyo » 15 Mar 2013

Hello furytrader,

that runs very fine. Can you tell me, how i can change the color from the object? Not in the Chart, but in the formula.

Thank you very much.

Best regards
Kinko

User avatar
furytrader
Posts: 353
Joined: 30 Jul 2010
Location: Chicago, IL
Has thanked: 154 times
Been thanked: 215 times

Re: Displaying a diamond over a bar

Postby furytrader » 15 Mar 2013

You would do something like:

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;


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.

Kinko Hyo
Posts: 44
Joined: 10 Jan 2012
Has thanked: 1 time

Re: Displaying a diamond over a bar

Postby Kinko Hyo » 15 Mar 2013

Thank you very much and have a great day.

User avatar
furytrader
Posts: 353
Joined: 30 Jul 2010
Location: Chicago, IL
Has thanked: 154 times
Been thanked: 215 times

Re: Displaying a diamond over a bar

Postby furytrader » 15 Mar 2013

You're welcome. Can we see what the chart looks like? (I've never seen this used before!)

Kinko Hyo
Posts: 44
Joined: 10 Jan 2012
Has thanked: 1 time

Re: Displaying a diamond over a bar

Postby Kinko Hyo » 15 Mar 2013

yes, but im not ready for this time. :-)

I search the things who are red in the picture, but i don´t find them by the wingdings.

Image

Have you an idea?

Greats
Kinko

User avatar
furytrader
Posts: 353
Joined: 30 Jul 2010
Location: Chicago, IL
Has thanked: 154 times
Been thanked: 215 times

Re: Displaying a diamond over a bar

Postby furytrader » 15 Mar 2013

I see them in Wingdings as character code 217 -- maybe try this character: ȗ and Ș

Kinko Hyo
Posts: 44
Joined: 10 Jan 2012
Has thanked: 1 time

Re: Displaying a diamond over a bar

Postby Kinko Hyo » 15 Mar 2013

hm, these symbols are not accept by easy language.

Thanks.

User avatar
MAtricks
Posts: 789
Joined: 09 Apr 2012
Has thanked: 286 times
Been thanked: 279 times

Re: Displaying a diamond over a bar

Postby MAtricks » 16 Mar 2013

It looks like everyone is trying things the hard way..

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 ;


Image
Attachments
2013-03-16_1154.png
2013-03-16_1154.png (29.3 KiB) Viewed 905 times
These users thanked the author MAtricks for the post:
TJ

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

Re: Displaying a diamond over a bar

Postby NW27 » 18 Mar 2013

Or, you could just download the code I wrote and do it in a single line.
http://www.multicharts.com/discussion/viewtopic.php?f=5&t=9785#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.


Return to “MultiCharts”