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 > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 02-22-2009, 11:39 PM   #1
Novicetrader
Junior Member
 
Join Date: Mar 2006
Location: , ,
Posts: 18
Thanks: 0
Thanked 0 times in 0 posts
Default Compare price level with last cross-over

I want to write a strategy that whenever a stoch crossover (2 %D lines) occurs it will compare the last crossover price level with current crossover price.

Example: Go long if current stoch crossover price level above the last crossover price level.

Can anyone share their expertise? Thanks in advance.
Novicetrader is offline  
Reply With Quote
Old 02-23-2009, 01:29 AM   #2
NinjaTrader_Ben
NinjaTrader Customer Service
 
NinjaTrader_Ben's Avatar
 
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
Default

Hello,

Your best bet is probably to store them in a DataSeries, then refer back to them using indexing and maybe a "for" loop. This link my help:
http://www.ninjatrader-support.com/H...iesObject.html
NinjaTrader_Ben 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
Can you compare two instruments? rc5781 Charting 3 04-02-2009 04:43 AM
cross hair price marker politcat Charting 2 12-30-2008 09:51 AM
Market Profile/Volume at each price level 123r34 Indicator Development 6 07-24-2008 10:31 AM
Compare different strategies in performance tab koalboy Miscellaneous Support 1 02-07-2008 07:17 AM
Control of Price Markers on Plot Level whitmark Indicator Development 1 03-29-2007 04:01 AM


All times are GMT -6. The time now is 11:31 PM.