How to set values that Ninja Trader does not support. - NinjaTrader Programming | futures io social day trading
futures io futures trading


How to set values that Ninja Trader does not support.
Updated: Views / Replies:2,807 / 7
Created: by CryptOrchid Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

How to set values that Ninja Trader does not support.

  #1 (permalink)
Elite Member
San Jose, CA
 
Futures Experience: Intermediate
Platform: NinjaTrader, TradeStation
Broker/Data: Mirus/zen-fire
Favorite Futures: 6e, TF, CL
 
Posts: 2 since May 2010
Thanks: 2 given, 0 received

How to set values that Ninja Trader does not support.

It seems like the minimum number of api's are exported, documented, and supported. Looking for some way to discover and access some of these values. Any hints or clues how to do this would be greatly appreciated.

I am trying to get the following functionality on NT7. I want to use the fixed scale so that the size of price bars do not change based upon the range of data on the screen. I also want to have the most current price in the middle of the chart.

This is easily achieved manually by using the fixed scale on the right scale and changing the scale min and max values. I want to create a simple indicator that updates the scale min and max values upon bar close.

So on bar close, I would calculate how much the min and max values need to change to keep the scale fixed but shift the price range to keep the close in the middle of the chart by setting min and max.

But I can not find an api for changing the min and max values for the price scale. Is there some way to discover or hack into NinjaTrader to accomplish this.

Thanks,
CryptOrchid

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Just starting out...
Houston, TX
 
Futures Experience: Intermediate
Platform: Ninja, MetaTrader
Broker/Data: IB
Favorite Futures: EUR/USD 6E
 
Posts: 23 since Apr 2010
Thanks: 16 given, 5 received


Look on the Ninja Trader forum for an indicator named VerticalScale (version 2) - It was written for 6.5, but the logic will probably work on 7 (maybe).

Reply With Quote
 
  #4 (permalink)
Elite Member
Madison, WI
 
Futures Experience: Advanced
Platform: Sierra Charts, ALT
Favorite Futures: ES
 
aslan's Avatar
 
Posts: 614 since Jan 2010
Thanks: 342 given, 1,077 received

FixedScale Indicator

Well this has been hashed out on the NT forums, and of course since you are looking for a solution it was obviously not implemented.

In terms of API, I can not help you out, but if you check out the following NT Post, you will find a file called FixedScale.cs.

This indicator tries to implement fixed scale, but it has to do it by tricking NT (instead of calling an API). It does so, by using transparent drawing objects that set the autoscale, and these are placed in the Plot() routine. This is really just a hack, and was meant to show the NT guys how it could work, but it worked pretty well.

I have not used in a while, so not sure if it still works, but it might give you some ideas.

If I remember correctly, it does not center the last price, but instead tries to keep the last bar on the screen to maximize the amount of data that was kept on the screen. Probably could be changed to center if that is what you really wanted.

Reply With Quote
The following 3 users say Thank You to aslan for this post:
 
  #5 (permalink)
 Vendor: www.tradingstudies.com 
Denver, CO
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Amp Futures/Zen-Fire
Favorite Futures: TF, ES, CL
 
roonius's Avatar
 
Posts: 132 since Jun 2009
Thanks: 20 given, 272 received

There is undocumented GetMinMaxValues method you can override:

 
Code
        public override void GetMinMaxValues(Gui.Chart.ChartControl chartControl, ref double min, ref double max)
        {
            base.GetMinMaxValues(chartControl, ref min, ref max); // here you get "real" min max values

            min = min - 10; // you can adjust min and max to your liking
            max = max + 10; //
        }

Reply With Quote
The following 3 users say Thank You to roonius for this post:
 
  #6 (permalink)
Elite Member
San Jose, CA
 
Futures Experience: Intermediate
Platform: NinjaTrader, TradeStation
Broker/Data: Mirus/zen-fire
Favorite Futures: 6e, TF, CL
 
Posts: 2 since May 2010
Thanks: 2 given, 0 received

So were are these undocumented calls documented?

How I envision the code would work I would not only need to get the min/max values but I would also need to set them. Is there a call like base.SetMinMaxValues().

And the obvious questions is where are these undocumented calls documented? Or how would I explore what the undocumented calls are?

Thanks
CryptOrchid

Reply With Quote
 
  #7 (permalink)
Elite Member
Madison, WI
 
Futures Experience: Advanced
Platform: Sierra Charts, ALT
Favorite Futures: ES
 
aslan's Avatar
 
Posts: 614 since Jan 2010
Thanks: 342 given, 1,077 received

They are not documented (at least for us). We can not see all of the internal architecture and calls inside NT. Because the NT arch is extensible though, a certain interface is exposed and documented (what they call supported NinjaScript). Now there are also a number of routines that are called that are exposed name-wise, but are not supported, so are not externally documented. Some items fall in between (i.e. the bar formation code is exposed, but not really documented). If you are nice, and ask the right questions, NT guys will occasionally give you hints to get a little further. There are a lot of undocumented routines that you can find by using reflection to get the names of routines and the parms they take, but not knowing what they do makes it kind of trial and error.

For the min/max, you can not really set them per se, but instead set them by returning them in the Get() routine. Now that will only work, if NT always uses this routine to get the values.

Reply With Quote
The following user says Thank You to aslan for this post:
 
  #8 (permalink)
Just starting out...
Houston, TX
 
Futures Experience: Intermediate
Platform: Ninja, MetaTrader
Broker/Data: IB
Favorite Futures: EUR/USD 6E
 
Posts: 23 since Apr 2010
Thanks: 16 given, 5 received

Roonius: How do you find out these things? I have asked NT folks if there is any documentatin for developers and was told "NO". What amazes me is that each month they add several new developers with completed add-on systems to their approved list. But we struggle to get simple things done. Thanks, Ken.

Reply With Quote

Reply



futures io > > > > > How to set values that Ninja Trader does not support.

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading values from Excel to Ninja spinnybobo NinjaTrader Programming 8 September 13th, 2015 12:23 PM
How to set up a Stop (Limit) Loss order - Ninja Trader jdumanic NinjaTrader 2 June 7th, 2011 06:40 PM
ninja trader object reference not set to an instance kk240 NinjaTrader Programming 4 December 29th, 2010 11:16 AM
conditional logic using a set of values as determinant Saroj NinjaTrader Programming 9 October 5th, 2009 11:30 AM
Translating EMA-values to ZN-values or visaversa max-td NinjaTrader Programming 17 June 22nd, 2009 04:42 PM


All times are GMT -4. The time now is 06:46 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-12 in 0.09 seconds with 19 queries on phoenix via your IP 54.145.51.250