NT-script limit and stop entries - NinjaTrader | futures io social day trading
futures io futures trading


NT-script limit and stop entries
Updated: Views / Replies:1,308 / 4
Created: by tony2604 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 dont 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
 

NT-script limit and stop entries

  #1 (permalink)
Elite Member
Europe
 
Futures Experience: Intermediate
Platform: NinjaTrader, CQG Trader
Broker/Data: Mirus
Favorite Futures: currency futures, forex
 
Posts: 72 since Apr 2010
Thanks: 36 given, 20 received

NT-script limit and stop entries

Hello,

I want to ask about ideas how to do limit and stop entries in NinjaTrader when you work with NT Script Strategies. When one wants to run the script-strategy but to do the entry with a limit or stop price there must be a better solution than to edit the NT-script to write in the code the limit or stop price (that will often be a problem to do also during daytrading).

Thanks and best regards
Tony

Reply With Quote
 
  #2 (permalink)
Elite Member
Zurich Switzerland
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: IB
Favorite Futures: ES, 6E, CL
 
Posts: 404 since Sep 2009
Thanks: 64 given, 511 received


tony2604 View Post
Hello,

I want to ask about ideas how to do limit and stop entries in NinjaTrader when you work with NT Script Strategies. When one wants to run the script-strategy but to do the entry with a limit or stop price there must be a better solution than to edit the NT-script to write in the code the limit or stop price (that will often be a problem to do also during daytrading).

Thanks and best regards
Tony

I don't know whether I see the point or not...

To switch from limit to stop, you could use a button.

This example is not a strategy, but it is the same. Have a look at the code. You chose the order type by button, then...:
https://futures.io/elite-circle/13607-btpa-thinkplanaction-4.html#post209788

 
Code
                                        if (btnType.Text == "STOP")
					{
						if (target1>entrylong && entrylong*TickSize>=GetCurrentAsk()) //long
						{
							Order o = a.CreateOrder(Instrument,OrderAction.Buy,OrderType.Stop,TimeInForce.Day,totSize,0,entrylong*TickSize,"","Buy"); o.Submit();
							entryshort=0;
						}
						else if (target1<entryshort && entryshort*TickSize<=GetCurrentBid()) //short
						{
							Order o = a.CreateOrder(Instrument,OrderAction.Sell,OrderType.Stop,TimeInForce.Day,totSize,0,entryshort*TickSize,"","Sell"); o.Submit();
							entrylong=0;
						}
					}
					else if (btnType.Text == "LIM")
					{
						if (target1>entrylong && entrylong*TickSize<=GetCurrentBid()) //long
						{
							Order o = a.CreateOrder(Instrument,OrderAction.Buy,OrderType.Limit,TimeInForce.Day,totSize,entrylong*TickSize,0,"","Buy"); o.Submit();
							entryshort=0;
						}
						else if (target1<entryshort && entryshort*TickSize>=GetCurrentAsk()) //short
						{
							Order o = a.CreateOrder(Instrument,OrderAction.Sell,OrderType.Limit,TimeInForce.Day,totSize,entryshort*TickSize,0,"","Sell"); o.Submit();
							entrylong=0;
						}
					}


Last edited by terratec; June 19th, 2012 at 02:59 PM.
Reply With Quote
The following user says Thank You to terratec for this post:
 
  #3 (permalink)
Elite Member
Europe
 
Futures Experience: Intermediate
Platform: NinjaTrader, CQG Trader
Broker/Data: Mirus
Favorite Futures: currency futures, forex
 
Posts: 72 since Apr 2010
Thanks: 36 given, 20 received


Thank you for your reply.

How do you access the value? Markets are moving up you think for a limit-sell at a certain value at this moment of time. How do you "feed" the strategy with this value, which will be done as limit-order and then working within the NT-script?

Thanks
Tony



terratec View Post
I don't know whether I see the point or not...

To switch from limit to stop, you could use a button.

This example is not a strategy, but it is the same. Have a look at the code. You chose the order type by button, then...:
https://futures.io/elite-circle/13607-btpa-thinkplanaction-4.html#post209788

 
Code
                                        if (btnType.Text == "STOP")
					{
						if (target1>entrylong && entrylong*TickSize>=GetCurrentAsk()) //long
						{
							Order o = a.CreateOrder(Instrument,OrderAction.Buy,OrderType.Stop,TimeInForce.Day,totSize,0,entrylong*TickSize,"","Buy"); o.Submit();
							entryshort=0;
						}
						else if (target1<entryshort && entryshort*TickSize<=GetCurrentBid()) //short
						{
							Order o = a.CreateOrder(Instrument,OrderAction.Sell,OrderType.Stop,TimeInForce.Day,totSize,0,entryshort*TickSize,"","Sell"); o.Submit();
							entrylong=0;
						}
					}
					else if (btnType.Text == "LIM")
					{
						if (target1>entrylong && entrylong*TickSize<=GetCurrentBid()) //long
						{
							Order o = a.CreateOrder(Instrument,OrderAction.Buy,OrderType.Limit,TimeInForce.Day,totSize,entrylong*TickSize,0,"","Buy"); o.Submit();
							entryshort=0;
						}
						else if (target1<entryshort && entryshort*TickSize>=GetCurrentAsk()) //short
						{
							Order o = a.CreateOrder(Instrument,OrderAction.Sell,OrderType.Limit,TimeInForce.Day,totSize,entryshort*TickSize,0,"","Sell"); o.Submit();
							entrylong=0;
						}
					}


Reply With Quote
 
  #4 (permalink)
Elite Member
Zurich Switzerland
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: IB
Favorite Futures: ES, 6E, CL
 
Posts: 404 since Sep 2009
Thanks: 64 given, 511 received


tony2604 View Post
How do you access the value? Markets are moving up you think for a limit-sell at a certain value at this moment of time. How do you "feed" the strategy with this value, which will be done as limit-order and then working within the NT-script?

I don't know which value you are talking about. Entry price? If so:
Have a look a the whole thread (the link I posted). Most of the time I use lines (with the mouse) to place entry stop and targets, and then when I am confident, press a trade button. This is working nice with Indicators, but not with strategies as this fast drawing lines do not work there.

But you can also use something like one tick above/below actual or last bar, as I did in the last example (bTPAM), which is the only one that is an indicator that gives the commands to a strategy. There is a description in the tread. There are many ways to Rome. And for the first indy you can find a video on how this stuff works.

In most of the indicators I used stuff that is not officially supported. Only use such things if you know what you are about to do...
But you can see the principles and then code it your way. Take it as an inspiration to do better things.

Reply With Quote
The following user says Thank You to terratec for this post:
 
  #5 (permalink)
Elite Member
Europe
 
Futures Experience: Intermediate
Platform: NinjaTrader, CQG Trader
Broker/Data: Mirus
Favorite Futures: currency futures, forex
 
Posts: 72 since Apr 2010
Thanks: 36 given, 20 received

Hello,

thank you again for your reply. I think I understand the idea now how you do manage this. But Im not a programmer, I can not realize as you do. Have to think how I could get this working for me.

Thanks again.
Tony


terratec View Post
I don't know which value you are talking about. Entry price? If so:
Have a look a the whole thread (the link I posted). Most of the time I use lines (with the mouse) to place entry stop and targets, and then when I am confident, press a trade button. This is working nice with Indicators, but not with strategies as this fast drawing lines do not work there.

But you can also use something like one tick above/below actual or last bar, as I did in the last example (bTPAM), which is the only one that is an indicator that gives the commands to a strategy. There is a description in the tread. There are many ways to Rome. And for the first indy you can find a video on how this stuff works.

In most of the indicators I used stuff that is not officially supported. Only use such things if you know what you are about to do...
But you can see the principles and then code it your way. Take it as an inspiration to do better things.


Reply With Quote

Reply



futures io > > > > NT-script limit and stop entries

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
Get better entries with Stop/Target or Minimum RR Zone check gomi The Elite Circle 16 June 2nd, 2011 12:41 AM
Using different stop management with different entries arjfca EasyLanguage Programming 2 February 7th, 2011 05:09 PM
Catching breakouts using OCO stop limit bracket orders for entries dennho Traders Hideout 4 October 1st, 2010 09:51 AM
Sell Stop limit order PowerM NinjaTrader 10 September 17th, 2010 02:41 PM
Stop Limit Order Big Mike Terms (Glossary) 0 July 2nd, 2010 12:37 PM


All times are GMT -4. The time now is 01:16 PM.

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-16 in 0.11 seconds with 19 queries on phoenix via your IP 54.91.38.173