NexusFi: Find Your Edge


Home Menu

 





Slope of an indicator, frustrating =/


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Zeos6 with 7 posts (2 thanks)
    2. looks_two Fat Tails with 5 posts (14 thanks)
    3. looks_3 gonzofist with 5 posts (1 thanks)
    4. looks_4 DavidBodhi with 5 posts (1 thanks)
      Best Posters
    1. looks_one Fat Tails with 2.8 thanks per post
    2. looks_two NJAMC with 1.3 thanks per post
    3. looks_3 Big Mike with 1 thanks per post
    4. looks_4 otterway with 1 thanks per post
    1. trending_up 24,841 views
    2. thumb_up 35 thanks given
    3. group 12 followers
    1. forum 47 posts
    2. attach_file 7 attachments




 
Search this Thread

Slope of an indicator, frustrating =/

  #1 (permalink)
 gonzofist 
PORTLAND, OR
 
Experience: None
Platform: NinjaTrader
Trading: Futures
Posts: 185 since Jul 2011
Thanks Given: 74
Thanks Received: 168

I am just starting to learn ninjascript (unsuccessfully), I wonder if someone could help.

I am trying to make an indicator that will return the slope value of a EMA or ADX or whatever I define and only the slope value.

I will be using it in Market Analyzer and every slope indicator I have tried to use ends up just pulling in the price in analyzer table.

I did manage to get "SlopeSimple" to pull in just the slope, but it wasn't normalized across different tick sizes, so I had very different numbers depending on the instrument.

I haven't quite figured out the structure of a indicator script, so pasting full code would be super super awesome .

Visit my NexusFi Trade Journal Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Better Renko Gaps
The Elite Circle
Exit Strategy
NinjaTrader
REcommedations for programming help
Sierra Chart
ZombieSqueeze
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
32 thanks
Just another trading journal: PA, Wyckoff & Trends
26 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
23 thanks
GFIs1 1 DAX trade per day journal
19 thanks
  #3 (permalink)
 gonzofist 
PORTLAND, OR
 
Experience: None
Platform: NinjaTrader
Trading: Futures
Posts: 185 since Jul 2011
Thanks Given: 74
Thanks Received: 168


After a bit more research it sounds like a better way of doing this would be to use a velocity indicator of my EMA. Or perhaps "Rate of Change"......?

Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #4 (permalink)
 
forrestang's Avatar
 forrestang 
Chicago IL
 
Experience: None
Platform: Ninja, MT4, Matlab
Broker: CQG, AMP, MB, DTN
Trading: E/U, G/U
Posts: 1,329 since Jun 2010
Thanks Given: 354
Thanks Received: 1,047

Not sure if you got what you wanted yet or not? If you want to try and code yourself what exactly are you having problems with? If this indicator I am posting below does what you want, and you need help getting the output into MarketAnalyzer, post back.

Have you tried THIS one?

It's called, "MASlopeBoxMulti."

Reply With Quote
Thanked by:
  #5 (permalink)
 gonzofist 
PORTLAND, OR
 
Experience: None
Platform: NinjaTrader
Trading: Futures
Posts: 185 since Jul 2011
Thanks Given: 74
Thanks Received: 168


forrestang View Post
Not sure if you got what you wanted yet or not? If you want to try and code yourself what exactly are you having problems with? If this indicator I am posting below does what you want, and you need help getting the output into MarketAnalyzer, post back.

Have you tried THIS one?

It's called, "MASlopeBoxMulti."

I tried to get the slope from MASlopeBoxMulti to show in Market Analyzer first thing last night, but all I could ever get it to output was the actual value of the MA, not the slope (in degrees). I would have loved to get it to work =//

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #6 (permalink)
 
madLyfe's Avatar
 madLyfe 
Des Moines, Iowa
 
Experience: None
Platform: Ninja, TOS
Broker: AMP/CQG, TOS
Trading: CL, TF, GC
Posts: 1,641 since Feb 2011
Thanks Given: 9,220
Thanks Received: 1,020


forrestang View Post
Not sure if you got what you wanted yet or not? If you want to try and code yourself what exactly are you having problems with? If this indicator I am posting below does what you want, and you need help getting the output into MarketAnalyzer, post back.

Have you tried THIS one?

It's called, "MASlopeBoxMulti."

do you get this working? i see the degree of the slope in the bottom right of the chart, but im not sure that its correct? you just put the same params of the ema/sma you are trying to find the slope of right?

dont believe anything you hear and only half of what you see

¯\_(ツ)_/¯

(╯°□°)╯︵ ┻━┻
Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #7 (permalink)
 gonzofist 
PORTLAND, OR
 
Experience: None
Platform: NinjaTrader
Trading: Futures
Posts: 185 since Jul 2011
Thanks Given: 74
Thanks Received: 168


madLyfe View Post
do you get this working? i see the degree of the slope in the bottom right of the chart, but im not sure that its correct? you just put the same params of the ema/sma you are trying to find the slope of right?

I have no problem getting it to show on chart, I am trying to pull the slope into Market Analyzer without success.

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #8 (permalink)
 
forrestang's Avatar
 forrestang 
Chicago IL
 
Experience: None
Platform: Ninja, MT4, Matlab
Broker: CQG, AMP, MB, DTN
Trading: E/U, G/U
Posts: 1,329 since Jun 2010
Thanks Given: 354
Thanks Received: 1,047


gonzofist View Post
I tried to get the slope from MASlopeBoxMulti to show in Market Analyzer first thing last night, but all I could ever get it to output was the actual value of the MA, not the slope (in degrees). I would have loved to get it to work =//

I see what you mean, I just tried it too.

Reply With Quote
  #9 (permalink)
 
forrestang's Avatar
 forrestang 
Chicago IL
 
Experience: None
Platform: Ninja, MT4, Matlab
Broker: CQG, AMP, MB, DTN
Trading: E/U, G/U
Posts: 1,329 since Jun 2010
Thanks Given: 354
Thanks Received: 1,047

Aaargh!!!

I spent some time trying to get this value into an exposed variable but coudln't figure it out with my limited knowledge.

The actual calculation is done in a function under the main body, and stored into a variable called 'degrees.' I was able to print the value of the degrees in the output window, but I coudln't capture it into a global variable so that I could make it available to Market Analyzer.

I tried declaring a global variable up top, then capturing that degree value in that function @ the bottom, which I thought would then make it accessible to Market Analyzer after declaring it as such in the properties.

But that was a no-go.

Attached Thumbnails
Click image for larger version

Name:	Prime2011-09-01_175733.jpg
Views:	602
Size:	76.7 KB
ID:	48137  
Reply With Quote
Thanked by:
  #10 (permalink)
 gonzofist 
PORTLAND, OR
 
Experience: None
Platform: NinjaTrader
Trading: Futures
Posts: 185 since Jul 2011
Thanks Given: 74
Thanks Received: 168



forrestang View Post
Aaargh!!!

I spent some time trying to get this value into an exposed variable but coudln't figure it out with my limited knowledge.

The actual calculation is done in a function under the main body, and stored into a variable called 'degrees.' I was able to print the value of the degrees in the output window, but I coudln't capture it into a global variable so that I could make it available to Market Analyzer.

I tried declaring a global variable up top, then capturing that degree value in that function @ the bottom, which I thought would then make it accessible to Market Analyzer after declaring it as such in the properties.

But that was a no-go.

Thanks for trying Forrestang. I will figure something else out with the Market Analyzer, trying to rig something up to save on screen real estate, which is a problem for me right now.

Visit my NexusFi Trade Journal Started this thread Reply With Quote




Last Updated on April 10, 2023


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts