ATM and Limit Orders - NinjaTrader Programming | futures io social day trading
futures io futures trading


ATM and Limit Orders
Updated: Views / Replies:2,483 / 6
Created: by spinnybobo Attachments:1

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
 

ATM and Limit Orders

  #1 (permalink)
Elite Member
Crete, IL/USA
 
Futures Experience: Intermediate
Platform: NinjaTrader, Mt4
Broker/Data: Tradestation/Tradestation, NinjaTrader, FXCM and Tallinex
Favorite Futures: ES, CL, EUR/USD, TF
 
spinnybobo's Avatar
 
Posts: 171 since Aug 2009
Thanks: 99 given, 48 received

ATM and Limit Orders

Hello All

I have a trend strategy that enters on the closing price of the latest finished bar when all conditions are met. so, it would go long at the high of the bar and short at the low of the bar.

The system is set for using Limit orders. I currently have it set for Market Order. I would like to set it for Limit Order, however, I like to forward test several different strategy settings using virtual machines, so I would not be there live to cancel the limit order if it gets too far away from the entry price.

I am using an ATM strategy. The code for the Limit order I found form NinjaTrader is:
if (orderId.Length == 0 && atmStrategyId.Length == 0 && Close[0] > Open[0])
{
atmStrategyId = GetAtmStrategyUniqueId();
orderId = GetAtmStrategyUniqueId();
AtmStrategyCreate(Cbi.Action.Buy, OrderType.Limit, Low[0], 0, TimeInForce.Day, orderId, "AtmStrategyTemplate", atmStrategyId);
}

I would like to buy at the High[0] on close and cancel if price goes 6 ticks higher than the closing price without filling me. For short, sell at the Low[0] on close and cancel if price goes 6 ticks lower than the closing price without filling me

attached is a picture. in the lower left corner is a visual of the closing price either long or short in direction with arrows.

any ideas on how to program this?
thanks
Spencer

Attached Thumbnails
ATM and Limit Orders-es.jpg  
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)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,357 given, 83,237 received


Working with ATM orders in Strategies will take a lot more code than you have there, because you have to do a lot of error checking and depending on your strategy you probably also need to track the open ATM position or possibly close it or modify it after the fact.

I'm sure you probably already know this, but ATM orders are not compatible with backtesting, just FYI. So you will only be able to test it in live data or market replay.

I don't have any code I can share for you because it was all written for paying customers back when I was doing this (I am not any longer), but I would say most likely you'll need to hire the work done at least the first time, to get your framework, and then if you know enough C# you can modify it from there.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #4 (permalink)
Elite Member
Frankfurt
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: FGBL 6E B4
 
max-td's Avatar
 
Posts: 1,754 since Jun 2009
Thanks: 2,309 given, 917 received


Quoting 
I would like to buy at the High[0] on close and cancel if price goes 6 ticks higher than the closing price without filling me. For short, sell at the Low[0] on close and cancel if price goes 6 ticks lower than the closing price without filling me

and cancel if price goes 6 ticks higher than the closing price without filling me.

exactly this thing here was a main subject of the strategy dsraider was working on - because this cancelation should also happen intrabar and not only if valid at barclose.
have a loot at the thread here : https://futures.io/ninjatrader-programming/2641-sample-advanced-automated-strategy-v1-0-a-9.html

i dont know how it ended but this was a main problem / challenge in the beginning.

max-td
Reply With Quote
 
  #5 (permalink)
Elite Member
Crete, IL/USA
 
Futures Experience: Intermediate
Platform: NinjaTrader, Mt4
Broker/Data: Tradestation/Tradestation, NinjaTrader, FXCM and Tallinex
Favorite Futures: ES, CL, EUR/USD, TF
 
spinnybobo's Avatar
 
Posts: 171 since Aug 2009
Thanks: 99 given, 48 received

Hi Mike

yes, you are the one who told me the difference of ATM strategies and backtesting ones. so you are not doing custom programming anymore? I know I took forever to start that project back in Feb and just ended up getting busy with school---sorry I was not able to hire you back then. you did some good programming for me before. Too bad I cannot hire you now to do this code for me.

I am basically just starting out with C#. I have taken some programming classes, so I understand the basics and object oriented concepts with C++ and some java, but just on a basic level.

yeah, basically I only have about the first 2 hours of the day to trade. I am using the EOT pro room and using their Ncep method. so learning a lot in a condensed period of time. then, doing a journal to track prograss later in day while at school.

It is intersting, and does require some tweaking. so, I did at least figure out how to put in the limit orders with my strategy that uses their system, I want to forward test using the ATM and cancel the limit order if it goes to far away from the set limit price.

from the sound of this, it sounds like this is pretty complex. I would not worry about it if I was able to sit in front of my computer all day like I used to.

plus, I can also test lots of other markets eventually through using several virutal machines all forward testing different settings and markets, etc..

Once I get better with coding, or maybe I can pay somebody, I can also get a strategy management code rather than the ATM so I can backtest over a period of several years using either IQ or esignal continuous.

so, that is where my thoughts are. if you are not custom programming anymore, can you recommend somebody?
thanks
Spencer

Reply With Quote
 
  #6 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,357 given, 83,237 received

Sorry, I don't do this work anymore. And I don't have anyone to recommend any longer as well. Hopefully someone will step forward on the forum and you can work with them.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #7 (permalink)
Elite Member
Michigan, Jackson
 
Futures Experience: Intermediate
Platform: NT and TS
Broker/Data: NT Continuum
Favorite Futures: ES, CL
 
Posts: 858 since Jul 2009
Thanks: 389 given, 547 received

NT scripting

Contact "Roonius" on this forum and at his site, TradingStudies.com.


Big Mike View Post
Sorry, I don't do this work anymore. And I don't have anyone to recommend any longer as well. Hopefully someone will step forward on the forum and you can work with them.

Mike


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

Reply



futures io > > > > > ATM and Limit Orders

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
EasyLanguage, Mulitcharts and Limit Orders nismo EasyLanguage Programming 28 April 4th, 2013 06:47 AM
Limit Orders COTtrader Traders Hideout 17 August 22nd, 2010 03:24 PM
Time Breakout with limit orders rajafx1 NinjaTrader Programming 1 December 23rd, 2009 03:52 PM
Limit Orders - Proving a fill zeller4 NinjaTrader Programming 1 August 28th, 2009 04:14 AM
A little trouble with limit orders... BigDog NinjaTrader Programming 8 June 21st, 2009 08:07 PM


All times are GMT -4. The time now is 11:01 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-18 in 0.12 seconds with 20 queries on phoenix via your IP 54.226.113.250