Global Variables - does this beast exist in Ninja - NinjaTrader Programming | futures io social day trading
futures io futures trading


Global Variables - does this beast exist in Ninja
Updated: Views / Replies:3,403 / 13
Created: by trendisyourfriend 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
 

Global Variables - does this beast exist in Ninja

  #1 (permalink)
Elite Member
Quebec
 
Futures Experience: Intermediate
Platform: NinjaTrader wt Rancho Dinero's profiling tools
Broker/Data: Stage 5 trading/AMP/CQG
Favorite Futures: ES, NQ, YM
 
trendisyourfriend's Avatar
 
Posts: 3,697 since Oct 2009
Thanks: 3,041 given, 4,496 received

Global Variables - does this beast exist in Ninja

Is it possible for two different charts that use the same symbol in their DataSeries to share a common variable ? Does the concept of Global Variable exist in Ninja ?

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)
Elite Member
Atkinson, NH USA
 
Futures Experience: Intermediate
Platform: NinjaTrader 8/TensorFlow
Broker/Data: NinjaTrader Brokerage
Favorite Futures: Futures, CL, ES, ZB
 
NJAMC's Avatar
 
Posts: 1,925 since Dec 2010
Thanks: 2,962 given, 2,294 received



trendisyourfriend View Post
Is it possible for two different charts that use the same symbol in their DataSeries to share a common variable ? Does the concept of Global Variable exist in Ninja ?

If I understand your question, the answer would be no. Two charts cannot communicate with one another. I suspect you have something else in mind such as an Indicator or Strategy. If this is the case, give more information and there may be a programming technique to get what youneed.

Nil per os
-NJAMC [Generic Programmer]

LOM WIKI: NT-Local-Order-Manager-LOM-Guide
Artificial Bee Colony Optimization
Reply With Quote
The following user says Thank You to NJAMC for this post:
 
  #4 (permalink)
Elite Member
Quebec
 
Futures Experience: Intermediate
Platform: NinjaTrader wt Rancho Dinero's profiling tools
Broker/Data: Stage 5 trading/AMP/CQG
Favorite Futures: ES, NQ, YM
 
trendisyourfriend's Avatar
 
Posts: 3,697 since Oct 2009
Thanks: 3,041 given, 4,496 received


NJAMC View Post
If I understand your question, the answer would be no. Two charts cannot communicate with one another. I suspect you have something else in mind such as an Indicator or Strategy. If this is the case, give more information and there may be a programming technique to get what youneed.

I might have some ideas but if Global variables are not supported then i am not sure what to think. I/RT supports it very well. Let's take an easy task (in my mind), i use a SMA(8) on a Range chart and would like to pass the current value of this RangeChart(x).SMA(8) to another chart that is a tick chart for example. Is this possible ?

Reply With Quote
 
  #5 (permalink)
Elite Member
Atkinson, NH USA
 
Futures Experience: Intermediate
Platform: NinjaTrader 8/TensorFlow
Broker/Data: NinjaTrader Brokerage
Favorite Futures: Futures, CL, ES, ZB
 
NJAMC's Avatar
 
Posts: 1,925 since Dec 2010
Thanks: 2,962 given, 2,294 received


trendisyourfriend View Post
I might have some ideas but if Global variables are not supported then i am not sure what to think. I/RT supports it very well. Let's take an easy task (in my mind), i use a SMA(8) on a Range chart and would like to pass the current value of this RangeChart(x).SMA(8) to another chart that is a tick chart for example. Is this possible ?

If you are only trying to display the value, you are looking at a multi timeframe Indicator. The indicator would be applied to the "other chart". you wouldn't actually need the RangeChart open. This is not trivial, but can be done, and would need to be coded.

Nil per os
-NJAMC [Generic Programmer]

LOM WIKI: NT-Local-Order-Manager-LOM-Guide
Artificial Bee Colony Optimization
Reply With Quote
 
  #6 (permalink)
Elite Member
Denver, CO
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: NinjaTrader Brokerage
Favorite Futures: ES
 
NinjaTrader's Avatar
 
Posts: 1,260 since May 2010
Thanks: 153 given, 1,890 received


trendisyourfriend View Post
I might have some ideas but if Global variables are not supported then i am not sure what to think. I/RT supports it very well. Let's take an easy task (in my mind), i use a SMA(8) on a Range chart and would like to pass the current value of this RangeChart(x).SMA(8) to another chart that is a tick chart for example. Is this possible ?

You could just add both series to a single chart, apply the indicator to the range series but it plot it over top of the other tick series and hide the range series...If I understand what you want to do correctly.

I believe this video might help - NinjaTrader 7 Tips - Hidden Data Series - YouTube

Reply With Quote
 
  #7 (permalink)
Elite Member
Bala, PA, USA
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Mirus, IB
Favorite Futures: SPY, Oil, Euro
 
monpere's Avatar
 
Posts: 1,858 since Jul 2010
Thanks: 300 given, 3,276 received


trendisyourfriend View Post
Is it possible for two different charts that use the same symbol in their DataSeries to share a common variable ? Does the concept of Global Variable exist in Ninja ?

I haven't had the need tor two charts to talk to each other, but I get an indicator to talk to a strategy using this:

//### This is for External strategies.
//### Update() ensures this exposed variable is up to date, when external strategy Add()'s this indicator
public string TradeCommand {
get { Update(); return tradeCommand; }
Set { tradeCommand = value; }
}

And I get one indicator to share variables with another indicator like this:

public class GlobalChartVars {
public static Dictionary<string, string> chartIds = new Dictionary<string, string>();
public static Dictionary<string, string> SoundFiles = new Dictionary<string, string>();
}

I think the 2nd one should be able to share data between charts. I haven't tried it that way, but maybe that can give you some ideas.


Last edited by monpere; January 28th, 2012 at 08:02 PM.
Reply With Quote
The following 3 users say Thank You to monpere for this post:
 
  #8 (permalink)
Elite Member
Portland, OR
 
Futures Experience: Intermediate
Platform: Sierra Chart
Favorite Futures: ES
 
Posts: 269 since Jan 2011
Thanks: 326 given, 179 received

- I have done some work in this space
- it is possible to share the values using globalvariable.dll (tradestation dll)
- I would do a cleanup of the code and post in elite downloads section soon.

Reply With Quote
The following user says Thank You to ejtrader for this post:
 
  #9 (permalink)
Elite Member
East Coast
 
Futures Experience: Beginner
Platform: Ninja
Favorite Futures: ES, NQ
 
Posts: 125 since Apr 2010
Thanks: 55 given, 81 received

The GlobalVariable.dll was great in TradeStation and NT 32bit. In 64bit NT the static class works.

Reply With Quote
 
  #10 (permalink)
Elite Member
Portland, OR
 
Futures Experience: Intermediate
Platform: Sierra Chart
Favorite Futures: ES
 
Posts: 269 since Jan 2011
Thanks: 326 given, 179 received


Tarkus1 - you are correct. I did it sometime back and realized it would work only with 32 bit version of Ninja ( due to the dll being 32 bit).

probably static class might be the way to go in that case.

Thanks.

Reply With Quote

Reply



futures io > > > > > Global Variables - does this beast exist in Ninja

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
Global Variables In TS c12345 EasyLanguage Programming 7 October 14th, 2017 10:52 AM
Global Variables (GV) in EasyLanguage for TradeStation/MultiCharts Big Mike EasyLanguage Programming 19 October 29th, 2013 04:07 PM
Global variables for sharing data between Charts ECI Ed NinjaTrader Programming 5 March 6th, 2012 10:02 AM
global variables: anyone got a complete NT7 example? elbone NinjaTrader Programming 2 July 19th, 2011 10:13 AM
Global Variables and Strategies in Ninja 6.5 TonyA NinjaTrader Programming 3 November 6th, 2010 08:50 AM


All times are GMT -4. The time now is 04:15 PM.

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.13 seconds with 19 queries on phoenix via your IP 54.163.210.170