I am using 2 TSF indicators, both with different Periods, one with 20 and the other is 18. I am trying to create a bracket for the TSF indicator with the 18 period. The 18 period will have it's value, so I'm trying to be able to have the option to that value to calculate +300 amd -300 points and show it on the chart. I am using tick data. Would really appreciate any help. thanks!
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
Ninja Script Indicator help (TSF + AddOns)
Collapse
X
-
Ninja Script Indicator help (TSF + AddOns)
I am actually trying to do this with the time series forecast (TSF) indicator.
I am using 2 TSF indicators, both with different Periods, one with 20 and the other is 18. I am trying to create a bracket for the TSF indicator with the 18 period. The 18 period will have it's value, so I'm trying to be able to have the option to that value to calculate +300 amd -300 points and show it on the chart. I am using tick data. Would really appreciate any help. thanks!
Tags: None
-
Hello skywalkers,
The easiest way to do this would be to create two plots for those values. Each plot could then be set to the original indicator value plus or minus 300.
Plots have the same number of slots as the bars on the chart so you could make a consistent plot by setting the value for each OnBarUpdate call.
JesseNinjaTrader Customer Service
-
Thanks Jesse,
Since I have no coding experience at all, given I looked over the link you had included above, I am not sure where to begin. Additional help if you can. Thanks very much
Comment
-
Hello skywalkers,
The easiest way to get a script set up with plots would be to use the NinjaScript editor and generate a new indicator, in the dialog that comes up you can set up plots which will generate the code from the page I linked.
To set a plot you can then use the plots name like this:
Code:PlotName[0] = your value;
After doing that you would have a indicator that can plot and the code to use your custom indicator to get values. The next step would be to use math to add or subtract from that value.
The TSF looks like the following to get its value:
Code:double tsfValue= TSF(3, 20)[0];
Code:double offsetTsfValueMinus = tsfValue - 300 * TickSize; double offsetTsfValuePlus = tsfValue -+300 * TickSize;
Code:PlotName[0] = offsetTsfValueMinus; OtherPlotName[0] = offsetTsfValuePlus;
JesseNinjaTrader Customer Service
Comment
-
-
Hello Jesse,
Looks more like I will need help writing the code, I have tried and cannot get it to work. Can you provide a template, would be greatly appreciated. Thanks.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by johnMoss, 03-04-2024, 01:53 PM
|
3 responses
46 views
0 likes
|
Last Post
by AndyM
Today, 06:13 PM
|
||
Started by algospoke, Today, 06:01 PM
|
0 responses
6 views
0 likes
|
Last Post
by algospoke
Today, 06:01 PM
|
||
Started by cre8able, Today, 05:53 PM
|
0 responses
8 views
0 likes
|
Last Post
by cre8able
Today, 05:53 PM
|
||
Started by Wessel, 03-23-2024, 02:37 PM
|
3 responses
23 views
0 likes
|
Last Post Today, 04:58 PM | ||
Started by martini, Yesterday, 04:45 PM
|
4 responses
32 views
0 likes
|
Last Post
by martini
Today, 04:48 PM
|
Comment