NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 05-19-2007, 02:54 AM   #1
funk101
Senior Member
 
Join Date: Jan 2006
Location: Margate, Florida, USA
Posts: 426
Thanks: 0
Thanked 2 times in 2 posts
Send a message via AIM to funk101
Default Slope()...

Thanks for the Slope(). Please explain this. My 2 studies are clearly pointing up for currentbar and previous bar. However, as you can see, my readout is showing a negative number. Why? (see attached)

My code:
slowLine = Slope(CCI(14), 1, 0);
fastLine = Slope(CCI(6), 1, 0);

I tried Slope(CCI(14), CurrentBar-1, 0); But got some really funky output. A very large number. I just want the slope from previous bar to current bar.

BTW, what is your formula for the calc'ing of Slope();?
Attached Images
File Type: jpg slope.jpg (40.8 KB, 95 views)
Last edited by funk101; 05-19-2007 at 01:36 PM.
funk101 is offline  
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Slope of EMA Creamers Indicator Development 2 04-13-2007 07:03 AM
Calculating slope & percentage... funk101 General Programming 2 04-13-2007 03:01 AM


All times are GMT -6. The time now is 11:10 AM.