NinjaTrader Support Forum  
X

Attention!

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


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 01-27-2010, 03:48 AM   #1
katiewc
Member
 
Join Date: Nov 2008
Posts: 72
Thanks: 0
Thanked 0 times in 0 posts
Default programming help

Does anyone know how to analyze this in excel, or a program?
Or if someone can write me a script? I would be willing to pay.

Basically I have a lot of data in excel format on the open and close of a number of trading days (over 1000). I am trying to find how often this stock has moved up (for example) 5 dollars without a retracement of $1. Anyone know how to do this in Excel or NT? Any help appreciated. thanks!
katiewc is offline  
Reply With Quote
Old 01-27-2010, 04:04 AM   #2
Baruch
Senior Member
 
Join Date: Mar 2009
Posts: 441
Thanks: 0
Thanked 25 times in 16 posts
Default

Hi,
Give an example of your data and what you want.

Baruch
Baruch is offline  
Reply With Quote
Old 01-27-2010, 05:20 AM   #3
katiewc
Member
 
Join Date: Nov 2008
Posts: 72
Thanks: 0
Thanked 0 times in 0 posts
Default

Hi Baruch,

Here's a sample of my data below, basically I just want to see amongst my data how many times it moves > than 0.03 without a retracement of at least 0.005.
The dates are on the left and the move (close minus open) is to the right. thanks

2009.01.02 -0.00030
2009.01.02 0.00010
2009.01.02 0.00080
2009.01.02 -0.00300
2009.01.02 0.00220
2009.01.02 0.00350
2009.01.02 0.00200
2009.01.02 0.00470
2009.01.02 -0.00190
2009.01.02 0.00070
2009.01.02 -0.00020
2009.01.02 -0.00150
2009.01.02 0.00090
2009.01.02 0.00040
2009.01.02 -0.00310
2009.01.02 -0.00380
2009.01.02 0.00100
2009.01.02 0.00100
2009.01.02 0.00170
2009.01.02 0.00120
2009.01.02 0.00510
2009.01.02 -0.00270
katiewc is offline  
Reply With Quote
Old 01-27-2010, 05:44 AM   #4
Baruch
Senior Member
 
Join Date: Mar 2009
Posts: 441
Thanks: 0
Thanked 25 times in 16 posts
Default

What do you mean "without a retracement of at least 0.005"?
Can you show on the sample?

Baruch
Baruch is offline  
Reply With Quote
Old 01-27-2010, 06:19 AM   #5
katiewc
Member
 
Join Date: Nov 2008
Posts: 72
Thanks: 0
Thanked 0 times in 0 posts
Default

for example, i want to analyze how many bars move up 0.0300 in my data without a retrace, woops i forgot to add these are 30 minute bars. So for example if 10 (30 minute) bars move up 0.0300 and do not drop 0.0005 at any point then that would count as one. I want to see how many times it does this.

For example here's one that would pass
bar 1: +0.01
bar 2: +0.01
bar 3: -0.003
bar 4: +0.02

here it moved up 0.0397 with only a retracement of 0.003

one that would not pass is
bar1: 0.02
bar2: 0.009
bar3: -0.01
bar4: 0.01

while it moved > than 0.03, it had a retracement > than 0.005 as well. Hope this clears up what i mean thanks
Last edited by katiewc; 01-27-2010 at 06:35 AM.
katiewc is offline  
Reply With Quote
Old 01-27-2010, 07:07 AM   #6
Baruch
Senior Member
 
Join Date: Mar 2009
Posts: 441
Thanks: 0
Thanked 25 times in 16 posts
Default

I don't see how it can be done in excel.

Baruch
Baruch is offline  
Reply With Quote
Old 01-27-2010, 08:01 AM   #7
katiewc
Member
 
Join Date: Nov 2008
Posts: 72
Thanks: 0
Thanked 0 times in 0 posts
Default

damn.. okay
thx anyways
katiewc is offline  
Reply With Quote
Old 01-27-2010, 08:36 AM   #8
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
Default

Katie, I'm not aware of readymade methods for generating those statistics, but with NinjaScript / C# custom coding it should be doable generally spoken.

If you want to contact a consulant to help you on this quest, please use our list for locating those -

http://www.ninjatrader.com/webnew/pa...injaScript.htm
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 02-05-2010, 09:42 AM   #9
dowhk
Junior Member
 
Join Date: Feb 2010
Posts: 19
Thanks: 0
Thanked 0 times in 0 posts
Arrow Newbi need code help for "IF"

Hi,

I am a NT newbi, please help me;

I want to keep values inside of the nest of the "if" statement, how can I do it?

Here is the code example:

if ( expression )
{
SP.Set( x ) ;
MP.Set( y ) ;
}
SP[0] = ? ;
MP[0] = ? ;

I want the SP[x] and MP[y] values inside of the {} nest hold outside of the {}.

I want to keep vales outside of the {} nest like this:
SP[0] = x ;
MP[0] = y ;
dowhk is offline  
Reply With Quote
Old 02-05-2010, 10:02 AM   #10
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
Default

dowhk, not sure I follow you - are you trying to 'get' the values you set inside the if statement?
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 02-05-2010, 10:09 AM   #11
dowhk
Junior Member
 
Join Date: Feb 2010
Posts: 19
Thanks: 0
Thanked 0 times in 0 posts
Default

Quote:
Originally Posted by NinjaTrader_Bertrand View Post
dowhk, not sure I follow you - are you trying to 'get' the values you set inside the if statement?
Yes, Bertrand.
dowhk is offline  
Reply With Quote
Old 02-05-2010, 10:16 AM   #12
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
Default

You could use GetBar() to arrive at the barsAgo value where your condition was true, thus you could plug this into the dataseries and retrieve the Set values -

http://www.ninjatrader-support2.com/...ad.php?t=19176
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 02-05-2010, 04:35 PM   #13
dowhk
Junior Member
 
Join Date: Feb 2010
Posts: 19
Thanks: 0
Thanked 0 times in 0 posts
Talking

Quote:
Originally Posted by NinjaTrader_Bertrand View Post
You could use GetBar() to arrive at the barsAgo value where your condition was true, thus you could plug this into the dataseries and retrieve the Set values -

http://www.ninjatrader-support2.com/...ad.php?t=19176
Hi Bertrand,

Thank you for yoyr prompt reply/help.
I cancel(?) my original question(the question itself was raised by some confusion).
dowhk 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
What programming language? jstnbrg General Programming 2 02-03-2009 04:46 AM
Programming help kipper General Programming 3 12-14-2008 12:12 AM
Programming question sauer11155 General Programming 3 09-02-2008 11:34 AM
Stochastic Programming tomydispik General Programming 3 08-08-2008 09:39 AM
Programming an ORB trademark Strategy Development 2 06-17-2008 10:40 AM


All times are GMT -6. The time now is 04:15 PM.