Manage orders with dictionary TryGetValue in levels - NinjaTrader Programming | futures io social day trading
futures io futures trading


Manage orders with dictionary TryGetValue in levels
Updated: Views / Replies:945 / 1
Created: by je951 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 100,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

 
 
Thread Tools
 

Manage orders with dictionary TryGetValue in levels

 
Elite Member
Australia
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: ES
 
Posts: 2 since Apr 2011
Thanks: 1 given, 0 received

Manage orders with dictionary TryGetValue in levels

I am working on managing orders on support and resistance levels, using unManaged order in Ninjatrader. In order to be in the front of the queue to get fill, I submit all orders on strategy start up. Then when price move in between 2 levels, orders will be cancelled and added under certain condition.

Can anyone help to correct my code? Thanks in advance!

 
Code
private IOrder es_0 = null;
private double SRHigh = 0;
private double SRLow = 0;
private double level_0 = 0;
private IOrder shortR1       = null;
private IOrder shortR11      = null;

private void Es_0()
		{es_0 = SubmitOrder(0, OrderAction.Sell, OrderType.Limit, DefaultQuantity, level_0, 0, "", "es_0");}
		private void Es_1()

listSR.Add(level_0);

protected void FindSR() //find top and bottom levels 
			{ 
				listSR.Sort();
				for (int x = 0; x < listSR.Count; x++)
				{
					if (listSR[x] > Close[0])
						{
							SRHigh = listSR[x];
							if (x != 0) SRLow = listSR[x - 1];
							break;
						}
					if (listSR[x] > Close[0]) SRLow = 0;
					if (listSR[x] < Close[0]) SRHigh = 0;
				}
			}

public class Orders
		{
			public IOrder Order1 { get; set; }
			public IOrder Order11 { get; set; }
		}
		protected void Dictionary()  //find orders on levels
		{
            Dictionary<double, Orders> dict = new Dictionary<double, Orders>();
            dict.Add(level_0, new Orders { Order1 = es_0, Order11 = ts_0 });
			
				if (dict.TryGetValue(level_0, out Orders(Order1)))
					shortR1 = Order1;
				if (dict.TryGetValue(level_0, out Orders(Order11)))
					shortR11 = Order11;
        }

 
 
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.


 



futures io > > > > > Manage orders with dictionary TryGetValue in levels
Thread Tools



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

Journal Challenge w/Earn2Trade and $599 in Prizes

November
 

Anthony Drager: TBA

Nov 29
 

Linda Raschke: TBA

Elite only
 

Peter Davies: TBA

Dec 6
 

Brannigan Barrett: TBA

Elite only
 

Cannon Trading: Ask Me Anything

Dec 13
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Global Dictionary sender and receiver RM99 EasyLanguage Programming 12 June 30th, 2018 11:35 AM
Looking for advice on how to manage order in TWS sharp2be IB Trader Workstation 9 September 9th, 2012 09:27 PM
Global Dictionary Question c12345 EasyLanguage Programming 1 February 24th, 2012 04:05 PM
IMF Says Ireland Can Manage on Its Own Quick Summary News and Current Events 1 November 13th, 2010 12:30 PM
How do you manage & maintain? thinkfuture Traders Hideout 5 April 30th, 2010 09:14 PM


Tags
code, information, ninjascript, ninjatrader, resistance, strategy, support and resistance

All times are GMT -4. The time now is 06:36 PM. (this page content is cached, log in for real-time version)

Copyright © 2018 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 2018-11-18 in 0.08 seconds with 14 queries on phoenix