type of stock screening for NT - code + suggestions - NinjaTrader | futures io social day trading
futures io futures trading


type of stock screening for NT - code + suggestions
Updated: Views / Replies:681 / 3
Created: by drolles 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
 

type of stock screening for NT - code + suggestions

  #1 (permalink)
Elite Member
London, UK
 
Futures Experience: Beginner
Platform: TradeLink, OpenQuant, considering anything that works...
Favorite Futures: if it trades...
 
Posts: 94 since Oct 2010
Thanks: 24 given, 38 received

type of stock screening for NT - code + suggestions

Just looking to bounce something off some of the futures.io (formerly BMT) members. Iíd appreciate any input.

NT doesnít have a stock screener (silly, I agree).

So Iím looking to validate some of this papers findings 108 Years of Momentum Profits by Elroy Dimson, Paul Marsh, Mike Staunton :: SSRN

This will involve getting the past performance (monthly) of the stocks, working out those that have performed the best. This is a classic role of a stock screener; NT doesnít have one, so Iím going to implement a simple version myself.

My solution was to create an object called StockReturn:
 
Code
        internal class StockReturn
        {
            public int StockNumber { get; set; }
            public Instrument Stock { get; set; }
            public double Return { get; set; }
            
        }

Create a custom compare method:
 
Code
        private int CompareReturns(StockReturn x, StockReturn y)
        {
            if (x == null)
            {
                return -1;

            } else if (x.Return == y.Return) {

                //return x.Stock.CompareTo(y.Stock);
                return 0;

            }
            else if (x.Return > y.Return)
            {

                return 1;
            }
            else
            {
                return -1;

            }

        }

Calculate the returns, then stuff a list with them, sorting the list with our custom compare method.

 
Code
foreach (Instrument x in this.Instruments)
                {

                    double stockreturn = (Closes[counter][0] - Closes[counter][dayReturn]) / Closes[counter][0];

                    StockReturnList.Add( new StockReturn() {StockNumber=counter, Stock=x, Return=stockreturn});

                    counter++;
                }

                StockReturnList.Sort(CompareReturns);



Any views on more efficient methods or approaches?

Cheers,

drolles

Reply With Quote
The following user says Thank You to drolles for this post:
 
  #2 (permalink)
Elite Member
London, UK
 
Futures Experience: Beginner
Platform: TradeLink, OpenQuant, considering anything that works...
Favorite Futures: if it trades...
 
Posts: 94 since Oct 2010
Thanks: 24 given, 38 received

Testing harness?

Any thoughts on a testing harness for a solution like this?

Unlike the usual visual trading system (e.g. Bollinger Band Breakouts) one canít do the usual:

1. Check for the outlaying trades
2. Visually inspect that chart in the strategy analyser to confirm correct trading

The only thing I can think of is to export data from a small sample of the stock universe, consolidate the monthly returns, then confirm that stocks traded are the best and worst performers.

Cheers,

drolles

Reply With Quote
 
  #3 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,653 since Mar 2010
Thanks: 4,226 given, 25,602 received
Forum Reputation: Legendary



drolles View Post
Any thoughts on a testing harness for a solution like this?

Unlike the usual visual trading system (e.g. Bollinger Band Breakouts) one can’t do the usual:

1. Check for the outlaying trades
2. Visually inspect that chart in the strategy analyser to confirm correct trading

The only thing I can think of is to export data from a small sample of the stock universe, consolidate the monthly returns, then confirm that stocks traded are the best and worst performers.

Cheers,

drolles

You could proceed as follows:

(1) Create a stock list containing all the stocks that you wish to examine
(2) Add that list to the market analyzer
(3) Then add a new column with the ROC[dayReturn] to the market analyzer.

You will now see the returns of all stocls over the selected lookback period.

If you wish to have a look at the monthly returns, you could write a small strategy and run that through the strategy analyzer.

Reply With Quote
The following user says Thank You to Fat Tails for this post:
 
  #4 (permalink)
Elite Member
London, UK
 
Futures Experience: Beginner
Platform: TradeLink, OpenQuant, considering anything that works...
Favorite Futures: if it trades...
 
Posts: 94 since Oct 2010
Thanks: 24 given, 38 received

Check the data or force NT to test on data it has

Hi,

As you know, Iím trying to test this against the S&P500.

I use IQFeed as a data provider; therefore the back history you can get on the S&P500 shares varies. NT is testing only once it has data from the instruments in the strategy.

Does anyone know to either:

1. How to hit NTís database so to determine the instruments where I have a long history?
2. Force NT to start testing on the data it has?

Cheers,

drolles

Reply With Quote

Reply



futures io > > > > type of stock screening for NT - code + suggestions

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
price type code for indicatos traderTX NinjaTrader Programming 7 August 22nd, 2013 11:21 PM
Custom bar type does not appear in NT's list josh NinjaTrader 4 January 16th, 2013 07:43 PM
NT code problem lincor NinjaTrader 8 November 21st, 2012 07:00 AM
Trade Station to NT 7 suggestions please thinkfuture Traders Hideout 2 September 10th, 2010 03:27 PM
Need confirmation of NT code please Saroj NinjaTrader Programming 4 September 26th, 2009 01:51 PM


All times are GMT -4. The time now is 07:05 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-16 in 0.10 seconds with 19 queries on phoenix via your IP 54.226.113.250