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
Nondisplaying Indicator?
Collapse
X
-
Nondisplaying Indicator?
Can I create an indicator that I use in a strategy that has no indication of any type on the chart it is added to. As if it were on Panel 0 - a nonexistent panel. If so - how do I remove all traces of the indicator from the chart? I still need the user to set properties for it!Tags: None
-
Hello,
Are you attaching this to a chart as you would for any indicator? When you attach the indicator delete the label field and change the indicator color to Transparent.
-
Not Diplsy Indicator
I suppose I could use a class and avoid standard indicator behavor but I need everything but the display so I want to see if I can remove waht I don't need from the display. I can make the indicator transparent - but is there a way to not reserve a panel for it (as if I set it to panel 0) and is there a way to not show the scale on the right axis?
Comment
-
-
Please see the sample code in the link I posted under #3, specifically the strategy 'SampleBoolSeries' - you'll see snippets for accessing an exposed variable and exposed data / boolseries (of course indicator plots would be exposed per default, so not needed for accessing those values).BertrandNinjaTrader Customer Service
Comment
-
Hi Bertrand,
I think I understand how to expose the values in the sample indicator you mention, but I'm not clear how I can access them from a strategy. (I'm sorry for the basic question)
I tried something like this in my strategy -
protected override void Initialize()
{
CalculateOnBarClose = true;
Add(SampleBoolSeries());
}
protected override void OnBarUpdate()
{
if (SampleBoolSeries().BullIndication == true)
Print("Bull");
}
But apparently, I am wrong and have no clue ...
Thanks for your help.
Comment
-
ZenMachine, that sample looks correct - you access the exposed BoolIndication series from the indicator - are you sure those values are getting set in the indicator as you would expect? Do the conditions for this trigger? Best might be to check first with the complete sample provided and then moving on accessing a custom series / variable.BertrandNinjaTrader Customer Service
Comment
-
Originally posted by ZenMachine View PostHi Bertrand,
I think I understand how to expose the values in the sample indicator you mention, but I'm not clear how I can access them from a strategy. (I'm sorry for the basic question)
I tried something like this in my strategy -
protected override void Initialize()
{
CalculateOnBarClose = true;
Add(SampleBoolSeries());
}
protected override void OnBarUpdate()
{
if (SampleBoolSeries().BullIndication == true)
Print("Bull");
}
But apparently, I am wrong and have no clue ...
Thanks for your help.
if BullIndication is BoolSeries you have to add [0] at the end like:
protected override void OnBarUpdate()
{
if (SampleBoolSeries().BullIndication[0] == true)
Print("Bull");
}
Comment
-
Originally posted by roonius View PostIf you don't want to display an indicator, simply don't call "Add" method.
if BullIndication is BoolSeries you have to add [0] at the end like:
protected override void OnBarUpdate()
{
if (SampleBoolSeries().BullIndication[0] == true)
Print("Bull");
}
I would also like to access these values from within Wizard. Is it possible, and how can I do so?
Comment
-
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by DanielTynera, Today, 01:14 AM
|
0 responses
2 views
0 likes
|
Last Post
by DanielTynera
Today, 01:14 AM
|
||
Started by yertle, 04-18-2024, 08:38 AM
|
9 responses
40 views
0 likes
|
Last Post
by yertle
Today, 01:00 AM
|
||
Started by techgetgame, Yesterday, 11:42 PM
|
0 responses
12 views
0 likes
|
Last Post
by techgetgame
Yesterday, 11:42 PM
|
||
Started by sephichapdson, Yesterday, 11:36 PM
|
0 responses
2 views
0 likes
|
Last Post Yesterday, 11:36 PM | ||
Started by bortz, 11-06-2023, 08:04 AM
|
47 responses
1,615 views
0 likes
|
Last Post
by aligator
Yesterday, 07:22 PM
|
Comment