GT
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
ZigZag Help
Collapse
X
-
ZigZag Help
Will someone explain to me when a new zigzag high or low is actually formed? Is it after a certain number of bars? If my thinking is way wrong will someone just explain the actual technical ways it is calculated and plotted. Thanks!
GTTags: None
-
Current Deviation Value
Hi,
I want to display the deviation value above/below each bar.. Also want to display this value as the currentbar is forming..
I'm new to this language so strangling to work out what is the name of the value is.
I know that you have to set a reference deviation value so that when it is breached a
blue line is plotted.
And where in the code it is found?
I want to use the DrawText object.
example..
DrawText("DeviationTag", currentdeviationValue, 0, 20,Color.Blue)
The reason I want to do this is for learning pruposes..want to see exactly what is happening.
There must be a Dynamic Deviation value as well as a value that is stored when the
reference Deviation Value is breached.
Cheers
Bruce
Comment
-
Hi Bruce,
Thanks for the post and welcome to the NinjaTrader forums!
This page can help you with some code drawing tips.
One thing you'll want to do is add + CurrentBar to the tag to allow uniquely tagged drawing objects. You also might want to base the Y position on bar objects, like highs or lows.
DrawText("DeviationTag" + CurrentBar, currentdeviationValue, 0, High[0],Color.Blue);
An example of using StdDev is available here:
Ryan M.NinjaTrader Customer Service
Comment
-
ok thanks for the info..
Can anybody tell me if I want to display the current deviation value..what is the name of the string or INT?
As far as I can see the user inputs a reference value named 'Deviation Value'...this may be say 0.08 if using percentages as type.. The program obviuosly works out the current deviation value as
each candle(bar) is forming. Once this 0.08 value is exceeded a blue line is drawn. So just need the name of the string of INT variable so I can print to screen.
Thanks
Bruce
Comment
-
You can edit the ZigZag source code if you want to see more info on how internal variables are defined. DeviationValue in this indicator is an input, so the value is only what a user types in when applying.
[Description("Deviation in percent or points regarding on the deviation type")]
[GridCategory("Parameters")]
[Gui.Design.DisplayName("Deviation value")]
public double DeviationValue
{
get { return deviationValue; }
set { deviationValue = Math.Max(0.0, value); }
}Ryan M.NinjaTrader Customer Service
Comment
-
Editing Ninja Indicator
Hi Ryan,
Thanks for your help..
I've worked out the deviation Values location..
Have another question on how we can save and edited script.
EG ZigZag.
If I use the NInja editor and copy and paste code from the ZIGZAG indicator to a new indicator say named ZZ2 when I click save it looks like it saves it in the ninja folders as @ZZ2.cs where I can also see the @ZigZag.cs indicator but when I want to add my new ZZ2 to a chart the ZZ2 indicator is not listed.
Is there something else I need to do?
Cheers
Bruce
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Jon17, Today, 04:33 PM
|
0 responses
1 view
0 likes
|
Last Post
by Jon17
Today, 04:33 PM
|
||
Started by Javierw.ok, Today, 04:12 PM
|
0 responses
4 views
0 likes
|
Last Post
by Javierw.ok
Today, 04:12 PM
|
||
Started by timmbbo, Today, 08:59 AM
|
2 responses
10 views
0 likes
|
Last Post
by bltdavid
Today, 04:10 PM
|
||
Started by alifarahani, Today, 09:40 AM
|
6 responses
41 views
0 likes
|
Last Post
by alifarahani
Today, 03:18 PM
|
||
Started by Waxavi, Today, 02:10 AM
|
1 response
20 views
0 likes
|
Last Post Today, 03:03 PM |
Comment