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,431 / 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

  #11 (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,698 since Oct 2009
Thanks: 3,041 given, 4,498 received

What about using the clipboard ? I think i read something to this effect in another post of yours recently.


monpere View Post
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.


Reply With Quote
 
  #12 (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
What about using the clipboard ? I think i read something to this effect in another post of yours recently.

You could probably use that as well, but requires more coding then it is probably worth just to access the data in one variable.

Reply With Quote
The following user says Thank You to monpere for this post:
 
  #13 (permalink)
Trading Apprentice
Boston, Massachusetts
 
Futures Experience: Advanced
Platform: Ninjatrader,Tradestation
Favorite Futures: Oil
 
Posts: 7 since Mar 2013
Thanks: 1 given, 1 received

Question



monpere View Post
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; }
}

Monpere or anyone who knows, Does the code snippet above, in the strategy force the Indicator to Update its value or does it only update its own copy of the Last external public value published by the indicator.

Thanks
Jerry

Reply With Quote
 
  #14 (permalink)
 Vendor: www.probabletrades.com 
OC, California, USA
 
Futures Experience: Advanced
Platform: IB/TWS, NinjaTrader, thinkorswim
Favorite Futures: stocks, options, futures, VIX
 
shodson's Avatar
 
Posts: 1,860 since Jun 2009
Thanks: 480 given, 3,255 received

You're better off using a Singleton design pattern, and then writing semaphores around the get/setting of the singleton instance's shared data. If you want data "sent" to interested parties when changes are made look to implement INotifiyPropertyChanging.

Reply With Quote
The following user says Thank You to shodson for this post:

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)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

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 06:14 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-17 in 0.08 seconds with 19 queries on phoenix via your IP 54.82.81.154