Use of Rising() and Slope() - NinjaTrader Programming | futures io social day trading
futures io futures trading


Use of Rising() and Slope()
Updated: Views / Replies:6,187 / 17
Created: by MXASJ Attachments:2

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 dont 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
 2  
 
Thread Tools Search this Thread
 

Use of Rising() and Slope()

  #11 (permalink)
Elite Member
Asia
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
 
Posts: 798 since Jun 2009
Thanks: 109 given, 786 received

Thanks Prtester. The TSSupertrend Trend=True looks strange, so let's see how it works out! Compiled and running live sim on ES and FESX;

///GO LONG: Conditions followed by ATM Strategy execution.
if (TSSuperTrend(14, TradingStudies.NinjaScript.Utility.MovingAverageType.SMA, 2.618, 14, TradingStudies.NinjaScript.Utility.SuperTrendMode.ATR).Trend[0] == true
&& ATRratio(49, 7, 1).Ratio[0] >= 1
&& (ADXVMA_sharky_paint(9, true).Main[0] > ADXVMA_sharky_paint(9, true).Main[1])
&& (ADXVMA_sharky_paint(9, true).Main[0] > ADXVMA_sharky_paint(9, true).Main[2])
&& (ECO2New2(7, 4, 21).Main[0] > ECO2New2(7, 4, 21).Signal[0])
&& Rising(ECO2New2(7, 4, 21).Main) == true)

//ATM strategy code here


///GO SHORT: Conditions followed by ATM Strategy execution.
if (TSSuperTrend(14, TradingStudies.NinjaScript.Utility.MovingAverageType.SMA, 2.618, 14, TradingStudies.NinjaScript.Utility.SuperTrendMode.ATR).Trend[0] == false
&& ATRratio(49, 7, 1).Ratio[0] >= 1
&& (ADXVMA_sharky_paint(9, true).Main[0] < ADXVMA_sharky_paint(9, true).Main[1])
&& (ADXVMA_sharky_paint(9, true).Main[0] < ADXVMA_sharky_paint(9, true).Main[2])
&& (ECO2New2(7, 4, 21).Main[0] < ECO2New2(7, 4, 21).Signal[0])
&& Falling(ECO2New2(7, 4, 21).Main) == true)

//ATM strategy code here

Reply With Quote
 
  #12 (permalink)
Elite Member
Asia
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
 
Posts: 798 since Jun 2009
Thanks: 109 given, 786 received

FYI I ran that on the ES and FESX and it appears to enter and exit trades as it should, so thanks all! As-is it was not a profitable strategy in yesterdays markets when combined with my ATM strategy, but at least I've got some working code to build upon and test.

Reply With Quote
 
  #13 (permalink)
Elite Member
Asia
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
 
Posts: 798 since Jun 2009
Thanks: 109 given, 786 received


Just got a wrong trade. The system went short on the ES at 10:40 when;

ADXVMA (Panel 1) says short OK
ATR Ratio (Panel 2) says OK to trade
ECO2New2 (Panel 3) says short OK

But... the green line (in Panel 1) at price 875.44 is TSSupertrend saying don't short... so something isn't right yet. Any ideas?

Thanks

Attached Thumbnails
Use of Rising() and Slope()-wrongtradettst.jpg  
Reply With Quote
 
  #14 (permalink)
Elite Member
Asia
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
 
Posts: 798 since Jun 2009
Thanks: 109 given, 786 received

... and it just went short again when the green line @ 875.44 should not allow that. Hmmm.

Attached Thumbnails
Use of Rising() and Slope()-sp32-20090709-232123.jpg  
Reply With Quote
 
  #15 (permalink)
Member
Panama!
 
Futures Experience: None
Platform: Hit the Bid!
 
Posts: 44 since Jun 2009
Thanks: 1 given, 22 received

idk if you have resolved this issue yet however from my experiences, ninja cannot consistently obtain accurate values from and indicators of an indicator with out it being calculated all within one app locally. This may be why you are getting weird results w/ rise and slope or w/e

the most reliable way i have found to get around this is to calculate the net change in the strat or indicator locally by finding the different from [0] to [1] which will usually yield some decimal. I multiple that by 10, 100 or 1000 to bring it back to "normal" values. The result is binary in the sense positive is uptrend, neg is downtrend. Velocity is also measured by the range of 0 to -(X) and 0 to (X). That way you can base the strat/indicator off of meeting a min threshold of velocity before taking action to avoid noise or "sideways" situations.

i built a separate indicator that always does this, however trying to reference its output from another strat or indicator will only "sometimes" yield correct data yet the calculations are correct on both ends. However if everything is coded locally 1 strat the output is always correct.

Reply With Quote
 
  #16 (permalink)
Elite Member
Asia
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
 
Posts: 798 since Jun 2009
Thanks: 109 given, 786 received

Thanks tortexal I look at that. It all seems to come back to how the strat is looking at TSSupertrend. I'll take a deeper look at that indicators code. Still a bit fuzzy as I just woke up but I'm thinking "close above whatever that line vaue is=long ok, clode below whatever that line vaue is=short ok" is worth a shot.

The other three indicators seem to be working in concert ok, but as a system its missing trades it should enter and entering trades it shouldn't with a higher frequency than I like.

Reply With Quote
 
  #17 (permalink)
Elite Member
Asia
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
 
Posts: 798 since Jun 2009
Thanks: 109 given, 786 received

This compiled and will be tested on market replay data for the next few hours;

if (Close[0] > TSSuperTrend(14, TradingStudies.NinjaScript.Utility.MovingAverageType.SMA, 2.618, 14, TradingStudies.NinjaScript.Utility.SuperTrendMode.ATR).DownTrend[1]

Lets see what happens!

Reply With Quote
 
  #18 (permalink)
Drinking from a fire hose
atlanta
 
Futures Experience: Beginner
Platform: NinjaTrader, MetaTrader
Favorite Futures: CL
 
Posts: 8 since Jun 2011
Thanks: 2 given, 3 received

mxasj

MXASJ...how did your test work out?

Reply With Quote

Reply



futures io > > > > > Use of Rising() and Slope()

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
dmplus v3a is there a slope indicator? bobarian NinjaTrader 4 January 11th, 2013 12:09 PM
Code snippet for calculating slope Saroj NinjaTrader Programming 2 April 6th, 2011 10:44 AM
Using slope of an indicator in an auto-strategy nanobiotech NinjaTrader Programming 4 August 6th, 2010 12:31 PM
LINEAR REGRESSIO SLOPE SFX riskybiz NinjaTrader 3 April 10th, 2010 08:36 AM
Calculating the slope of _ADXVMA_Alertsv01_5_1 nanobiotech NinjaTrader Programming 3 April 6th, 2010 01:35 PM


All times are GMT -4. The time now is 11:06 AM.

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-16 in 0.11 seconds with 20 queries on phoenix via your IP 54.226.34.209