![]() |
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Nov 2007
Posts: 22
Thanks: 0
Thanked 0 times in 0 posts
|
Can anyone help me with the code that would plot a dot overlayed on price bars when the RSI crossed above or below a certain level?
For example if the RSI(20) crosses above 40 then print a dot above the price bar. Also if the RSI(20) crosses below 30 then print a dot below the price bar. Thanks for any help. Razor |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
Code:
if (CrossAbove(RSI(20), 40, 1))
{
DrawDot("Dot", true, 0, Close[0], Color.Red);
}
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Nov 2007
Posts: 22
Thanks: 0
Thanked 0 times in 0 posts
|
Josh,
I get the error "No overload for method 'RSI' takes '1' arguments". What can do? Thanks. Razor |
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
if (CrossAbove(RSI(20, 3), 40, 1))
{ DrawDot("Dot", true, 0, Close[0], Color.Red); }
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Nov 2007
Posts: 22
Thanks: 0
Thanked 0 times in 0 posts
|
Thanks Josh. The error is gone.
What does the 3 mean? Razor |
|
|
|
|
|
#6 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
|
Smooth parameter for RSI indicator.
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Nov 2007
Posts: 22
Thanks: 0
Thanked 0 times in 0 posts
|
Thanks Ray.
Is there a way to make it so that all of the past signals remain on the screen? As it is now, when a new signal appears the previous one goes away. |
|
|
|
|
|
#8 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
|
DrawDot("Dot" + CurrentBar, true, 0, Close[0], Color.Red);
Ray
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|