Buy/Sell in an indicator - NinjaTrader Programming | futures io social day trading
futures io futures trading


Buy/Sell in an indicator
Updated: Views / Replies:5,122 / 11
Created: by Mindset 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
 

Buy/Sell in an indicator

  #1 (permalink)
Elite Member
UK
 
Futures Experience: Intermediate
Platform: NT
Broker/Data: ib
Favorite Futures: Electric Guitar
 
Mindset's Avatar
 
Posts: 355 since Sep 2009
Thanks: 88 given, 285 received

Buy/Sell in an indicator

I always thought this was not possible.
But it is.
Can anybody explain HOW it's done - even just the basic concept would start me off!

Reply With Quote
 
  #2 (permalink)
Market Wizard
New Orleans, La (Mardi Gras City)
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Ninjatrader / Optimus Futures / AmpFutures
Favorite Futures: ES / 6E / 6B / CL
 
DavidHP's Avatar
 
Posts: 1,002 since Aug 2009
Thanks: 803 given, 1,367 received

I'm not sure if this is what you are looking for but Rjay has modified this indicator to show bid/ask and level II.

It is in the download section of this site:

https://futures.io/free_downloads/ninjatrader/indicators/140-download.html?view

Reply With Quote
 
  #3 (permalink)
 Vendor: www.innovative-trading-solutions-online.com 
Hartford, CT. USA
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: AMP/CQG, Kinetick
Favorite Futures: TF
 
RJay's Avatar
 
Posts: 677 since Jun 2009
Thanks: 726 given, 740 received



Mindset View Post
I always thought this was not possible.
But it is.
Can anybody explain HOW it's done - even just the basic concept would start me off!

Mindset,

Last trade price equals = Close[0]

Volume of last trade equals = e.Volume


You can do something like this.
------------------------------------------------------------------

int theAsk = e.MarketData.Ask.Price;

int theBid = e.MarketData.Bid.Price;

if (e.Price >= theAsk) VolUp == e.Volume;
else if (e.Price <= theBid) VolDown == e.Volume;

-------------------------------------------------------------------

RJay

Reply With Quote
 
  #4 (permalink)
Elite Member
UK
 
Futures Experience: Intermediate
Platform: NT
Broker/Data: ib
Favorite Futures: Electric Guitar
 
Mindset's Avatar
 
Posts: 355 since Sep 2009
Thanks: 88 given, 285 received

Buy sell

Sorry - when I say Buy/Sell I mean EnterLong /EnterShort commands.

Reply With Quote
 
  #5 (permalink)
Elite Member
Europe
 
Futures Experience: Beginner
Platform: NinjaTrader
 
Posts: 73 since Jun 2009
Thanks: 11 given, 52 received

never tried myself, but my guess is they are creating an OIF
(= order instruction file)
Ninja picks it up and fires away ....

Reply With Quote
The following user says Thank You to toulouse-lautrec for this post:
 
  #6 (permalink)
 Vendor: www.innovative-trading-solutions-online.com 
Hartford, CT. USA
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: AMP/CQG, Kinetick
Favorite Futures: TF
 
RJay's Avatar
 
Posts: 677 since Jun 2009
Thanks: 726 given, 740 received


Mindset View Post
Sorry - when I say Buy/Sell I mean EnterLong /EnterShort commands.


You could try building some setups with strategy builder to see what the code looks like, then adapt it to your indicator?????

Reply With Quote
 
  #7 (permalink)
Elite Member
Wrocław, Poland
 
Futures Experience: Intermediate
Platform: NinjaTrader, Racket
Favorite Futures: Ockham's razor
 
gregid's Avatar
 
Posts: 651 since Aug 2009
Thanks: 321 given, 605 received

hmmm... why would you need that in the first place?
Isn't strategy based on indicator result good enough?

Reply With Quote
 
  #8 (permalink)
Elite Member
UK
 
Futures Experience: Intermediate
Platform: NT
Broker/Data: ib
Favorite Futures: Electric Guitar
 
Mindset's Avatar
 
Posts: 355 since Sep 2009
Thanks: 88 given, 285 received

discretionary trading

I have a basic set of "rules" that I like to trade but there is an element of discretion.
For instance if the potential profit is not enough I might pass on the trade altogether.

Secondly I can assess the trade with 2 or at most 3 mouse clicks - what I would like to do ( a la PositionSizer) is then be able to take those values and just pop in a buy/sell order with a target and a stop all on oco.

I can do it at the moment via a second set of charts ( strategies only) but that seems a bit lame - if NT provided a full and proper reference documentation it might be a whole lot easier!

The point of this thread is that up until I had seen position sizer - I didn't think it was possible AT ALL to get an order off from within an indicator. I have come from Tradestation ( 5 years ) and I must say "discovering" what NT can do and how to do it is very uneasy in comparison. I guess that is why this forum partly exists?

Plus I am wholly new to C# so sometimes it is all a little mysterious to me

toulouse - sorry what is an oif file - I have not heard of that.

Reply With Quote
 
  #9 (permalink)
Elite Member
Europe
 
Futures Experience: Beginner
Platform: NinjaTrader
 
Posts: 73 since Jun 2009
Thanks: 11 given, 52 received

here you go, straight from the horses mouth ..... errr just copied from the help pages ...


File Interface
The file interface uses standard text files as input. These files are called order instruction files (OIF) and have specific format requirements. NinjaTrader processes the OIF the instant the file is written to the hard drive and subsequently deletes the file once the processing operation is complete.




there´s much more detail on the help pages about the syntax.
If you know how to open and write to a file from within an indicator you can create orders.

Scary isnt it? lol

Reply With Quote
 
  #10 (permalink)
Elite Member
UK
 
Futures Experience: Intermediate
Platform: NT
Broker/Data: ib
Favorite Futures: Electric Guitar
 
Mindset's Avatar
 
Posts: 355 since Sep 2009
Thanks: 88 given, 285 received

ok bear with me on this.


Right ... so looking a little deeper into this I see that Tradestation users a dll called ntdirect.dll.
But you can only use this from an external application - not from within NT?

I tried the following for instance and get a using reference error

 
Code
   NinjaTrader.Client.Client NTClient = new NinjaTrader.Client.Client();
            int myPosition = NTClient.MarketPosition(@"FDAX 12-09", @"Sim101");
            txtMarketPosition.Text = myPosition.ToString();
it wants using System.NinjaTrader.Client but that doesn't work.

Reply With Quote

Reply



futures io > > > > > Buy/Sell in an indicator

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
Is it possible to show Buy/Sell strength in NT6.5? steveg NinjaTrader 1 March 15th, 2011 01:40 PM
MAMA with Buy Sell Signals and P&L ebtrader ThinkOrSwim Programming 2 December 11th, 2010 03:19 PM
Buy/sell Pressure indicator doesn't plot in mkt replay? emini_Holy_Grail Traders Hideout 2 September 18th, 2010 01:37 PM
[NinjaTrader]    buy sell chart jamfutures Platforms and Indicators 10 July 14th, 2010 08:36 PM
Buy Sell indicator based on traded volume, not price kronie The Elite Circle 6 November 21st, 2009 10:14 AM


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-15 in 0.12 seconds with 19 queries on phoenix via your IP 107.20.115.174