NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > Application Technical Support > Automated Trading

Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader.

Reply
 
Thread Tools Display Modes
Old 06-16-2009, 12:15 PM   #1
pistolpete
Senior Member
 
Join Date: Feb 2008
Posts: 176
Thanks: 0
Thanked 0 times in 0 posts
Default Pre Market Data

I am running a simple moving average crossover that I have made some customizations to right now. I am curious, is the data that NT is bringing in building its indicators such as the SMA from 9:30 to 4? I got a fill today that was ok but when I widen my chart out from 8:00 am to 4:00 the indicator takes into account the pre market price data and has a drastic change with the way the SMA comes across - in this case making it a lot more profitable for me. Is there a way to build the average including pre market data? I wouldn't trade in the pre market using my automated strategies but I might take a look at using that data to predicting more of an overall average of the day.
Thanks
Pete
pistolpete is offline  
Reply With Quote
Old 06-16-2009, 12:20 PM   #2
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

pistolpete,

The indicators will use any information available on the chart. If your chart contains the premarket information then your indicator will use those bars as part of its calculations.
NinjaTrader_Josh is offline  
Reply With Quote
Old 06-16-2009, 12:29 PM   #3
pistolpete
Senior Member
 
Join Date: Feb 2008
Posts: 176
Thanks: 0
Thanked 0 times in 0 posts
Default

no that is not right. I am trading TZA right now and when I change my charts to only show data from 9:30 to 4:00 the SMA is drastically different then when I reset them to go from 12-12. I got filled when the cross happened when the charts are being built only from data taken between 9:30 and 4:00 if my entry would have been taken from the SMA cross that had pre market data in it it would have been an hour late.
pistolpete is offline  
Reply With Quote
Old 06-16-2009, 12:39 PM   #4
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

pistolpete,

That is what I am saying. The SMA is calculated based on all the information on the chart. When you change the chart sessions to something else the SMA indicator can show different values.
NinjaTrader_Josh is offline  
Reply With Quote
Old 06-16-2009, 01:51 PM   #5
pistolpete
Senior Member
 
Join Date: Feb 2008
Posts: 176
Thanks: 0
Thanked 0 times in 0 posts
Default

Can you bring up a chart for TZA, its a small cap etf bear. Put 2 SMAs of 10 and 30 on. Compare your chart from when it set to default 12:00 to 12:00 then set the chart from 9:30 to 4:00 and compare the crossover points. Are they different?
pistolpete is offline  
Reply With Quote
Old 06-16-2009, 01:55 PM   #6
pistolpete
Senior Member
 
Join Date: Feb 2008
Posts: 176
Thanks: 0
Thanked 0 times in 0 posts
Default

When the SMA shows different values what values is it using the execute the trade from?
pistolpete is offline  
Reply With Quote
Old 06-16-2009, 02:23 PM   #7
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

pistolpete,

It uses different data points for the SMA so it will be different. After awhile the difference fades away since the period range phases out different bars and phases in newer bars. It can be different yet it can be the same. As stated, the indicators use all the bars on the chart and none of the bars not on the chart.
NinjaTrader_Josh is offline  
Reply With Quote
Old 06-17-2009, 08:42 AM   #8
mainstream
Senior Member
 
Join Date: Sep 2008
Posts: 104
Thanks: 0
Thanked 0 times in 0 posts
Default

Josh,

How do you have access to the data 12am-12am for your indicators, but limit the strategy to execute trades during a specific time block?

Say you want a given strategy to be allowed to take trades from 7am-8am Central, 8:45am to 11:30am central, etc.

Thanks.

Also this may be in the wrong place, but how do you put a standard deviation band (like in the VWAP) around a Pivot or Prior day Price level, and use it in a strategy?
mainstream is offline  
Reply With Quote
Old 06-17-2009, 08:48 AM   #9
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

mainstream,

You will have to program a time filter as shown here: http://www.ninjatrader-support2.com/...ead.php?t=3226

If you want some band around something you will have to use some custom programming of the band's logic to add it.
NinjaTrader_Josh is offline  
Reply With Quote
Old 06-17-2009, 09:16 AM   #10
mainstream
Senior Member
 
Join Date: Sep 2008
Posts: 104
Thanks: 0
Thanked 0 times in 0 posts
Default

Thanks Josh.

I suppose one could "cut and paste" the coding you guys did for VWAP and substitute a different input, because adding a "pivot" as the default input of say APZ in the strategy analyzer, does not work, am I correct?

Also do you all teach writing the ninja code?
mainstream is offline  
Reply With Quote
Old 06-17-2009, 09:19 AM   #11
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

mainstream,

That code is provided as-is as a 3rd party indicator. Unfortunately I do not know if you can simply replace it with pivots. Also, I don't think it has much value in doing that since pivots are nearly static values anyways.

We are constantly improving our educational resources, but unfortunately we do not currently offer any programming courses.
NinjaTrader_Josh is offline  
Reply With Quote
Old 06-17-2009, 11:11 AM   #12
mainstream
Senior Member
 
Join Date: Sep 2008
Posts: 104
Thanks: 0
Thanked 0 times in 0 posts
Default

Well, it may it may not. I don't know yet. I'll try to figure it out.


Anyway on the teaching thing, I'm sure you'd find many students willing to compensate you for your time and the time of the company.

Maybe you could teach a class at UCLA
mainstream is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pre Market Data button/icon rretch Suggestions And Feedback 1 05-21-2009 01:07 PM
Ninja Chart won't show pre-market data for NYMEX TapeReader Charting 1 08-21-2008 07:50 AM
Pre-market After Hours Data cipher4d Charting 5 08-04-2008 11:05 AM
Saving Charts & Pre Market data johncare Charting 3 05-05-2008 07:32 AM
Using pre-recorded data? Antraman Miscellaneous Support 2 11-08-2005 01:49 AM


All times are GMT -6. The time now is 11:27 AM.