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 1,870 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?
Footprint for strategy Builder
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
Cheap historycal L1 data for stocks
Stocks and ETFs
ZombieSqueeze
Platforms and Indicators
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Funded Trader platforms
58 thanks
Trading with Intuition
16 thanks
Self sabotage reframed
15 thanks
Joes Trading Garage
13 thanks
GFIs1 1 DAX trade per day journal
11 thanks
  #2 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Legendary 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,103


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,618 since Aug 2009
Thanks Given: 11,348
Thanks Received: 2,750


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


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