NexusFi: Find Your Edge


Home Menu

 





Coding question - NinjaTrader


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Abde with 2 posts (0 thanks)
    2. looks_two Fat Tails with 2 posts (1 thanks)
    3. looks_3 DavidHP with 1 posts (1 thanks)
    4. looks_4 DaveWave with 1 posts (0 thanks)
    1. trending_up 1,857 views
    2. thumb_up 2 thanks given
    3. group 3 followers
    1. forum 5 posts
    2. attach_file 0 attachments




 
Search this Thread

Coding question - NinjaTrader

  #1 (permalink)
 Abde 
Stuttgart / Germany
 
Experience: Intermediate
Platform: FlatTrader
Broker: GFT and Interactive Brokers
Trading: ES, DAX
Frequency: Every few days
Duration: Days
Posts: 533 since Aug 2010
Thanks Given: 2,141
Thanks Received: 729

Hello Coders,

I īm working on an stopping volume indicator and need a little help.

The indicator compares the current volume and bar range, with the volume and bar range of the previous bar.
I like now to replace the bar ranges only with the open to close ranges of the bars. How can I do that?

Here comes the relevant code part:

 
Code
if( Close[0] > Open[0] && Volume[0] > Volume[1] && Range()[0] <= Range()[1])
else if( Close[0] <= Open[0] && Volume[0] > Volume[1] && Range()[0] <= Range()[1])
Many thanks in advance for any help.

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
NexusFi Journal Challenge - May 2024
Feedback and Announcements
Better Renko Gaps
The Elite Circle
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
MC PL editor upgrade
MultiCharts
 
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)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


Abde View Post
Hello Coders,

I īm working on an stopping volume indicator and need a little help.

The indicator compares the current volume and bar range, with the volume and bar range of the previous bar.
I like now to replace the bar ranges only with the open to close ranges of the bars. How can I do that?

Here comes the relevant code part:

 
Code
if( Close[0] > Open[0] && Volume[0] > Volume[1] && Range()[0] <= Range()[1])
else if( Close[0] <= Open[0] && Volume[0] > Volume[1] && Range()[0] <= Range()[1])
Many thanks in advance for any help.

Replace Range()[0] with Math.Abs(Close[0] - Open[0]).

Reply With Quote
  #3 (permalink)
 Abde 
Stuttgart / Germany
 
Experience: Intermediate
Platform: FlatTrader
Broker: GFT and Interactive Brokers
Trading: ES, DAX
Frequency: Every few days
Duration: Days
Posts: 533 since Aug 2010
Thanks Given: 2,141
Thanks Received: 729



Fat Tails View Post
Replace Range()[0] with Math.Abs(Close[0] - Open[0]).

It works perfect - Thank you Harry.

PS: for what stands "Math.Abs", for difference?

Started this thread Reply With Quote
  #4 (permalink)
 
DavidHP's Avatar
 DavidHP 
Isla Mujeres, MX
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Ninjatrader / Optimus Futures / AmpFutures
Trading: ES / 6E / 6B / CL
Frequency: Every few days
Duration: Minutes
Posts: 1,611 since Aug 2009
Thanks Given: 11,341
Thanks Received: 2,744


Abde View Post
It works perfect - Thank you Harry.

PS: for what stands "Math.Abs", for difference?

C# Math.Abs: Absolute Value

Rejoice in the Thunderstorms of Life . . .
Knowing it's not about Clouds or Wind. . .
But Learning to Dance in the Rain ! ! !
Follow me on Twitter Reply With Quote
Thanked by:
  #5 (permalink)
DaveWave
New york, NY/USA
 
Posts: 4 since Sep 2014
Thanks Given: 0
Thanks Received: 0

Hi,

I have been trying to develop and RSI divergence scanner for my thinkorswim platform (ex: neg divergence: price is rising but RSI is declining, ex: pos divergence: price is declining but RSI is increasing) I am not a scripter but would appreciate any help in creating one,

thanks Dave

Reply With Quote
  #6 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


DaveWave View Post
Hi,

I have been trying to develop and RSI divergence scanner for my thinkorswim platform (ex: neg divergence: price is rising but RSI is declining, ex: pos divergence: price is declining but RSI is increasing) I am not a scripter but would appreciate any help in creating one,

thanks Dave

@DaveWave: This thread is about coding for NinjaTrader. You have put your request in the wrong place.

Reply With Quote
Thanked by:




Last Updated on December 5, 2014


© 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