Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

  • Welcome Guests

    Welcome. You are currently viewing the forum as a guest which does not give you access to all the great features at Traders Laboratory such as interacting with members, access to all forums, downloading attachments, and eligibility to win free giveaways. Registration is fast, simple and absolutely free. Create a FREE Traders Laboratory account here.

parliament718

Newbie Desperate for Advice

Recommended Posts

Hi, Im interested in getting into automated trading system development. I've been trading a demo account for a little under a year and I’ve begun to study C# a few months ago. I still consider myself a beginner programmer but I’d like to start applying what I learn directly to my cause. The problem is I don’t know where to start.

 

I understand I will be using .NET but I’m not sure how exactly and I have many questions. I’m currently on the chapter on LINQ so I look forward to learning how to work with data better soon but where do I get the data to begin with? And how do I start my own live, updating data collection (in Excel or something). I’ve heard of socket programming and FIX protocol, will I need to learn how to “socket program”? If so, how do I got about that (is that its own language)?

 

I’ve looked into (open source) TradeLink and (expensive) RightEdge. In terms of actually coding the strategy, I noticed RightEdge has a code library that I could make use off. I’m not in the position to purchase their expensive software ATM but can I still use that library to author C# code in TradeLink?

 

What about QuantLib? Can I use that library too ( or instead of ) the RE library . Are there any other code libraries?

 

Also, is there a popular charting/backtesting software that I could use to backtest the data (once I figure out how to get it) using my algorithm (once I figure out how to build it lol) ? ( kind of like you can do with MQL in MetaTrader where it draws out historical data visually tick my tick and showing were trades would have been made).

 

I’m currently reading “Pro C# and the .NET Platform”, about to begin the part of the book on .NET soon and was hoping someone can visit the link and go to “Look Inside” the book’s table of contents and let me know if there are any chapters/topics I will be using extensively, others rarely, or other perhaps not at all so I can safely skip them temporarily until I start doing more advanced things. I mean the book is 1500 pages for cryin out loud and I'm really trying to get up to pace and understand how all these things go together to build a trading system using C#.

 

http://www.amazon.com/2010-NET-Platform-Andrew-Troelsen/dp/1430225491/ref=sr_1_1?ie=UTF8&qid=1309922819&sr=8-1

 

Thank you so much in advances, I would really appreciate the advice.

Share this post


Link to post
Share on other sites
Hi, Im interested in getting into automated trading system development. I've been trading a demo account for a little under a year and I’ve begun to study C# a few months ago. I still consider myself a beginner programmer but I’d like to start applying what I learn directly to my cause. The problem is I don’t know where to start.

 

I understand I will be using .NET but I’m not sure how exactly and I have many questions. I’m currently on the chapter on LINQ so I look forward to learning how to work with data better soon but where do I get the data to begin with? And how do I start my own live, updating data collection (in Excel or something). I’ve heard of socket programming and FIX protocol, will I need to learn how to “socket program”? If so, how do I got about that (is that its own language)?

 

I’ve looked into (open source) TradeLink and (expensive) RightEdge. In terms of actually coding the strategy, I noticed RightEdge has a code library that I could make use off. I’m not in the position to purchase their expensive software ATM but can I still use that library to author C# code in TradeLink?

 

What about QuantLib? Can I use that library too ( or instead of ) the RE library . Are there any other code libraries?

 

Also, is there a popular charting/backtesting software that I could use to backtest the data (once I figure out how to get it) using my algorithm (once I figure out how to build it lol) ? ( kind of like you can do with MQL in MetaTrader where it draws out historical data visually tick my tick and showing were trades would have been made).

 

I’m currently reading “Pro C# and the .NET Platform”, about to begin the part of the book on .NET soon and was hoping someone can visit the link and go to “Look Inside” the book’s table of contents and let me know if there are any chapters/topics I will be using extensively, others rarely, or other perhaps not at all so I can safely skip them temporarily until I start doing more advanced things. I mean the book is 1500 pages for cryin out loud and I'm really trying to get up to pace and understand how all these things go together to build a trading system using C#.

 

Amazon.com: Pro C# 2010 and the .NET 4 Platform (9781430225492): Andrew Troelsen: Books

 

Thank you so much in advances, I would really appreciate the advice.

 

you sound familiar... have you asked this question before?

 

take a look at Ninjatrader. (free download)

 

all the things you mentioned is already done...

no use re-inventing the wheel.

you should focus on the trading logic, not housekeeping.

Share this post


Link to post
Share on other sites

I agree with Tams. And came to the same conclusion after researching available options.

 

For ANY newbs:

 

Get your feet wet with NinjaTrader, look at the examples they provide (and GomiPackage v1.3b available at NinjaTrader forum). Don't worry about using .NET or other libraries, focus on using NinjaScript which is based on C#. NinjaTrader is easy to use for the average newbie compared to other common trading tools, which means you won't get frustrated early on trying to do something simple.

 

NinjaTrader v7 Help Guide

 

I'm going to use the Simulated Data Feed and recording E-mini S&P via Zen-Fire (free trial) data feed for replaying.

 

Good luck!

Share this post


Link to post
Share on other sites

No, tams this is the first time im posting here.

 

Thanks for the advice guys but so many of my questions were left unanswered. Regarding continous real time data collection (not simulated), the role of socket programming & FIX, and if those external libraries have their own individual limitations. I'm not looking for an easy, temporary solution which will pose limitations for me when i enter a quantitative finance program in school where I will eventually be programming more complex mathematical models. I will check out ninjascript sincee its based on c# thank you for that advice but can somebody please elaborate on any more of my questions?

Share this post


Link to post
Share on other sites
No, tams this is the first time im posting here.

 

Thanks for the advice guys but so many of my questions were left unanswered. Regarding continous real time data collection (not simulated), the role of socket programming & FIX, and if those external libraries have their own individual limitations. I'm not looking for an easy, temporary solution which will pose limitations for me when i enter a quantitative finance program in school where I will eventually be programming more complex mathematical models. I will check out ninjascript sincee its based on c# thank you for that advice but can somebody please elaborate on any more of my questions?

 

if you have to ask these questions,

you shouldn't be attempting it.

you are not in the league.

Share this post


Link to post
Share on other sites

@parliament718

Obviously you are making serious efforts to dig deeper.

Unfortunately most people shy away from bigger efforts.

 

Certainly there are many ways to make money in the markets but it seems quite straightforward that in order to find more subtle edges you need specialized instruments.

C# is a good tool for that.

 

Regarding continous real time data collection (not simulated), the role of socket programming & FIX, and if those external libraries have their own individual limitations. I'm not looking for an easy, temporary solution which will pose limitations for me when i enter a quantitative finance program in school where I will eventually be programming more complex mathematical models. I will check out ninjascript sincee its based on c# thank you for that advice but can somebody please elaborate on any more of my questions?

 

- real time data collection

Write all the real time data you can get into files (plain binary format).

One file for one day.

At some point in time you will need it.

 

- socket programming & FIX

To interface to retail brokers you will have to write programs that connect to their proprietary APIs.

You wont have to bother about socket programming.

FIX isn't needed for retail (only institutional).

 

- limitations of libraries

Not sure what you mean. Please specify if further information needed.

 

 

I'm not looking for an easy, temporary solution which will pose limitations

 

That's a very good idea.

 

Following the advice given before in this thread (limiting oneself to NinjaTrader / NinjaScript) is not compatible with this idea.

 

Writing programs for a trading platform like Ninja means to exclude a whole universe of possibilities and introduce many limitations.

 

Therefore:

Writing programs for broker APIs (as you apparently planned in the first place) is the way to go.

Share this post


Link to post
Share on other sites

I myself am a ninjatrader developer as well. APA Zones is my product. Ninjatrader is what you are really looking for based on your post.

Data:

I would go with a free AMP futures trading account for 30 days. To get your data. Plus, you can grab 10 years of back data from kinetic.

 

Backtesting and Database:

Under tools options you can have control of all your data for backtest as well as something ninjatrader calls: Market Replay. This is usually in simming/ backtesting your system.

Ninjatrader has to connect to each of these features through server like connects by going to File > connect > "real datafeed", "back data" Kinetic, or market replay.

 

Programming in ninjatrader:

basically, ninjatrader gives you a namespace: indicator to program your system in their software. To create a strategy you have the namespace of : strategy to use. *note: you indicator/strat. and all other indicators that you have must compile in the their given code editor for your indicator to work on your charts. It's annoying sometimes. You can also take your code out of ninjatrader to visual studio if you want to debug or program in there. Ninjatrader however add it's own self generating code to the bottom of all your code. If you plan to distribute your system through ninjatrader, contact support directly and they have a person that will help you lock down your code and provide you with a vendor license.

 

Once you are in programming in their editor. you can do a " this." to see all the functions and methods that you can use. "F1" is also very good on showing you examples of their methods. You can link up external dlls to your indicator as well. So that gives you the power to use C# or C++ libraries. Note: Chartcontrol commands can really execute orders. Ninjatrader forums are also another great resource.

 

Once you get your code in ninjatrader, you will find that porting it to other platforms to be pretty easy in concept and most work will be done for you; that's where I am right now.

 

Please look me up if you need help.

Share this post


Link to post
Share on other sites

As already pointed out.... If you are a beginner programmer then there is absolutely no reason (or logic) to "reinvent the wheel" and build an entire trading AND backtesting platform when they already exist. Only institutions or proprietary trading companies do this. And even then most quantitative traders have traditionally used Matlab in addition to a broker connector (Interactive Brokers) and/or data feed connector (IQFeed) at a minimum for prototyping/backtesting but often for live trading.

 

The answer to most of your questions is: Yes you could use ______, but you're a beginner programmer so there is a very high learning curve and you would be better off using tools which already implement ______ for you. You want to implement socket code without even knowing what is involved! Imagine the disaster that could occur from a bug when live trading!

 

What you want are tools that give you the details you need in order to analyze those details against a mathematical model (which is quantitative trading vs standard automated/algorithmic trading). So using NinjaTrader or NeoTicker, you would access other mathematical libraries or tools (such as quantlib or R) from within your strategy code. How you access these will depend, but most likely you'll be making DLL calls if you're using C#. Beware of slippage!!

 

Keep this in mind.... Over and over again, I've read how most quantitative traders agree that the simple strategies are the most successful.

 

My advice is to start with Ninja Trader and evolve to other tools and/or integrate tools/code as your strategies require. As mentioned, its relatively easy to port your strategies and you can almost always call external code. What can be the most important issue is whether your tool of choice can give you access to the details your strategies need: true sub-second tick data from IQFeed. From what I can tell, NeoTicker does and NinjaTrader should, but I need to confirm this for myself.

 

BTW, I have investigated all opensource solutions and they are either buggy or have poor release cycles (TradeLink) or their development has stagnated or lagged (IBrokers for R and Marketcetera).

Edited by Mr_You

Share this post


Link to post
Share on other sites
What can be the most important issue is whether your tool of choice can give you access to the details your strategies need: true sub-second tick data from IQFeed. From what I can tell, NeoTicker does and NinjaTrader should, but I need to confirm this for myself.

Yes, NinjaTrader gives sub-second level tick data it's part of my system that I have built.

Share this post


Link to post
Share on other sites

Thank you very much to all of you, that pretty much cleared up everything I was confused about. Just to be clear, I've opted to do the following. Let me know if I understood everything correctly.

 

 

So basically I can get historical data from NinjaTraders's Kinetick server. Then once I start running the strategy live I can start buying real time sub-second data from IQFeed. I can code my strategies directly in Visual Studio (I would prefer to) using NT's namespace and additionally referencing the external assemblies of any one of the libraries I mentioned. Then I just compile the code inside the NinjaTrader editor and run the strategy directly from the chart window. When my programming skills improve I could move on to learn ASP.NET to program for specific broker API's and perhaps learn to work with FIX at that point.

 

Thanks again!

Share this post


Link to post
Share on other sites

Here is a table detailing the specs about data feed providers. For tick-by-tick historical data, IQFeed is the best for the money. Most historical data is not tick-by-tick but End of Day (EOD) which is not sufficient for intraday backtesting. You'll also want to record tick data for stocks you monitor (another feature provided by the tools mentioned).

 

You're basically correct about the rest except you probably will not need to compile outside of Visual Studio if I understand correctly.

 

You will probably not use ASP.NET (or anything .NET unless you need a GUI), but you would use C# to access Interactive Brokers C# API (because IB is the best/most cost effective) while accessing IQFeeds data via another C# library. You will probably never use FIX. Correction: IB only offers API access via C++, Visual Basic, or Java. You would need to perform DLL calls to access the API via C# or use a third-party library/wrapper.

 

But again, you will essentially be reimplementing a lot of the standard features of most commonly used trading platforms. Wasting a lot of time IMO. Its easier/more efficient to just tie tools together. Even over a network to another machine if necessary.

Edited by Mr_You

Share this post


Link to post
Share on other sites

Thank you, your posts were immensely helpful. I understand everything I need to do and I will also be taking your advice and working in ninjatrader until further notice. Those were the original suggestions, I know, but I just needed to get the longer-term perspective on what I have to do.

 

thanks doubletop, best of luck with your system as well. I'll try my best to keep my sanity :missy: :rofl:

Share this post


Link to post
Share on other sites

I guess nobody here uses TradeStation - I do.

 

With TS I can backtest and program anything.

With TS I get the data and indicators included.

With TS I can set my strategies to auto execute for hands free trading.

 

You don't have to reinvent the wheel. If you want to make money you need to concentrate on developing some workable, basic, simple systems that make money in real time and out of sample testing.

 

Stop trying to reinvent the wheel - it's already been invented. If you want to drive across the country you don't have to make a car in your garage first - just buy a car and concentrate on the route.

 

I used to program my own systems but TS and Ninja already have a programming language and can route your orders. You are completely wasting your brains and your time trying to do something that's already been done - stop the madness....

Share this post


Link to post
Share on other sites

Yeah, I'm working in TS right now too. Making my NinjaTrader system into a Tradestation system. I'm on with both platforms as a developer. It's not easy though, at least with the functionality that I have in Ninjatrader is extremely complex in duplicate in tradestation. But still grinding away. Thank God that we can use external DLLs in TS.

Share this post


Link to post
Share on other sites
I guess nobody here uses TradeStation - I do.

 

With TS I can backtest and program anything.

With TS I get the data and indicators included.

With TS I can set my strategies to auto execute for hands free trading.

 

You don't have to reinvent the wheel. If you want to make money you need to concentrate on developing some workable, basic, simple systems that make money in real time and out of sample testing.

 

Stop trying to reinvent the wheel - it's already been invented. If you want to drive across the country you don't have to make a car in your garage first - just buy a car and concentrate on the route.

 

I used to program my own systems but TS and Ninja already have a programming language and can route your orders. You are completely wasting your brains and your time trying to do something that's already been done - stop the madness....

 

the OP wants to use C#, thus Ninja was suggested.

TS can do a lot too, but EasyLanguage is not as powerful and flexible as C#.

Share this post


Link to post
Share on other sites
the OP wants to use C#, thus Ninja was suggested.

TS can do a lot too, but EasyLanguage is not as powerful and flexible as C#.

 

I have noticed on the TradeStation forums that there are a great many serious programmers who are coming up with complicated code and complicated systems. I used to write complicated systems, but I have come to the conclusion that simple, logical systems work much better over the long haul.

 

Basic system development is about the following:

The data is smoothed to eliminate the "noise"

A trend is discovered

An entry signal is generated

The trend ends or reverses

An exit signal is generated

 

That's really the heart of it...you trade your best system, you try to diversity, you keep attempting to improve the system as you notice things on a daily basis. You test on out of sample data.

 

I can do all of this easily with a minimum amount of code in TS.

 

There are some brilliant people with backgrounds in math and programming who love to develop systems with dozens of lines of code attempting to cover every contingency. Good luck to them.

 

My systems are simple, logical, and I make money - what else is there?

 

Yes, yes, I know - everyone wants to make 100% per month and catch every wave and wiggle in the market and get rich RIGHT NOW.

 

If you can make 3-7% per month compound, you will eventually have all the money you need.

Share this post


Link to post
Share on other sites
I have noticed on the TradeStation forums that there are a great many serious programmers who are coming up with complicated code and complicated systems. I used to write complicated systems, but I have come to the conclusion that simple, logical systems work much better over the long haul.

 

Basic system development is about the following:

The data is smoothed to eliminate the "noise"

A trend is discovered

An entry signal is generated

The trend ends or reverses

An exit signal is generated

 

That's really the heart of it...you trade your best system, you try to diversity, you keep attempting to improve the system as you notice things on a daily basis. You test on out of sample data.

 

I can do all of this easily with a minimum amount of code in TS.

 

There are some brilliant people with backgrounds in math and programming who love to develop systems with dozens of lines of code attempting to cover every contingency. Good luck to them.

 

My systems are simple, logical, and I make money - what else is there?

 

Yes, yes, I know - everyone wants to make 100% per month and catch every wave and wiggle in the market and get rich RIGHT NOW.

 

If you can make 3-7% per month compound, you will eventually have all the money you need.

 

I think you have confused "complicated system" with the ability of a programming language.

but I am glad you can do what you can do.

Share this post


Link to post
Share on other sites

The problem with TradeStation is you are stuck with one broker versus other platforms that allow you to switch between brokers without changing your trading platform and code.

 

I think it would be an interesting task to port TradeStation EasyLanguage strategies to NinjaTrader or NeoTicker.

 

doubletop11, have you looked at the TradeStation Connection Guide for NinjaTrader?

 

EDIT: OOPS! I just realized you can't execute trades directly, BUT I wonder if you could archieve execution by tying them together using DLLs OR even consider using AutoHotKey or a similar tool which sends key/mouse strokes/clicks to a Windows app.

Edited by Mr_You

Share this post


Link to post
Share on other sites

doubletop11, have you looked at the TradeStation-Connection-Guide]TradeStation Connection Guide for NinjaTrader?

yeah, I have it posted on my website for my users. The reason that I'm porting to tradestation first is I should have about 15-20k traders on that platform that use my system everyday, but manually. So that's why I need to port so bad. $100 subscription/month * 15,000 = $$$

Share this post


Link to post
Share on other sites
yeah, I have it posted on my website for my users. The reason that I'm porting to tradestation first is I should have about 15-20k traders on that platform that use my system everyday, but manually. So that's why I need to port so bad. $100 subscription/month * 15,000 = $$$

 

So for every subscriber that you have, you need to pay a platform fee to TradeStation for each one in order to broadcast the data? I'm just curious.

Share this post


Link to post
Share on other sites
So for every subscriber that you have, you need to pay a platform fee to TradeStation for each one in order to broadcast the data? I'm just curious.

 

Actually this is one of the features that Tradestation does an amazing job at for it's developers, of course I'm still in mid-development. From the contract I signed with them they actually take care of all the administration for the subscription that you get to your software/automated system. They send me 100% of the subscription fees that they collect from the subscribers. I do however have to pay a nominal fee to Tradestation for the platform and to use their developer strategy network system. There is some datafeeds provided. The only free datafeed is a forex. Everything else is delayed data.

 

There seem to be somethings I like about Tradestation, yet many other things that I just ask myself "why". Tradestation has one of the most complex platforms I've seen. Yet they are able to charge the a good amount per month for their system. But it all varies on what you want.

Share this post


Link to post
Share on other sites
Actually this is one of the features that Tradestation does an amazing job at for it's developers, of course I'm still in mid-development. From the contract I signed with them they actually take care of all the administration for the subscription that you get to your software/automated system. They send me 100% of the subscription fees that they collect from the subscribers. I do however have to pay a nominal fee to Tradestation for the platform and to use their developer strategy network system. There is some datafeeds provided. The only free datafeed is a forex. Everything else is delayed data.

 

There seem to be somethings I like about Tradestation, yet many other things that I just ask myself "why". Tradestation has one of the most complex platforms I've seen. Yet they are able to charge the a good amount per month for their system. But it all varies on what you want.

 

Interesting. Thanks for that info. So a subscriber gets access to your indicator somehow by requesting it from TradeStation? How does that work?

Share this post


Link to post
Share on other sites
Interesting. Thanks for that info. So a subscriber gets access to your indicator somehow by requesting it from TradeStation? How does that work?

 

Dealing with Tradestation you product has to go through a lot of compliance testing before you can post on there. As well as when you become a developer with them. Apparently, not many get their application through on the first time.

Once the several compliance tests, are done on your system and it passes, bug free, virus free, and solid like a wet noddle! :rofl:

You post your encrypted code that has calls to your account inside of the tradestation server for when someone authenticates with Tradestation. The TradeStation Strategy Network: https://strategynetwork.tradestation.com/StrategyNetworkStore/Default.aspx

simply host your system up there for people to try then buy.

Edited by doubletop11

Share this post


Link to post
Share on other sites
I think you have confused "complicated system" with the ability of a programming language.

but I am glad you can do what you can do.

 

I am completely aware of programming languages - I know several and have been writing code since the mid-70's. What I AM saying is that it is possible to make all the money you'll ever need with simple code - TradeStation EasyLanguage works just fine in this regard.

 

EasyLanguage is not complicated - it reminds of me of BASIC with Pascal like structures. I only use a tiny subset of it and my systems work just fine - I have never had an idea that I couldn't easily code in EasyLanguage.

 

I have seen some EasyLanguage code that it absolutely amazing - systems that have dozens of lines of beautiful code - however, these systems don't make any more money than my clear, simple, basic systems.

 

TradeStation comes pre-packaged with many systems, and there are virtually unlimited numbers of systems being sold and rented all the time - and again, I have not seen any that can make more than 3-7% per month, compound, over any length of time in out of sample testing. 3% per month compound is 42.6% per year, and 7% comes to 125.2% per year. All you have to achieve to make 100% per year is 5.9% per month compound.

 

What I am trying to say is to "keep it simple" so you can understand and trust your system. You don't need to have a PhD in programming to come up with a profitable and workable system.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.