I'd 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
set plots to drawtext
Collapse
X
-
Thanks for all your help. I've been trying to do something for the longest time with no luck. My ind prints via DrawText. It prints my results around the bars on my charts. I realize to use strategies I need to set my results to plots. So I make my plots and set them = to my variables. But, if my ind creates a value of, say, 1, and the instrument is at a value of 1000, it always prints the 1 at the actual value of 1, which is 1000 points away from where I want it. This makes it unusable. My ind works fine without using plots.
I'd appreciate any help. Thanks.
-
Hello,
If you have your plot set to the value of it is expected that it will plot at that value. If you are wanting it to display the message elsewhere you would need to add in custom logic to place for the plot to appear where you are wanting it to.
Can you clarify or provide a screenshot of where you are wanting the plots to actually plot at?Cody B.NinjaTrader Customer Service
Comment
-
Here is one of my draw text commands:
{ DrawText("imbalance" + CurrentBar, AutoScale, (+ imbalance).ToString(), 0, Low[0], -(placementimballevel), Color.Pink, ChartControl.Font, StringAlignment.Center, Color.Transparent, Color.Transparent, 0);}
Thanks. Any help would be greatly appreciated.
Comment
-
Originally posted by NinjaTrader_CodyB View PostHello,
What error message do you receive when you try to set the plot to placementimballevel?
I have to assume others use the DrawText command with plots. If so, how do they do it?
Thank you.
Comment
-
Hello,
In your previous post you mention that you try to set the plot to the variable placementimballevel but you receive errors.
As the placementimballevel is where you are placing your drawtexts this is what you would want the plots to be based off of.
What errors do you receive when you set the plot to the placementimballevel?Cody B.NinjaTrader Customer Service
Comment
-
I asked a friend about this and he solved my problem:
Add(new Plot(Color.Transparent, "Your Plot Name"));
Do you know how I can go about including sound alert code into my indicator?
Thank you.
Comment
-
Hello,
You can add a sound alert by using the Alert() method. Please see the following link on the Alert() method: http://ninjatrader.com/support/helpGuides/nt7/alert.htm
You can also use the PlaySound() method to trigger just a sound. Please see the follwoign link on the PlaySound() method:http://ninjatrader.com/support/helpG.../playsound.htm
If we can be of any other assistance please let us know.Cody B.NinjaTrader Customer Service
Comment
-
My alert is not recognizing my absolute file path which holds my sound files.
Is there a Ninja indicator which has audio alert code I can look at?
If not, could you give me an example of an IF statement followed by an alert() statement, complete with sound file path? I assume it goes in OnBarUpdate.
Thank you.
Comment
-
Hello,
The PriceAlert indicator provides has uses the Alert() method with sound. You can view it by going to Tools> Edit NinjaScript> Indicator> PriceAlert > OK.
The help guide also provides an example for the Alert() method which has a sound: http://ninjatrader.com/support/helpGuides/nt7/alert.htm
Is the sound file that you chose a .wav file?
Can you provide your line of code you are using for the Alert() method including the string for your file path for the sound file?Cody B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by bortz, 11-06-2023, 08:04 AM
|
47 responses
1,606 views
0 likes
|
Last Post
by aligator
Today, 07:22 PM
|
||
Started by jaybedreamin, Today, 05:56 PM
|
0 responses
9 views
0 likes
|
Last Post
by jaybedreamin
Today, 05:56 PM
|
||
Started by DJ888, 04-16-2024, 06:09 PM
|
6 responses
19 views
0 likes
|
Last Post
by DJ888
Today, 05:12 PM
|
||
Started by Jon17, Today, 04:33 PM
|
0 responses
6 views
0 likes
|
Last Post
by Jon17
Today, 04:33 PM
|
||
Started by Javierw.ok, Today, 04:12 PM
|
0 responses
15 views
0 likes
|
Last Post
by Javierw.ok
Today, 04:12 PM
|
Comment