NexusFi: Find Your Edge


Home Menu

 





The Evolution Of NN with C#


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one wh with 10 posts (9 thanks)
    2. looks_two sefstrat with 7 posts (14 thanks)
    3. looks_3 Big Mike with 3 posts (0 thanks)
    4. looks_4 scJohn with 2 posts (3 thanks)
    1. trending_up 27,011 views
    2. thumb_up 26 thanks given
    3. group 20 followers
    1. forum 31 posts
    2. attach_file 2 attachments




 
Search this Thread

The Evolution Of NN with C#

  #1 (permalink)
 
wh's Avatar
 wh 
Neubrandenburg, Germany
 
Experience: Advanced
Platform: R
Trading: Stocks
Posts: 538 since Jun 2009
Thanks Given: 298
Thanks Received: 512

For three weeks, I have communicated with neural networks and genetic coding.
Have heard about this for years, but ... nothing for me. Now the circle is closed.
As a seasoned Googler, I found this AForge.NET :: Computer Vision, Artificial Intelligence, Robotics Framework, which has beautiful examples of application. What important is for the learning process. See links below.

Last week i order a book by amazon: Introduction to Neural Networks for C#, 2nd Edition (Perfect Paperback)


Why i wrote this:

if(ninjatrader == c# && Afroge == c#)
bool isGood = true;

you can implement classes to your ninjascript or build external programms that you can connect. An other importent reason is: Aforge is open source and this is good. Free world, free sources and free money ...


Some good links for learning and understanding are:
CodeProject: Genetic Algorithm Library. Free source code and programming help
CodeProject: Evolution computations on C#. Free source code and programming help
CodeProject: AI : Neural Network for beginners (Part 1 of 3). Free source code and programming help
CodeProject: Neural Networks on C#. Free source code and programming help

The examples works well, and you can use your data for testing.
Create small indicator how write your close[i] or ma[i] or something else to a csv and then import csv to examples.

Arne

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Exit Strategy
NinjaTrader
ZombieSqueeze
Platforms and Indicators
Trade idea based off three indicators.
Traders Hideout
REcommedations for programming help
Sierra Chart
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Just another trading journal: PA, Wyckoff & Trends
25 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
23 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #2 (permalink)
 Prtester 
SE-Asia
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Amp
Trading: ES
Posts: 151 since Jun 2009
Thanks Given: 66
Thanks Received: 124

Did you use the beta one 2.0?

Reply With Quote
  #3 (permalink)
 
wh's Avatar
 wh 
Neubrandenburg, Germany
 
Experience: Advanced
Platform: R
Trading: Stocks
Posts: 538 since Jun 2009
Thanks Given: 298
Thanks Received: 512



Prtester View Post
Did you use the beta one 2.0?

no i use old source from stable version and work with sharpdevelop not visual studio.

Started this thread Reply With Quote
  #4 (permalink)
GreenTrade
Chicago
 
Posts: 2 since Jun 2009
Thanks Given: 0
Thanks Received: 0

Have you compared this with FANN? I have not used either and have often wanted to work with NN but not sure where to start. I use NinjaTrader and am unsure how to send prices/indicator values to a NN to get a signal back (beginner programmer). Any thoughts on how to start/which program is better to use (assuming both good programs)?

FANN Link - Fast Artificial Neural Network Library

Reply With Quote
  #5 (permalink)
 
wh's Avatar
 wh 
Neubrandenburg, Germany
 
Experience: Advanced
Platform: R
Trading: Stocks
Posts: 538 since Jun 2009
Thanks Given: 298
Thanks Received: 512

No i looked only after C# Frameworks ... the way of integration is easier. i know fann has a great community, but i/you can not look/work at all.

A other intro here is a new way to implement for example matlab in c# and
vice versa.

A good intro is load datas from your indicators via CSV file in a framework like fann, aforge ... then look what happend ...

Best regards ...


Started this thread Reply With Quote
  #6 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,765 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,629

Ok guys, now let's go for an NT NN optimizer !!!
It might be very very interesting to compare an NN optimizer, with a genetic optimizer, like Piersh's one, which is doing an amazing job.

So, ready ???

Follow me on Twitter Reply With Quote
  #7 (permalink)
 
sefstrat's Avatar
 sefstrat 
Austin, TX
 
Experience: Advanced
Platform: NT/Matlab
Broker: Interactive Brokers
Trading: FX majors
Posts: 285 since Jun 2009
Thanks Given: 20
Thanks Received: 768

I use neuronDotNet which is similar to Aforge. I prefer the structure of it but they both have pretty much the same features.

Encog is another good project which has both a java and c# version, unfortunately the c# version is way behind currently but the java version is worth looking at to get ideas even if you don't use java. It has many useful network types and training algorithms which are not found in any of the c# oss projects that I know of.

Neural nets are a vast subject.. their inherent flexibility can be both a strength and weakness, be prepared to spend a lot of time to get anything that is truly useful.

All of the successful systems I have seen employ multiple technologies and usually multiple neural networks working as an ensemble. By multiple technologies I mean they use other decision support mechanisms such as fuzzy logic, bayesian inference, mixture models, etc. In other words, these are not simple feedforward perceptron networks trained by gradient descent (I wish it were that easy) =)

Reply With Quote
Thanked by:
  #8 (permalink)
 Peter2150 
Washington DC
 
Experience: Intermediate
Platform: NinjaTrader
Posts: 210 since Jun 2009
Thanks Given: 110
Thanks Received: 117

Interesting subject, and a way to waste tons of time. Quite a few years ago I got interested in NN.

First big question is what to feed them. Spent countless hours testing, and training. Hours and hours on end.

End result was nadda. I bet it would tough to come up with one half as good as the simple idea Sharky proposed in his idea for a script.

Pete

Reply With Quote
  #9 (permalink)
scJohn
Rock HIll, SC
 
Posts: 2 since Jul 2009
Thanks Given: 0
Thanks Received: 1

I have spent several months porting a GMDH polynomial neural network from VBA to NT. I do have it up and running in NT in real time. I would describe the code as almost beta.

To find out more about GMDH you can Google GMDH or visit this link here .

I am converting the Excel implementation that can be found here .


What I like about this type of neural network is that it is very fast in arriving at the network. Example: A time series with 48 cases and 24 variables can produce a network in 00:00:00.00259. This is fast enough that one could create a new network using 1 or 2-minute bars. Example: 200 cases with 5 variable forecasting 1 bar in advance can produce a network in 00:00:00.00134. Again, very doable in real time on a 1 or 2-minute chart. All of this is running totally inside NT. I am use to spending minutes if not hours in a stand alone program just to get a network. And then have to find a way to use it in real time. At least this seems to solve that problem.

Now can this actually be used to produce something that will make money? That is the $64,000 question. The easy part is is probably now done and the really hard work is about to begin.

Reply With Quote
Thanked by:
  #10 (permalink)
 
sefstrat's Avatar
 sefstrat 
Austin, TX
 
Experience: Advanced
Platform: NT/Matlab
Broker: Interactive Brokers
Trading: FX majors
Posts: 285 since Jun 2009
Thanks Given: 20
Thanks Received: 768


The problem with using GMDH in the way that you are describing (ie constantly regenerating the network structure) is that you have no control over what it is doing and no knowledge of exactly how its arriving at its solution.

It may work fantastically sometimes and then at other times it may fail miserably, you are basically at the mercy of the network. At least that is my experience with completely autonomous self-organizing networks.

There is definitely power in dynamic network structure however I think to harness it effectively you will need to use hints or templates or one of the other methods for defining a network starting point and defining how/what can change.

Another technology you might take a look at is NEAT/HyperNEAT (Neuro evolution of augmenting topologies)

They have a c# implementation, you can check it out here:
Evolutionary Complexity Research Group at UCF - Software

But remember, you can capture complex nonlinearities with a relatively simple network. Just like with indicators, the most powerful network is one that you fully understand.

FWIW, I use recurrent networks with fixed structure but adaptive weights, based primarily on information found in this book
Amazon.com: Neural Network Control of Nonlinear Discrete-Time Systems (Public Administration and Public Policy): Jagannathan Sarangapani: Books
(warning: this book is very heavy on the mathematics of nonlinear control system theory, it will probably give you a headache)

Reply With Quote
Thanked by:




Last Updated on September 23, 2009


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts