NexusFi: Find Your Edge


Home Menu

 





Use of Rising() and Slope()


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one MXASJ with 12 posts (0 thanks)
    2. looks_two Prtester with 3 posts (0 thanks)
    3. looks_3 tortexal with 1 posts (0 thanks)
    4. looks_4 krakken with 1 posts (0 thanks)
    1. trending_up 10,277 views
    2. thumb_up 0 thanks given
    3. group 4 followers
    1. forum 17 posts
    2. attach_file 2 attachments




 
Search this Thread

Use of Rising() and Slope()

  #1 (permalink)
 MXASJ 
Asia
 
Experience: Beginner
Platform: NinjaTrader, TOS
Posts: 796 since Jun 2009
Thanks Given: 109
Thanks Received: 800

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

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NexusFi Journal Challenge - May 2024
Feedback and Announcements
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
MC PL editor upgrade
MultiCharts
Better Renko Gaps
The Elite Circle
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
48 thanks
Just another trading journal: PA, Wyckoff & Trends
35 thanks
Tao te Trade: way of the WLD
25 thanks
Bigger Wins or Fewer Losses?
24 thanks
GFIs1 1 DAX trade per day journal
21 thanks
  #2 (permalink)
 MXASJ 
Asia
 
Experience: Beginner
Platform: NinjaTrader, TOS
Posts: 796 since Jun 2009
Thanks Given: 109
Thanks Received: 800

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...

Started this thread Reply With Quote
  #3 (permalink)
 MXASJ 
Asia
 
Experience: Beginner
Platform: NinjaTrader, TOS
Posts: 796 since Jun 2009
Thanks Given: 109
Thanks Received: 800



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?

Started this thread Reply With Quote
  #4 (permalink)
 Prtester 
SE-Asia
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Amp
Trading: ES
Posts: 151 since Jun 2009
Thanks Given: 66
Thanks Received: 124

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

Reply With Quote
  #5 (permalink)
 zeller4 
Orlando Florida
 
Experience: Intermediate
Platform: NT8
Trading: CL, NQ, ES, RTY
Posts: 477 since Jun 2009
Thanks Given: 1,416
Thanks Received: 404


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

Reply With Quote
  #6 (permalink)
 MXASJ 
Asia
 
Experience: Beginner
Platform: NinjaTrader, TOS
Posts: 796 since Jun 2009
Thanks Given: 109
Thanks Received: 800

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.

Started this thread Reply With Quote
  #7 (permalink)
 MXASJ 
Asia
 
Experience: Beginner
Platform: NinjaTrader, TOS
Posts: 796 since Jun 2009
Thanks Given: 109
Thanks Received: 800

{ ///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.

Started this thread Reply With Quote
  #8 (permalink)
 MXASJ 
Asia
 
Experience: Beginner
Platform: NinjaTrader, TOS
Posts: 796 since Jun 2009
Thanks Given: 109
Thanks Received: 800


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?

Started this thread Reply With Quote
  #9 (permalink)
 Prtester 
SE-Asia
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Amp
Trading: ES
Posts: 151 since Jun 2009
Thanks Given: 66
Thanks Received: 124


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]

Reply With Quote
  #10 (permalink)
 Prtester 
SE-Asia
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Amp
Trading: ES
Posts: 151 since Jun 2009
Thanks Given: 66
Thanks Received: 124



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

Reply With Quote




Last Updated on August 13, 2011


© 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