EnterLongLimit(EMA, "myLong") - NinjaTrader Programming | futures io social day trading
futures io futures trading


EnterLongLimit(EMA, "myLong")
Updated: Views / Replies:2,545 / 14
Created: by MXASJ 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
 

EnterLongLimit(EMA, "myLong")

  #1 (permalink)
Elite Member
Asia
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
 
Posts: 798 since Jun 2009
Thanks: 109 given, 786 received

EnterLongLimit(EMA, "myLong")

Hi all,

I'm scratching my head with some trade logic do I'm hoping someone can help. I have a bit of code working just fine where if Price Crossabove EMA, a buy limit order is placed at the "price" of the EMA. The idea is I only want to buy if it retraces back to the EMA.

Here is where I get stuck in logic land... the price keeps going up, and the EMA keeps going up... so I want my EnterLongLimit to equal the EMA as it is rising. Once price drops back to the EMA I should get filled.

Current psuedo code in OnBarUpdate is;

if (goLong) EnterLongLimit(EMA, "myLong");

Which works, but the EnterLongLimit doesn't "chase" and update on change of value of the EMA.

Ideas? Thoughts? Sugesstions?

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
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


hi mx,

i do such things with AMTs but with the same concept.

once the order is fired / created i have to adjust it with "AtmStrategyChangeEntryOrder(emawert, 0, entryorderid); "

to follow the EMA-value bar by bar .

thats my solution - still on NT 6,5

max-td
Reply With Quote
 
  #4 (permalink)
Elite Member
Asia
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
 
Posts: 798 since Jun 2009
Thanks: 109 given, 786 received

Danke Max,

If I'm not using ATMs I think I may have to use IOrders as it will be a "cancel current BuyLimit/if cancelled enter new BuyLimit" meaning I'm adding some OnOrderUpdate stuff as well. Was hoping for something simple .

Reply With Quote
 
  #5 (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

OK, but there is nothing available like "changing/adjusting the entryorder" for entry-orders ??

i know that changing is much easier + faster then cancelation + sending new orders out with new values - in fact of communication to the exchange.

+ that makes big sense in fast timeframes - like range + tick-stuff.

max-td
Reply With Quote
 
  #6 (permalink)
Elite Member
Calcutta, India
 
Futures Experience: Intermediate
Platform: ArthaChitra
 
Posts: 278 since Jun 2009
Thanks: 161 given, 259 received

if you use the Unmanaged order (in NT7) then you call the ChangeOrder routine and follow the ema as it changes with bar update.

Reply With Quote
 
  #7 (permalink)
Elite Member
Asia
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
 
Posts: 798 since Jun 2009
Thanks: 109 given, 786 received


max-td View Post
OK, but there is nothing available like "changing/adjusting the entryorder" for entry-orders ??

i know that changing is much easier + faster then cancelation + sending new orders out with new values - in fact of communication to the exchange.

+ that makes big sense in fast timeframes - like range + tick-stuff.

I'd love to hear that there is! That's how TrailStops work but on the Entry side I think one needs to code it. Open to ideas...

Reply With Quote
 
  #8 (permalink)
Elite Member
Asia
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
 
Posts: 798 since Jun 2009
Thanks: 109 given, 786 received


bukkan View Post
if you use the Unmanaged order (in NT7) then you call the ChangeOrder routine and follow the ema as it changes with bar update.

Thanks! But according to the manual:

"The Unmanaged approach is reserved for VERY EXPERIENCED programmers." Ninja's highlights

So I'll have to be careful

Reading more about it now.

Reply With Quote
 
  #9 (permalink)
Elite Member
Calcutta, India
 
Futures Experience: Intermediate
Platform: ArthaChitra
 
Posts: 278 since Jun 2009
Thanks: 161 given, 259 received


MXASJ View Post
Thanks! But according to the manual:

"The Unmanaged approach is reserved for VERY EXPERIENCED programmers." Ninja's highlights

So I'll have to be careful

Reading more about it now.

well you are very experienced

Reply With Quote
 
  #10 (permalink)
Elite Member
Asia
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
 
Posts: 798 since Jun 2009
Thanks: 109 given, 786 received



bukkan View Post
well you are very experienced

I can now lose money in milliseconds! Before I had to wait a whole day!

In the Unmanaged Orders documentation I found this line:

"Unlike the Managed approach where you could modify a working order by calling the entry order method again with your new parameters..."

So I might try that first if I can ensure I'm keeping my position in queue and not doing a cancel/replace if there has been no price change.

All good fun...

Reply With Quote

Reply



futures io > > > > > EnterLongLimit(EMA, "myLong")

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
"Floored," the documentary on Trading Pit opens in Chicago this week goldilocks Off-Topic 39 September 11th, 2013 12:55 PM
RodS ZN trades using Sharkys "power of 7" DMA paint RodS Trading Journals 23 May 29th, 2011 02:36 PM
dealing with GetCurrentBidVolume and GetCurrentAskVolume , "long" casting into "int" jmejedi NinjaTrader Programming 4 May 23rd, 2011 10:33 AM
RJay's "Trader Volume" and "Trader Tick" Indicator Suites RJay The Elite Circle 20 December 20th, 2010 06:01 PM
"time"stop" codes for MC ptcm EasyLanguage Programming 1 September 2nd, 2010 01:57 AM


All times are GMT -4. The time now is 06:21 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-15 in 0.12 seconds with 19 queries on phoenix via your IP 107.20.115.174