Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Size of arrow/diamond etc?
Collapse
X
-
Originally posted by ju1234 View PostIs there a way to control the size of the arrow / diamond etc that are drawn on the chart?
Code:#region Variables private int markersize = 15; private System.Drawing.Font textFont;
Code:protected override void Initialize() { textFont = new Font("Wingdings 3",markersize);
Code:protected override void OnBarUpdate() { DrawText("This is an up arrow","‡",0,High[0]+TickSize,Color.Blue, textFont, StringAlignment.Center, Color.Transparent, Color.Transparent, 0); DrawText("This is a down arrow","ˆ",0,Low[0]-TickSize,Color.Red, textFont, StringAlignment.Center, Color.Transparent, Color.Transparent, 0);
Code:#region Properties [Description("Marker Size")] [Category("Visual")] [Gui.Design.DisplayName("Marker Size")] public int MarkerSize { get { return markersize; } set { markersize = Math.Max(1,value); } }
Comment
-
You must use the exact Font Name as displayed in the Upper Left DropDown of the "charmap". On my computer I do not have "Wingdings 3" but I do have "Wingdings" and many more. MarkerSize is just an int variable for the Font Size. So make this change if needed.
// textFont = new Font("Wingdings 3",markersize);
textFont = new Font("Wingdings",markersize);
To get to the charmap Strat / Run / type in "charmap" if you did not already know that.
Hope that helps.
Comment
-
Will it be possible to change the scale of the various Chart Markers in the Draw Tools menu in version 7 ?? ....the existing markers are so small one cannot (easily) tell the difference between them, and they can easily get lost in a chart being so small currently.
Thanks...
Comment
-
When using these special characters from the wingding files, how do we type the character into our NinjaScript file ? I'm assuming the need to use some ALT+(ASCII CODE) at the keyboard for the extended code, but I'm not able to do that as the script uses the default font loaded at that time and the character comes out different?
Please advise.
Comment
-
Open Wordpad, type all the characters of the top row, repeat with shifted keys, then repeat this process with all the other key rows. You should have eight rows of characters. Highlight the whole bunch, move down a (blank) line, paste. Repeat pasting a few times. Now, keeping the top batch as reference, highlight the second group and then select a wingdings character set. Highlight the third group and then change to a different wingdings set. Repeat process for every symbol set you have. Save file and use for reference any time you want to include special characters.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Karado58, 11-26-2012, 02:57 PM
|
8 responses
14,826 views
0 likes
|
Last Post Today, 09:09 AM | ||
Started by Option Whisperer, Today, 09:05 AM
|
0 responses
1 view
0 likes
|
Last Post Today, 09:05 AM | ||
Started by cre8able, Yesterday, 01:16 PM
|
3 responses
11 views
0 likes
|
Last Post
by cre8able
Today, 08:28 AM
|
||
Started by Harry, 05-02-2018, 01:54 PM
|
10 responses
3,204 views
0 likes
|
Last Post
by tharton3
Today, 08:52 AM
|
||
Started by ChartTourist, Today, 08:22 AM
|
0 responses
6 views
0 likes
|
Last Post
by ChartTourist
Today, 08:22 AM
|
Comment