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
TSI with signalline
Collapse
X
-
Hello,
If you are wanting to set the second plot you would need to use Values[1].Set(). Value.Set would take over the TSI plot.
You will also need to do Values[1].Set(0) in the if(CurrenBar ==0) block.
For more information on Values please see the following link: http://ninjatrader.com/support/helpG...nt7/values.htm
Leave a comment:
-
See variables & Initialize:
Code:public class TSInew : Indicator { #region Variables private int fast = 3; private int slow = 14; DataSeries fastEma; DataSeries fastAbsEma; DataSeries slowEma; DataSeries slowAbsEma; #endregion /// <summary> /// This method is used to configure the indicator and is called once before any bar data is loaded. /// </summary> protected override void Initialize() { Add(new Plot(Color.Green, "TSInew")); [COLOR=Red] Add(new Plot(Color.Red, "TSIsign"));[/COLOR] Add(new Line(System.Drawing.Color.DarkViolet, -50, "Lower")); Add(new Line(System.Drawing.Color.DarkViolet, 50, "Upper")); Add(new Line(System.Drawing.Color.Red, 0, "Zero")); fastAbsEma = new DataSeries(this); fastEma = new DataSeries(this); slowAbsEma = new DataSeries(this); slowEma = new DataSeries(this); }
What i do, no luck.
Leave a comment:
-
Hello,
Can you clarify if you are trying to set a separate Value data series when you are doing Value.Set a second time or are you seeing that specific Value.Set overload does not work?
Leave a comment:
-
VALUE problem ??
protected override void OnBarUpdate()
{
if (CurrentBar == 0)
{
fastAbsEma.Set(0);
fastEma.Set(0);
slowAbsEma.Set(0);
slowEma.Set(0);
Value.Set(0);
}
else
{
double momentum = Input[0] - Input[1];
slowEma.Set(momentum * (2.0 / (1 + Slow)) + (1 - (2.0 / (1 + Slow))) * slowEma[1]);
fastEma.Set(slowEma[0] * (2.0 / (1 + Fast)) + (1 - (2.0 / (1 + Fast))) * fastEma[1]);
slowAbsEma.Set(Math.Abs(momentum) * (2.0 / (1 + Slow)) + (1 - (2.0 / (1 + Slow)))* slowAbsEma[1]);
fastAbsEma.Set(slowAbsEma[0] * (2.0 / (1 + Fast)) + (1 - (2.0 / (1 + Fast))) * fastAbsEma[1]);
Value.Set(fastAbsEma[0] == 0 ? 0 : 100 * fastEma[0] / fastAbsEma[0]);
// Value.Set(slowAbsEma[0] == 0 ? 0 : 100 * slowEma[0] / slowAbsEma[0]); // don't work !!
}
Leave a comment:
-
Hello,
You would need to add a plot that is based off of the same calculations as the signal line that you are referring to.
Please see the following link on plots: http://ninjatrader.com/support/helpGuides/nt7/plots.htm
Leave a comment:
-
-
Hello,
You will need to make a copy of the TSI that you can edit first. You can do this by going to Tools >Edit NinjaScript > Indicator > TSI > press OK> Right Click> Select Save As.. and name your indicator.
Then you can add a line within the Initialize() method. Please see the following link on how to add a line: http://ninjatrader.com/support/helpGuides/nt7/add.htm
If we can be of any other assistance please let us know.
Leave a comment:
-
TSI with signalline
Hi,
anybody could tell me how adding a signal line to the existing ninjatrader TSI ?
BRTags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by stafe, 04-15-2024, 08:34 PM
|
10 responses
42 views
0 likes
|
Last Post
by stafe
Today, 10:29 AM
|
||
Started by frslvr, 04-11-2024, 07:26 AM
|
7 responses
111 views
1 like
|
Last Post
by caryc123
Today, 10:17 AM
|
||
Started by rocketman7, Today, 09:41 AM
|
3 responses
8 views
0 likes
|
Last Post Today, 10:07 AM | ||
Started by traderqz, Today, 09:44 AM
|
2 responses
5 views
0 likes
|
Last Post Today, 10:00 AM | ||
Started by rocketman7, Today, 02:12 AM
|
7 responses
31 views
0 likes
|
Last Post Today, 09:23 AM |
Leave a comment: