Need help for EMA slope startegy - NinjaTrader Programming | futures io social day trading
futures io futures trading


Need help for EMA slope startegy
Updated: Views / Replies:1,393 / 5
Created: by michaelf Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors – all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you don’t need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Need help for EMA slope startegy

  #1 (permalink)
Elite Member
Mérida, Mexico
 
Futures Experience: Intermediate
Platform: NinjaTrader 8
Broker/Data: looking
Favorite Futures: CL
 
michaelf's Avatar
 
Posts: 508 since Mar 2011
Thanks: 1,153 given, 512 received

Need help for EMA slope startegy

Happy Jackson Hole Day to everybody, lol

I need some help to write a Strategy that plots vertical lines into a chart. I wrote everything with the Strategy Wizard and it is working, surprise! Now I would like to add a condition and with that one I have a problem. I would like an EMA with slope, for example 20 degree = flat. Flat = no plot.

What is the parameter to write that?

Thanks a lot
michael

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Tampa, FL
 
Futures Experience: Beginner
Platform: NinjaTrader, Sierra Chart
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: 6E, M6E, 6J
 
Xav1029's Avatar
 
Posts: 1,374 since Dec 2011
Thanks: 1,452 given, 3,354 received



michaelf View Post
Happy Jackson Hole Day to everybody, lol

I need some help to write a Strategy that plots vertical lines into a chart. I wrote everything with the Strategy Wizard and it is working, surprise! Now I would like to add a condition and with that one I have a problem. I would like an EMA with slope, for example 20 degree = flat. Flat = no plot.

What is the parameter to write that?

Thanks a lot
michael

You couldn't really look at degrees for slope, because this would change based how zoomed in you were on the chart. You could add a plot, say myEMA was Plot[0].
Then add a variable for slope, say mySlope. mySlope would be ema value change over one bar.
Then
if(myEMA[0] - myEMA[1] <= mySlope && myEMA[0] - myEMA[1] >= -mySlope) PlotColors[0][0] = Color.Transparent;
else if(myEMA[0] - myEMA[1] > mySlope)PlotColors[0][0] = Color.Green;
else PlotColors[0][0] = Color.Red;

Reply With Quote
The following user says Thank You to Xav1029 for this post:
 
  #4 (permalink)
Elite Member
New York
 
Futures Experience: Intermediate
Platform: NinjaTrader, Custom Platform
Broker/Data: IB
Favorite Futures: ES, YM, Currency Futures
 
Posts: 79 since May 2010
Thanks: 46 given, 68 received

You can use the normalized slope. This is how I calculated the slope for ES on hourly chart.

 
Code
double _slope = Slope(_ema, 5); // this is slope per candle
double _slopeN = 24 * 100 * _slope / Close[0]; // slope in percent per day

// this assumes that 45 degree is 2% change in 4 days.
// change the multiplier as per your assumption
double _angle = 180 * Math.Atan(2 * _slopeN) / Math.PI;
Hope this helps.

Reply With Quote
The following user says Thank You to TraderSU for this post:
 
  #5 (permalink)
Elite Member
Mérida, Mexico
 
Futures Experience: Intermediate
Platform: NinjaTrader 8
Broker/Data: looking
Favorite Futures: CL
 
michaelf's Avatar
 
Posts: 508 since Mar 2011
Thanks: 1,153 given, 512 received


TraderSU View Post
You can use the normalized slope. This is how I calculated the slope for ES on hourly chart.

 
Code
double _slope = Slope(_ema, 5); // this is slope per candle
double _slopeN = 24 * 100 * _slope / Close[0]; // slope in percent per day

// this assumes that 45 degree is 2% change in 4 days.
// change the multiplier as per your assumption
double _angle = 180 * Math.Atan(2 * _slopeN) / Math.PI;
Hope this helps.


Thank you, but I need do to it with the Strategy Wizard, I still don't understand how do write codes directely in the startegy.

Reply With Quote
 
  #6 (permalink)
Elite Member
Tampa, FL
 
Futures Experience: Beginner
Platform: NinjaTrader, Sierra Chart
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: 6E, M6E, 6J
 
Xav1029's Avatar
 
Posts: 1,374 since Dec 2011
Thanks: 1,452 given, 3,354 received

Search NT support forum for slope simple. Its a slope indicator, but I don't have the original anymore.

Reply With Quote
The following user says Thank You to Xav1029 for this post:

Reply



futures io > > > > > Need help for EMA slope startegy

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
EMA for CCI perryg NinjaTrader Programming 7 January 19th, 2012 09:45 AM
Multiple EMA's trs3042 NinjaTrader 5 January 13th, 2011 03:28 PM
Holt EMA cbritton EasyLanguage Programming 5 December 1st, 2010 03:09 PM
EMA colorizer Zoethecus NinjaTrader Programming 2 October 5th, 2010 07:11 PM
MACD: The 12-period (EMA) minus 26 EMA emini_Holy_Grail Traders Hideout 1 February 22nd, 2010 01:04 PM


All times are GMT -4. The time now is 04:56 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-13 in 0.09 seconds with 19 queries on phoenix via your IP 54.90.92.204