Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
RSI Alert
Collapse
X
-
I tried to paste it originally into rsi.cs... might have screwed up that file possibly, how do I replace the original rsi file now?
-
Did you make any modifications to the original @RSI.cs file? Those errors are in the @RSI.cs file, not the file that you have open in that window.
Leave a comment:
-
-
Hello bougie,
Thank you for your response.
You would not paste this into the RSI but would follow the instructions below to create a new indicator with the code that JC provided.- Go to Tools > New NinjaScript > Indicator
- Next
- Name the indicator and select Generate
- Then paste the code JC created into the OnBarUpdate() method
- Then press F5 compile
Once complete you code should look like the following:
We have a fully documented help guide which will help you get started with Ninja Script. You will find language references to all of the methods and functions you will be using. You will also see a tutorial section which will help you create your first indicator and get you started with some of these concepts.Code:#region Variables #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() { Overlay = false; } /// <summary> /// Called on each bar update event (incoming tick) /// </summary> protected override void OnBarUpdate() { if(CrossAbove(High[0], RSI(20, 3),1) || CrossBelow(Low[0], RSI(20, 3),1)) Alert("myAlert", NinjaTrader.Cbi.Priority.High, "RSI Alert", "Alert1.wav", 10, Color.Black, Color.Yellow); } #region Properties #endregion
A link to our Help Guide can be found below: http://www.ninjatrader.com/support/h...stribution.htm
I am also linking you to the Educational Resources section of the Help Guide to help you get started with NinjaScript: http://www.ninjatrader.com/support/h..._resources.htm
We also have some Reference Samples online as well as some Tips and Tricks for both indicators and strategies:
Click here to see our NinjaScript Reference Samples
Click here to see our NinjaScript Tips
If you have limited time or programming capabilities, you can discuss your requirements with any of our certified NinjaScript consultants.
Click here for a list of certified NinjaScript Consultants
Please let me know if I may be of further assistance.
Leave a comment:
-
hi, sorry i have no experience with coding. Do i copy and paste that line of code into rsi.cs?
Leave a comment:
-
Hello bougie,
I'm not aware of an existing indicator that does this, however it would be possible with custom programming.
NinjaTrader is based on the modern C# programming language which allows advanced charting that is extensible in that you can create custom indicators using NinjaScript.
* Click here for information on programming in NinjaScript
You would want to use the Alert() method based upon the condition that you would like.
http://www.ninjatrader.com/support/h...html?alert.htm
For Example:
Let us know if we can be of further assistance.Code:if(CrossAbove(High[0], RSI(20, 3),1) || CrossBelow(Low[0], RSI(20, 3),1)) Alert("myAlert", NinjaTrader.Cbi.Priority.High, "RSI Alert", "Alert1.wav", 10, Color.Black, Color.Yellow);
Leave a comment:
-
RSI Alert
Hi, I just want a sound alert once the lower or upper limits have been crossed. LineAlert would do the job, as I could just draw the line manually, unfortunately, it seems to only work on price bars, and not the RSI upper and lower lines.
Thanks.Tags: None
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
129 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
74 views
1 like
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
117 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
111 views
1 like
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
89 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Leave a comment: