Rather than importing directly via File->Utilities->Import Ninja Script i unziped the attachment and copied the .cs folder into NT and opened through Edit NinjaScript and then complied.
The following are the errors in detail.
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).
Favorite Futures: emini Currency and Index Futures
Posts: 103 since Jan 2011
Thanks: 282 given,
Problems With Renko Setting
Hello Fat Tails,
I finally downloaded and installed the latest version of both VisualSMAMTF and VisualEMAMTF. I followed the directions carefully and removed the previous assembly and restarted NT. All were working fine with the old version. Now I am having the same problem with both SMA and EMA. I want to plot a bar graph on an indicator panel with the settings shown in the attached screen shot of the “Indicator Setup Menu.” I am trying to plot an 8 period Renko type onto a 450 period Tick chart. What I get is the result shown in attachment labeled “Renko Setting.” I.e., nothing, not even the proper label. I merely change the period type from Renko to Minute and everything looks fine, as shown in the attached screen shot labeled “Minute Setting.” A list of the errors shown in the NinjaTrader Log is shown in the fourth screen shot.
Any ideas as to what is going on?
Thanks for your help and the wonderful indicators. Looking forward to getting back to “normal.”
Here is an update of the VisualSMA and VisualEMA indicators.
Those who dare please test:
- I have removed the option for Renko bars, this did not work anyhow, as the Renko bars cannot be added to the indicator dynamically.
- There was a bug discovered by @mborin, which prevented that the indicator could be accessed via a strategy using Rising(VisualSMA) or Rising(VisualEMA).
The indicators should work now. Those who dare, please test the attached assemblies and let me know whatever happens.
Before installing the new versions, please remove the prior versions via File -> Utilities -> Remove Ninjascript Assembly.
The following 11 users say Thank You to Fat Tails for this post:
I just want to explain another time, how the indicators work and can be correctly accessed. The explanation refers to the VisualSMA but also applies to the VisualEMA
Indicator collects data from secondary bar series. When a bar of the secondary bar series is complete, the value is displayed on the chart. This typically results in a step function.
One-Tick Repaint Mode
This mode corrects a weakness of the multi-barseries concept of NinjaTrader. OnBarUpdate() will be triggered for the primary bars and then for the secondary bars. Now imagine that you have a 15 min chart and want to display an hourly SMA. Then t the full hour NinjaTrader will first run the primary bars (allowing to write values to the chart) and then the secondary bars calculating the values from the hourly bars, which it should have written to the primary 15 min bars during the prior run of OnBarUpdate(). This mean that for the bar close of the 15 min bar, the last tick of the 60 min bar cannot be taken into account, because it is not available.
The solution adopted is to repaint the value to the prior bar with the first tick of the new 15 minute bar. The indicator therefore repaints the prior bar a single time, but only uses information from the prior 60 minute bar, which is unfortunately processed after the 15 min bar.
The result also is a step function, but the lag of 1 bar is eliminated when real-time data is processed.
With each incoming tick the distance between the last node - in the example above that would be the close of the hourly bar - and the current value of the indicator is repainted by using a linear interpolation. In COBC = false mode you can see the last leg moving up and down.
Accessing the indicator
In strategy mode it is pretty easy to access the indicator via another indicator or a strategy. This is possible because the indicator does not repaint. However, there is a limitation. Any multi-timeframe indicator that loads range bars, cannot be properly accessed via another indicator or strategy. Sometimes the indicator values will be vertically shifted, that is the indicator values would be false.
Therefore the VisualSMA cannot be accessed when the period type selected via the indicator parameters is set to "Range".
If you want to access the VisualSMA in One-Tick Repaint or Visual mode you would need to take into account that the indicator repaints. When the indicator is accessed in One-Tick Repaint mode, you need to access the last 2 values for your strategy and let it recalculate. When you access the indicator in Visual mode, things are more complicated, as the indicator repaints over the last swinging leg. Here you would need to call all indicator values that cover this period.
The indicator offers you a Public IntSeries, which can be accessed and which tells you how many bars it paints back for the currennt value. The IntSeries can be accessed as VisualSMA(period, false, false, thisCalcMode, thisPeriodType, thisPeriodValue, thisPriceType).Repaint and then used to collect the last indicator values. You can then use the integer to loop through the bars back to the last node, which is used as anchor point.
For those who are interested I have attached a model indicator that accesses the VisualSMA and plots the values on a chart. Please copy the model indicator into the directory NinjaTrader 7 -> bin -> custom -> Indicator and compile. It will only compile, if you have the VisualSMA installed.
In case that you have installed the model indicator or any other indicator or strategy that accesses the VisualSMA, do not forget to remove those indicators/strategies first before you uninstall the assembly.
The following 8 users say Thank You to Fat Tails for this post:
Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.
Need help? 1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first. 2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses. 3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make. 4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance. 5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers. 6) Help using the forum? Watch this video to learn general tips on using the site.
If you want to support our community, become an Elite Member.
The following 3 users say Thank You to Big Mike for this post:
Hi guys, I've just finished reading this post. I must say it's really great. Thanks
I don't have strong programming skills and I am struggling trying to code a MTF strategy in NT7. I am sure this is simple and really would appreciate your help.
I have a few strategies that run on 10-15 min time frames, however I notice there are multiple fake signals that occur due to the fact that the strategies take-profit is very close and NT7 often enters&exits the trade within the same candle, ignoring the real price path. I think this issue could easily be solved by working on a Multi-Time-Frame Strategy. I tried using the Visual EMA when coding my strategy but it doesn't work. Probably because I am using the wizard to create the new strategy.
Lets assume I want to run the below strategy on 1 min time frame, but I want to use indicators (in the example below the 25 and 50 SMA) that refers to a 15 min time frame, and ALSO that I want to enter in position not more than once every 15 minutes. Could somebody please help me to figure out what code to use: