One last thing-is it possible to not have the EMA's on the actual chart?
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
General Programming - (Indicator Development)
Collapse
X
-
General Programming - (Indicator Development)
OK, looking for any guidance here (I have attached a picture and labeled the areas I am talking about). No 1. I am using 2 EMA's one set at 14 and the other set at 25. What I am trying to do is that when the 2 EMA's are either similar (i would like to be able to adjust the inputs) or are at a certain close distance apart, the body of the bar changes to YELLOW (or any other color). basically to warn that the EMA's are on top of each other or getting close. Some significant moves tend to follow once this happens. No 2. I am trying to figure out how to produce an extreme signal once the security is a certain distance (again I would like to try to have this scale-able and input different variables for different markets) from these 2 EMA's. Again, I have attached a picture (it seems so) of an example of what I am trying to do. I have failed so far so looking for some help with the programming or suggestions.
One last thing-is it possible to not have the EMA's on the actual chart?Last edited by Labs905; 05-22-2015, 09:23 AM.Tags: None
-
Hello Labs905,
Thanks for your post.
For #1, one way to do this would be to use the tick difference between the EMAs and then you can set the minimum tick difference for the detection level. For example:
Code:int tickdiff = Convert.ToInt32(Math.Abs(EMA(14)[0] - EMA(25)[0]) / TickSize); if (tickDiff < detectionLevel) { BarColor = Color.Yellow; // color the bar yellow when below detectionLevel }
TickSize: http://www.ninjatrader.com/support/h...l?ticksize.htm
Alternatively you might consider using CrossAbove() or CrossBelow();
For #2 again you could use the tick difference but this time between perhaps the close of the current bar to one or the other of the EMAs.
You do not need to show the EMAs on the chart.
Please let me know if I can be of further assistance.Paul H.NinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Stanfillirenfro, Today, 07:23 AM
|
1 response
4 views
0 likes
|
Last Post Today, 07:37 AM | ||
Started by cmtjoancolmenero, Yesterday, 03:58 PM
|
2 responses
22 views
0 likes
|
Last Post Today, 07:24 AM | ||
Started by olisav57, Yesterday, 07:39 PM
|
1 response
9 views
0 likes
|
Last Post Today, 07:23 AM | ||
Started by cocoescala, 10-12-2018, 11:02 PM
|
7 responses
944 views
0 likes
|
Last Post
by Jquiroz1975
Today, 07:21 AM
|
||
Started by oviejo, Today, 12:28 AM
|
1 response
12 views
0 likes
|
Last Post Today, 07:20 AM |
Comment