![]() |
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
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Nov 2008
Posts: 72
Thanks: 0
Thanked 0 times in 0 posts
|
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! |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Mar 2009
Posts: 441
Thanks: 0
Thanked 25 times in 16 posts
|
Hi,
Give an example of your data and what you want. Baruch |
|
|
|
|
|
#3 |
|
Member
Join Date: Nov 2008
Posts: 72
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Mar 2009
Posts: 441
Thanks: 0
Thanked 25 times in 16 posts
|
What do you mean "without a retracement of at least 0.005"?
Can you show on the sample? Baruch |
|
|
|
|
|
#5 |
|
Member
Join Date: Nov 2008
Posts: 72
Thanks: 0
Thanked 0 times in 0 posts
|
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.
|
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Mar 2009
Posts: 441
Thanks: 0
Thanked 25 times in 16 posts
|
I don't see how it can be done in excel.
Baruch |
|
|
|
|
|
#7 |
|
Member
Join Date: Nov 2008
Posts: 72
Thanks: 0
Thanked 0 times in 0 posts
|
damn.. okay
thx anyways |
|
|
|
|
|
#8 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
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
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#9 |
|
Junior Member
Join Date: Feb 2010
Posts: 19
Thanks: 0
Thanked 0 times in 0 posts
|
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 ; |
|
|
|
|
|
#10 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
dowhk, not sure I follow you - are you trying to 'get' the values you set inside the if statement?
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#11 |
|
Junior Member
Join Date: Feb 2010
Posts: 19
Thanks: 0
Thanked 0 times in 0 posts
|
|
|
|
|
|
|
#12 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
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
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#13 | |
|
Junior Member
Join Date: Feb 2010
Posts: 19
Thanks: 0
Thanked 0 times in 0 posts
|
Quote:
Thank you for yoyr prompt reply/help. I cancel(?) my original question(the question itself was raised by some confusion). |
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |