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,707 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?
Day 96 Missiles Hit Kuwait and Bahrain: June 15 Peace at …
Prediction Markets & Event Contracts
Iran Peace Expired NO: Ceasefire on Life Support, OPEC a …
Prediction Markets & Event Contracts
Post-Summit Scorecard: $36M in May 15 Bets Settle Near-Z …
Prediction Markets & Event Contracts
Warsh Opens Today, Hormuz June 19 -- WTI Below $80, Fran …
Prediction Markets & Event Contracts
World Cup Opens: USA at 45.5% Tonight as Markets Push Ba …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
15 thanks
Darmok and Jalad at Tanagra
3 thanks
Big Mike in Ecuador
1 thanks
30 Sessions
1 thanks
  #2 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Legendary 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,117


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,817 since Aug 2009
Thanks Given: 11,767
Thanks Received: 3,043


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
Legendary 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,117


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