I could really use the Fibonacci Fan tool for NT8. Maybe possible to make on from the existing Fib tools or is there something available already?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Fibonacci Fan tool for NT8?
Collapse
X
-
Hello chrille,
My name is Jess and I will be happy to answer any questions that come up while you develop this indicator. As a first step, I would recommend creating a "stock" indicator by visiting New -> NinjaScript Editor, right-clicking Indicator on the right, selecting "New Indicator", following along in the wizard long enough to give your Indicator a name, then clicking "Generate". I would then recommend putting bare minimum code for each of the Fibo drawing tools documented here in your OnBarUpdate method :
Fibo Retracements
Code:[FONT=Courier New] [/FONT][FONT=Courier New][COLOR=#008000]// Draws a fibonnaci retracement[/COLOR] [/FONT] [FONT=Courier New]Draw.FibonacciRetracements([COLOR=#0000ff]this[/COLOR],[COLOR=#ffffff] [/COLOR][COLOR=#800000]"tag1"[/COLOR],[COLOR=#ffffff] [/COLOR][COLOR=#0000ff]true[/COLOR],[COLOR=#ffffff] [/COLOR][COLOR=#ff6600]10[/COLOR],[COLOR=#ffffff] [/COLOR]Low[[COLOR=#ff6600]10[/COLOR]],[COLOR=#ffffff] [/COLOR][COLOR=#ff6600]0[/COLOR],[COLOR=#ffffff] [/COLOR]High[[COLOR=#ff6600]0[/COLOR]]);[/FONT]
Code:[FONT=Courier New] [/FONT][FONT=Courier New][COLOR=#008000]// Draws a Fibonacci circle[/COLOR] [/FONT] [FONT=Courier New]Draw.FibonacciCircle([COLOR=#0000ff]this[/COLOR],[COLOR=#ffffff] [/COLOR][COLOR=#800000]"tag1"[/COLOR],[COLOR=#ffffff] [/COLOR][COLOR=#0000ff]true[/COLOR],[COLOR=#ffffff] [/COLOR][COLOR=#ff6600]10[/COLOR],[COLOR=#ffffff] [/COLOR]Low[[COLOR=#ff6600]10[/COLOR]],[COLOR=#ffffff] [/COLOR][COLOR=#ff6600]0[/COLOR],[COLOR=#ffffff] [/COLOR]High[[COLOR=#ff6600]0[/COLOR]]);[/FONT]
Code:[FONT=Courier New] [/FONT][FONT=Courier New][COLOR=#008000]// Draws a fibonnaci extension[/COLOR] [/FONT] [FONT=Courier New]Draw.FibonacciExtensions([COLOR=#0000ff]this[/COLOR],[COLOR=#ffffff] [/COLOR][COLOR=#800000]"tag1"[/COLOR],[COLOR=#ffffff] [/COLOR][COLOR=#0000ff]true[/COLOR],[COLOR=#ffffff] [/COLOR][COLOR=#ff6600]4[/COLOR],[COLOR=#ffffff] [/COLOR]Low[[COLOR=#ff6600]4[/COLOR]],[COLOR=#ffffff] [/COLOR][COLOR=#ff6600]3[/COLOR],[COLOR=#ffffff] [/COLOR]High[[COLOR=#ff6600]3[/COLOR]],[COLOR=#ffffff] [/COLOR][COLOR=#ff6600]1[/COLOR],[COLOR=#ffffff] [/COLOR]Low[[COLOR=#ff6600]1[/COLOR]]);[/FONT]
Code:[FONT=Courier New] [/FONT][FONT=Courier New][COLOR=#008000]// Draws a fibonacci time extension object[/COLOR] [/FONT] [FONT=Courier New]Draw.FibonacciTimeExtensions([COLOR=#0000ff]this[/COLOR],[COLOR=#ffffff] [/COLOR][COLOR=#800000]"tag1"[/COLOR],[COLOR=#ffffff] [/COLOR][COLOR=#0000ff]false[/COLOR],[COLOR=#ffffff] [/COLOR][COLOR=#ff6600]10[/COLOR],[COLOR=#ffffff] [/COLOR]Low[[COLOR=#ff6600]10[/COLOR]],[COLOR=#ffffff] [/COLOR][COLOR=#ff6600]0[/COLOR],[COLOR=#ffffff] [/COLOR]High[[COLOR=#ff6600]0[/COLOR]]);[/FONT]
If you would like the services of a certified NinjaScript consultant, please let us know and I will be happy to ask a more community savvy colleague to weigh in.
Happy coding and happy trading!Jessica P.NinjaTrader Customer Service
Comment
-
Thank you for asking, AnkaS.
We do now directly support creating custom drawing tools, including Fibo fans, in NinjaTrader 8. You will want to investigate this link
I am attaching a script which contains code that comes with NinjaTrader 8 and a dummied out DrawGannFann method for you to fill inAttached FilesLast edited by NinjaTrader_JessicaP; 10-19-2016, 10:35 AM.Jessica P.NinjaTrader Customer Service
Comment
-
If you are on a company or public terminal it may be that your systems administrator is not allowing you to download source code files from the internet. Otherwise you may want to review your browser configuration so that you are able to download code samples from the NinjaTrader forums and other places on the internet.
As a convenience, I have pasted the code into a block here. You will want to save it as (My) Documents\NinjaTrader 8\bin\Custom\DrawingTools\ExampleFan.cs
Code:[FONT=Courier New]// // Copyright (C) 2016, NinjaTrader LLC <www.ninjatrader.com>. // NinjaTrader reserves the right to modify or overwrite this NinjaScript component with each release. // #region Using declarations using System; using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Windows; using System.Windows.Input; using System.Windows.Media; using NinjaTrader.Core.FloatingPoint; using NinjaTrader.Gui; using NinjaTrader.Gui.Chart; using NinjaTrader.Gui.Tools; #endregion namespace NinjaTrader.NinjaScript.DrawingTools { // when creating a custom type converter for drawing tools it must inherit from DrawingToolsPropertyConverter to work correctly with chart anchors public class ExampleFan : Gui.DrawingTools.DrawingToolPropertiesConverter { /// <summary> /// TODO: describe your DrawGannFan method here /// </summary> /// <parameter name="argument">TODO: describe your arguments</parameter> /// <returns>TODO: describe what DrawGannFan returns</returns> public static FibonacciRetracements DrawGannFan(object argument) { // TODO: your code here, then return non-null return null; } public override bool GetPropertiesSupported(ITypeDescriptorContext context) { return true; } public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes) { // override the GetProperties method to return a property collection that hides extended lines & text alignment properties // since they do not apply to fib circle / time PropertyDescriptorCollection propertyDescriptorCollection = base.GetPropertiesSupported(context) ? base.GetProperties(context, value, attributes) : TypeDescriptor.GetProperties(value, attributes); PropertyDescriptorCollection adjusted = new PropertyDescriptorCollection(null); foreach (PropertyDescriptor property in propertyDescriptorCollection) if (property.Name != "IsExtendedLinesRight" && property.Name != "IsExtendedLinesLeft" && property.Name != "TextLocation") adjusted.Add(property); return adjusted; } } }[/FONT]
Jessica P.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by elderan, Yesterday, 08:03 PM
|
1 response
12 views
0 likes
|
Last Post Today, 07:52 AM | ||
Started by samish18, Yesterday, 08:57 AM
|
8 responses
25 views
0 likes
|
Last Post
by samish18
Today, 07:51 AM
|
||
Started by DJ888, 04-16-2024, 06:09 PM
|
3 responses
10 views
0 likes
|
Last Post Today, 07:41 AM | ||
Started by RookieTrader, Today, 07:41 AM
|
0 responses
3 views
0 likes
|
Last Post
by RookieTrader
Today, 07:41 AM
|
||
Started by maybeimnotrader, Yesterday, 05:46 PM
|
1 response
18 views
0 likes
|
Last Post Today, 07:28 AM |
Comment