Global Variables and Strategies in Ninja 6.5 - NinjaTrader Programming | futures io social day trading
futures io futures trading


Global Variables and Strategies in Ninja 6.5
Updated: Views / Replies:1,844 / 3
Created: by TonyA 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 and Strategies in Ninja 6.5

  #1 (permalink)
Elite Member
Toronto, Ontario
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: zenfire
Favorite Futures: 6E
 
TonyA's Avatar
 
Posts: 2 since Aug 2009
Thanks: 4 given, 0 received

Global Variables and Strategies in Ninja 6.5

Hi,

Hoping to get some direction from someone in the forum.

Originally I started down the path of creating a strategy that would use the OCO concept by having a long and a short both created in a strategy and when one order was triggered the other would be cancelled. I researched the Ninja forum and discovered that one cannot place a short and a long from the same strategy ( this is also confirm by Josh in one of his replies). However, some managed to get both orders into the dom by using 2 strategies, one for the long and another for the short. Bertrand mentioned that one could use global variables to acomplish the equivalent of an OCO and once the order is triggered on one side an update to the global variable could be made and the other strategy could just cancel the other side of the order. The use of global variables is not support in the forum and no direction is provided.

this is the ninja forum post
Gloabal Variables? - Page 2 - NinjaTrader Support Forum
look at post 24.

I was hoping someone could kindly point me in the correct direction as to how to create the DLL and access it with the snippet of code provided in ninja forum.

Regards,

Tony

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)
Administrator: Retired Backtester
 Vendor: speedytradingservers.com 
Rennes France
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: IB/Kinetick
Favorite Futures: Futures
 
sam028's Avatar
 
Posts: 3,366 since Jun 2009
Thanks: 3,574 given, 3,982 received


There is an easy way to do this, maybe not the cleanest/faster way, but easy: let your variable be a file.
In the Long strategy, if the order is triggered, and their is no "short.txt" file, create a file "long.txt".
In the Short strategy, check if a file named long.txt exists, and don't take the trade if yes.
Much easier to do than writing a .dll which manage a GV.

Success requires no deodorant! (Sun Tzu)
Reply With Quote
The following user says Thank You to sam028 for this post:
 
  #4 (permalink)
Elite Member
Toronto, Ontario
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: zenfire
Favorite Futures: 6E
 
TonyA's Avatar
 
Posts: 2 since Aug 2009
Thanks: 4 given, 0 received

Thank You Sam

Have yet to see the global variable approach anywhere in an example.

However I believe have seen an example of file usage you describe in one of the indicators in the forum.

I'll see if i can find it. At least i will have something to go by.

Thank you kindly

Tony

Reply With Quote

Reply



futures io > > > > > Global Variables and Strategies in Ninja 6.5

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 (GV) in EasyLanguage for TradeStation/MultiCharts Big Mike EasyLanguage Programming 19 October 29th, 2013 04:07 PM
global variables: anyone got a complete NT7 example? elbone NinjaTrader Programming 2 July 19th, 2011 10:13 AM
Exposing variables kaywai NinjaTrader Programming 4 April 14th, 2011 12:58 PM
Experience Trading LIVE automated Strategies with Ninja ??? gtichauer The Elite Circle 6 April 28th, 2010 06:56 PM
Does anyone esle find Ninja problematic for optimizing strategies? rsi77 NinjaTrader 3 June 17th, 2009 09:32 PM


All times are GMT -4. The time now is 06:24 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.09 seconds with 19 queries on phoenix via your IP 54.82.81.154