PDA

View Full Version : Method Help Overview


SuzyG
12-15-2006, 10:16 AM
Is there a help page (or can there be) that summarizes by category the methods and their function? I find it very difficult to locate what I am looking for.

NinjaTrader_Ray
12-15-2006, 10:55 AM
Which version?

SuzyG
12-15-2006, 11:30 AM
Version 6

NinjaTrader_Ray
12-15-2006, 11:38 AM
NT6 Help Doc is for NinjaScript is about 70% complete. I assume you have viewed the current information in the Help Doc? Most if not all relevant methods and propertiesthat are in the scopeof NinjaScript is documented.

Ray

SuzyG
12-15-2006, 12:13 PM
Yes, I have reviewed it and find it generally to be quite useful. However, I do find it difficult to find which methods I need and think a brief overview would be useful too.

My current questions are how to get:

1) close of prior day price

2) After a bar on a 3 or 1 minute chart has closed, I want to know the next tick valaue. Would I need another chart by ticks to get the open of the next bar immediately and then use FirstTickOfBar? Or is there a better way?

3)I want to verify one bar is lower than the previous bar and that the colors have changed. There is a green bar and now the next bar is red -- market direction changed. I have NBarsDown(1,false, true, true)[0] Is this the method to use?

NinjaTrader_Dierk
12-15-2006, 06:50 PM
a) Next NT6 beta (available in a few days) will support a new method "GetDailyBar(daysAgo)". This will return you a bar for the complete days. It will return null in case there is no data available for the selected day. You'll need to code something along these lines:
if (Bars.GetDailyBar(1) != null)
Print(Bars.GetDailyBar(1).Close.ToString());
b) Just set your indicator/strategy to CalculateOnBarClose=false and watch the FirstTickOfBar property. No need to go another chart/data series or so.

c) if (Close[0] < Close[1])
Print("Got it");should do the trick

SuzyG
12-16-2006, 01:57 PM
Thank you for your help.

Can I use the GetDailyBar to get the open oftoday's market at a specific time, e.g. 9:30 also?

NinjaTrader_Dierk
12-16-2006, 05:27 PM
Yes, as soon as you got the first tick of that day. Just call "Bars.GetSessionBar(0).Open"

SuzyG
01-05-2007, 05:28 AM
Is this going to be available soon?

Thanks, Suzy

NinjaTrader_Ray
01-05-2007, 05:40 AM
We aretargeting Monday for next beta update. Method name hasaslo changed to Bars.GetSessionBar().

Ray

SuzyG
01-09-2007, 12:27 PM
Ray, I have the new version of NT6 and see this is implemented. I don't understand how to use it to get the yesterday's close at 4:15 pm when the markets close and the open at 9:30 am.

The help says, it is virtual and built off the underlying data series and do not represent the actual day. Can you please clarify what I need to store to really get yesterday's information and have it be precise?

Thank you. Suzy

NinjaTrader_Ray
01-09-2007, 03:36 PM
Do you have a data feed that supports historical daily data? If yes, the just add a daily bar series to your strategyand reference this data. See the section on multi instruments and time frames and the Add() method for some guidance.

If you do not have a data feed that support daily bars, then you have to use GetSessionBar() which builds (compresses) tick/minute based data into bar that represents sessions based on you session start and end times. You can then acces the OHLC of this session bar.

Ray

SuzyG
01-09-2007, 04:42 PM
1) According to the doc, a free Yahoo feed can supply daily historical data though I cannot see daily bars on the chart nor can I import data. Minute increments work fine. I know Ninja Trader doesn't supply the feed, but have you seen this working?

2) Can I be connected to one feed, such as Zen-Fire, and getting historical data from Yahoo at the same time by adding an instrument to the chart strategy using Add()? If so, what syntax allows me to designate Yahoo?

3) If I understand correctly, GetSessionBar() willreturn the open and close only for the periods of time which I was attached and if I missed a day or certain hours the results will not tell me the opening and closing bell figures.

NinjaTrader_Ray
01-10-2007, 02:20 AM
1) Yahoo feed does not support futures at this time.

2) Internal connection objects are added to an internal connection collection as you connect. What NT does is when a data request is made from the UI, it loops through the connections and checks for the first one that supports the instrument type and the type of data request (real-time or historical) and gets data from there. In your example, this won't work since both Zen and Yahoo provide historical data but one only daily the other intraday. What I suggest is using eSignal. You can get a cheap NT only subscription for aorund $50 permonth via the link at the bottom of this post. Within your Zen account connection, uncheck the Historical data server check box. Connect to Zen first, then to eSignal. NT will then use Zen for real-time data only, eSignal for historical data.

3) This is dependant on the provider. Since you use Zen, NT will go to get historical data from the servers so even if you were connected, you will get data. However, Zen historical data is a bonus and not a historical data server that you should rely on if you need to ensure that you have valid data. If the Zen provided historical data server goes down and there is a gap, it will not be filled. Best bet is use the eSignal combo I suggested.

http://www.ninjatrader.com/web/eSignalforNinjaTraderPromotion.pdf

Ray

daven
01-18-2007, 07:36 AM
Is there an alternative if one is unable to use e-signal? I had to cancel my esignal subscription. When i installed a dual-wan port to make my feed more reliable, e-signal stopped working. They check incoming URL's against user identity and if they see two URL's for the same identity, (my dual-wan router multi-tasking between cable and dsl) they immediately shut down the feed for both url's. Not fixable by tech support at e-signal and they don't intend to fix it.

I do have Tradestation. Can I backfill historical data with Tradestation as you described for esignal?

NinjaTrader_Ray
01-18-2007, 08:26 AM
We also support DNTiQ feed. I am unsure of their authentication process but you could check them out. We do provide a way to retrieve minute based historical data from TS. Its not a direct connection. We provide an EL strategy that when applied to a TS chart, writes out a file with OHLC information that is then imported by NinjaTrader.

Please check the Help Guid section "Historical Data".

Ray