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


Use of Rising() and Slope()
Updated: Views / Replies:7,101 / 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 100,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

 
 2  
 
Thread Tools
 

Use of Rising() and Slope()

 
Elite Member
Asia
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
 
Posts: 798 since Jun 2009
Thanks: 109 given, 790 received

Use of Rising() and Slope()

Hey All,

I've been using Rising() in some scripts and get false signals when you eyeball the chart. Perhaps the indicator is indeed rising but by a very small amount. Do any of you use Slope()?

Specifically I've been playing with something like this (not the real code);

if Rising (ADXVMA) == true
enterLong
exitShort

if Falling (ADXVMA) == true
enterShort
exitLong

80% of the time it does what I want it to, but 20% of the time I'm getting trades triggered in what the chart says is "neutral" territory.

I'm also scratching my head with TSSupertrend in a strategy... I tried the Rising() and Falling () commands with TSSupertrend thinking what was rising, falling, or flat were the red and green dash lines above and below the price candles... but that does not seem to be the case. I've looked at the code for that indicator and can't figure it out.

Basically what I've been working on a strategy with a set of conditions as follows;

If ADXVMA says go long (blue and rising compared to last bar) 80% there!
If TSSupertrend says go long (green and rising compared to last bar) Not even in the ball park
If ATRRatio says its OK to trade. Easy!
Then go long

I'm not looking for someone to do it for me... but any pointers would be appreciated!

Current code for longs is:

if
(ATRratio(49, 7, 1).Ratio[0] > 1
&& TSSuperTrend(14, TradingStudies.NinjaScript.Utility.MovingAverageType.VWMA, 2.618, 14, TradingStudies.NinjaScript.Utility.SuperTrendMode.ATR).UpTrend[0] == TSSuperTrend(14, TradingStudies.NinjaScript.Utility.MovingAverageType.VWMA, 2.618, 14, TradingStudies.NinjaScript.Utility.SuperTrendMode.ATR).UpTrend[0]
&& Rising(ADXVMA_sharky_paint(9, true).Main) == true)

... go long.

In this example I'm trying TSSupertrend value "Uptrend"... which is not really doing it.

Any thoughts or pointers?

Tks

 
 
Elite Member
Asia
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
 
Posts: 798 since Jun 2009
Thanks: 109 given, 790 received

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

Seems to be the code of choice on the long side of what I'm trying to do...

 
 
Elite Member
Asia
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
 
Posts: 798 since Jun 2009
Thanks: 109 given, 790 received



MXASJ View Post
if (Close[0] > TSSuperTrend(14, TradingStudies.NinjaScript.Utility.MovingAverageType.SMA, 2.618, 14, TradingStudies.NinjaScript.Utility.SuperTrendMode.ATR).UpTrend[0]

Seems to be the code of choice on the long side of what I'm trying to do...

Wrong. Seems it still enters trades it shouldn't. For example, it just went long on FESX even though the price (close) was well below the red line drawn by TSSupertrend... which should have not allowed a long entry. Any ideas what condition I can use from TSSupertrend in a strategy?

 
 
Elite Member
SE-Asia
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Amp
Favorite Futures: ES
 
Posts: 145 since Jun 2009
Thanks: 61 given, 115 received

Rising (ADXVMA) is the same as ADXVMA[0] > ADXVMA [1] , maybe you should look more than 1 bar to get what you want.

 
 
Elite Member
Florida
 
Futures Experience: Intermediate
Platform: NT7
Favorite Futures: CL, NQ, NG
 
Posts: 467 since Jun 2009
Thanks: 1,393 given, 390 received


MXASJ View Post
Hey All,

I've been using Rising() in some scripts and get false signals when you eyeball the chart. Perhaps the indicator is indeed rising but by a very small amount. Do any of you use Slope()?

Specifically I've been playing with something like this (not the real code);

if Rising (ADXVMA) == true
enterLong
exitShort

if Falling (ADXVMA) == true
enterShort
exitLong

80% of the time it does what I want it to, but 20% of the time I'm getting trades triggered in what the chart says is "neutral" territory.

I'm also scratching my head with TSSupertrend in a strategy... I tried the Rising() and Falling () commands with TSSupertrend thinking what was rising, falling, or flat were the red and green dash lines above and below the price candles... but that does not seem to be the case. I've looked at the code for that indicator and can't figure it out.

Basically what I've been working on a strategy with a set of conditions as follows;

If ADXVMA says go long (blue and rising compared to last bar) 80% there!
If TSSupertrend says go long (green and rising compared to last bar) Not even in the ball park
If ATRRatio says its OK to trade. Easy!
Then go long

I'm not looking for someone to do it for me... but any pointers would be appreciated!

Current code for longs is:

if
(ATRratio(49, 7, 1).Ratio[0] > 1
&& TSSuperTrend(14, TradingStudies.NinjaScript.Utility.MovingAverageType.VWMA, 2.618, 14, TradingStudies.NinjaScript.Utility.SuperTrendMode.ATR).UpTrend[0] == TSSuperTrend(14, TradingStudies.NinjaScript.Utility.MovingAverageType.VWMA, 2.618, 14, TradingStudies.NinjaScript.Utility.SuperTrendMode.ATR).UpTrend[0]
&& Rising(ADXVMA_sharky_paint(9, true).Main) == true)

... go long.

In this example I'm trying TSSupertrend value "Uptrend"... which is not really doing it.

Any thoughts or pointers?

Tks

what I'm reading in the highlighted code above is x.Uptrend[0] == xUptrend[0] unless I'm missing something ??

kz

 
 
Elite Member
Asia
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
 
Posts: 798 since Jun 2009
Thanks: 109 given, 790 received

zeller4 - I was looking for an Uptrend=True argument with that code... which has since been replaced. I think that arugument is part of what I'm still looking for. So if the green and red lines from TSSupertrend represent UpTrend/DownTrend, then the condition I am trying to create is if UpTrend and Close > Uptrend, go long. If DownTrend and Close < DownTrend, go short.

Its a rehash of Mike's Synergy thing... basically get a bunch of indicators in agreement before entering a position.

 
 
Elite Member
Asia
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
 
Posts: 798 since Jun 2009
Thanks: 109 given, 790 received

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

Is where I am now. The ATRRatio, ADXVMA, and ECO2 seek to be working (though I get the odd misfire on ADXVMA as mentioned), but the TSSupertrend condition is still problematic.

 
 
Elite Member
Asia
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
 
Posts: 798 since Jun 2009
Thanks: 109 given, 790 received


Prtester View Post
Rising (ADXVMA) is the same as ADXVMA[0] > ADXVMA [1] , maybe you should look more than 1 bar to get what you want.

Hmmmm.

Again I'm new to this. Does that mean that by using the argument;

&& (ADXVMA[0] > ADXVMA [1] > ADXVMA[2]);

I'd be looking back two bars instead of current bar and prior bar?

 
 
Elite Member
SE-Asia
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Amp
Favorite Futures: ES
 
Posts: 145 since Jun 2009
Thanks: 61 given, 115 received


MXASJ View Post
Hmmmm.

Again I'm new to this. Does that mean that by using the argument;

&& (ADXVMA[0] > ADXVMA [1] > ADXVMA[2]);

I'd be looking back two bars instead of current bar and prior bar?


Well I'll use ADXVMA[0] > ADXVMA [1] && ADXVMA[0] > ADXVMA[2]

 
 
Elite Member
SE-Asia
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Amp
Favorite Futures: ES
 
Posts: 145 since Jun 2009
Thanks: 61 given, 115 received



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

Is where I am now. The ATRRatio, ADXVMA, and ECO2 seek to be working (though I get the odd misfire on ADXVMA as mentioned), but the TSSupertrend condition is still problematic.

you should use " TSSuperTrend(14, TradingStudies.NinjaScript.Utility.MovingAverageTy pe.SMA, 2.618, 14, TradingStudies.NinjaScript.Utility.SuperTrendMode. ATR).Trend[0] == true" in order to look for long conditions


 



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



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

September Journal Challenge (sponsored by TopstepTrader)

September

Battlestations! Win $947 in prizes for showing us your trading desk!

October
 

Finding Your Edge & Maximizing Returns w/Richard L Weissman

Oct 16
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
dmplus v3a is there a slope indicator? bobarian NinjaTrader 4 January 11th, 2013 11:09 AM
Code snippet for calculating slope Saroj NinjaTrader Programming 2 April 6th, 2011 09:44 AM
Using slope of an indicator in an auto-strategy nanobiotech NinjaTrader Programming 4 August 6th, 2010 11:31 AM
LINEAR REGRESSIO SLOPE SFX riskybiz NinjaTrader 3 April 10th, 2010 07:36 AM
Calculating the slope of _ADXVMA_Alertsv01_5_1 nanobiotech NinjaTrader Programming 3 April 6th, 2010 12:35 PM


All times are GMT -4. The time now is 09:03 PM. (this page content is cached, log in for real-time version)

Copyright © 2018 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 2018-10-14 in 0.20 seconds with 15 queries on phoenix