Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
SMA Slope Direction Color Indicator Add-On
Collapse
X
-
Hello Mike3238,
There is a similar existing script that demonstrates this using the EMA that can be adapted to your needs.
Below is a public link to the User App Share section of the NinjaTrader Ecosystem.
This is a conversion of the NT7 indicator EMASlopeColor. Please contact the original author for any questions or comments. Colors the EMA plot when rising or falling.
This script could be copied and then modified to call the SMA instead of the EMA.
I am happy to answer any questions you may have about NinjaScript if you decide to code this yourself.
This thread will remain open for any community members that may know of an existing script that already uses the SMA or would like to make the modifications on your behalf.
You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our business development follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request.
The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.Chelsea B.NinjaTrader Customer Service
-
Thank you very much for your reply to my query Chelsea. I have downloaded into my NT8 the add-on link you forwarded for EMA slope color. However, could you kindly explain how that script file may be modified to call the SMA? Just fyi, I trade with the NT8 Direct Edition, so I do not have advanced Ninja Script options at my disposal.
Regards, Mike.
Comment
-
Hello Mike,
For script development you would need to be using a leased or lifetime license key, or the simulation only license key which allows the NinjaScript Editor to open.
Please send an email to platformsales [at] ninjatrader [dot] com if you would like to obtain one of these licenses.
Scripts can be copied in the NInjaScript Edtior. Right-click the script select Save-As, give the script a new name, click OK.
Change any call to EMA() to SMA(), then compile.Chelsea B.NinjaTrader Customer Service
Comment
-
Hi Chelsea,
I was able to login with my former Simulation license key. I successfully followed your NinjaScript Editor instructions, up to copying and renaming that script. After that point, I was uncertain how to edit the copied script; i.e. changing any call from EMA() to SMA() and then compiling to transfer the amended script to the indicator drop down list.
I'm very sorry to complicate the matter, but this was my first attempt at editing a NinjaScript.
If you have the time and at your convenience, a walk-through reply would be greatly appreciated.
Thanks.
Comment
-
Hello Mike3238,
I took a look at the code and I see that instead of calling the EMA() indicator paul has decided to copy the code logic from the EMA into this indicator.
On line 57 is the logic for the EMA. The logic itself would need to be changed to the logic of the SMA. (Or it could just be replaced with a call to SMA)
Alternatively, you could copy the SMA and then add the code from the EMASlopeColor that changes the brushes on lines 60 through 69 to it..Chelsea B.NinjaTrader Customer Service
Comment
-
Hello Chelsea,
I was also needing the EMASlopeColor Indicator but am unable to download from the link you gave. It just keep spinning but would not download. Is there any other way I can import this into NT8?
Comment
-
Welcome to the forums Sealed4Life!
If you are having issues downloading from the User App Share, please try the follow to troubleshoot downloading issues with your internet browser.
1. Clear Browser cache and temporary files
2. Use Shift + F5 to refresh the page
3. Try a different internet browser
Google provides a publicly available resource for clearing browsing cache here - https://support.google.com/accounts/...DDesktop&hl=en
If you use a different browser, you can reference that browser's support site for instructions, or use a search engine to find instructions online.
We look forward to being of further assistance.JimNinjaTrader Customer Service
Comment
-
Comment
-
Hello minhcnn,
Welcome to the NinjaTrader forums!
There are two approaches
1. Create two plots with two different colors and set the plot that has a value, similar to the VolumeUpDown indicator included with NinjaTrader, or the Macrossbuilder available on the User App Share.
Rewrite of the MACrossBuilder 1) Various Moving averages: DEMA, EMA, LinReg, HMA, SMA, TEMA, TMA, VWMA, WMA, ZLEMA 2) Various indication options 3) Can output to alerts window 4) Can output to Market Analyzer (+1, 0, ‐1 = Cross up, No cross, cross down) 5) Colors region between Moving averages V1.02 Update 10‐31‐17, minor code […]
2. Set the PlotBrushes on the bar to the color you want.
The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
Chelsea B.NinjaTrader Customer Service
- Likes 1
Comment
-
Hello minhcnn,
Below is a link to a forum post with helpful information about getting starting started with NinjaScript and C#.
https://ninjatrader.com/support/foru...040#post786040
After reviewing the ZigZag indicator I realize this indicator does custom rendering instead of allowing the plot to be normally rendered. Setting different plots like the VolumeUpDown would not be effective, as the rendering is referencing a specific series.
Instead of adding an addition plot, you would need to set a brush that can be used for the RenderTarget.DrawGeometry() on line 441.
Code:RenderTarget.DrawGeometry(g, [B]Plots[0].BrushDX[/B], Plots[0].Width, Plots[0].StrokeStyle);
Below is a link to an example of working with brushes.
https://ninjatrader.com/support/foru...606#post789606
Also, below is a link to the help guide on rendering. The OnRenderTargetChanged page has example code at the bottom.
https://ninjatrader.com/support/help...getchanged.htm
https://ninjatrader.com/support/help.../rendering.htm
This is more complex than setting two different plots that have different colors based on the same criteria, but is still possible to achieve.
If you have not already, you will need to make a copy of the ZigZag. The copy will need to remove the DeviationType enum declaration on lines 453 to 458, as this is already declared in the original ZigZag.
https://drive.google.com/file/d/1oVq...ew?usp=sharing
As you proceed let me know if you get stuck or need details about any of the tools used for custom rendering.
You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our NinjaTrader Ecosystem team follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request or provide one on one educational services.Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by nandhumca, Today, 03:15 PM
|
0 responses
1 view
0 likes
|
Last Post
by nandhumca
Today, 03:15 PM
|
||
Started by Lele2k24, Yesterday, 11:24 AM
|
12 responses
36 views
0 likes
|
Last Post Today, 03:07 PM | ||
Started by RaygunWizzle, Yesterday, 08:52 PM
|
3 responses
11 views
0 likes
|
Last Post Today, 02:50 PM | ||
Started by Tim-c, Today, 08:36 AM
|
4 responses
14 views
0 likes
|
Last Post Today, 02:45 PM | ||
Started by JohnS52, 03-22-2024, 08:06 AM
|
4 responses
28 views
0 likes
|
Last Post
by JohnS52
Today, 02:30 PM
|
Comment