NexusFi: Find Your Edge


Home Menu

 





Coding question - NinjaTrader


Discussion in NinjaTrader

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




 
Search this Thread
  #1 (permalink)
 Abde 
Stuttgart / Germany
 
Experience: Intermediate
Platform: FlatTrader
Broker: GFT and Interactive Brokers
Trading: ES, DAX
Frequency: Every few days
Duration: Days
Posts: 509 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?
Bookmap Global Plus Lifetime + Lifetime Addons For Sale
Platforms and Indicators
One Wallet Made $200K in Hours: AP Probes Polymarket Cea …
Prediction Markets & Event Contracts
Saylors 41-Month HODL Breaks: Strategy Sells 32 BTC as $ …
Prediction Markets & Event Contracts
CME Launches Bitcoin Volatility Futures June 1 -- First …
Cryptocurrency
Kharg Island at 6%, Regime Fall at 1.5% -- The Black Swa …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
8 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #2 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,114


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: 509 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: NQ / ES / 6E / 6B / CL
Frequency: Every few days
Duration: Minutes
Posts: 1,802 since Aug 2009
Thanks Given: 11,742
Thanks Received: 3,018


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 X 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
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,114


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


© 2026 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 - Downloads - Top
no new posts