![]() |
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Dec 2007
Posts: 190
Thanks: 0
Thanked 0 times in 0 posts
|
I noticed I won the most online here so thanks for the help and I will keep it short. Is it possible to use a Ray drawn and tagged by a strategy in crossabove/below?
Thanks a mill, Howie |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
Not sure I follow, but a strategy can create a Ray object and paint in on chart.
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Dec 2007
Posts: 190
Thanks: 0
Thanked 0 times in 0 posts
|
Hi Dierk,
Understood. Is there a way to test a crossover i.e. CrossAbove(Close,MYRAYNAME,1) ? Thank you |
|
|
|
|
|
#4 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
Sorry not sure I follow. MYRAYNAME needed to be a data series. Is it?
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Dec 2007
Posts: 190
Thanks: 0
Thanked 0 times in 0 posts
|
MYRAYNAME would be the ray created and drawn by the strategy. I would like to trap as a signal to trade the crossing of the Close and the Ray created and drawn by the strategy.
|
|
|
|
|
|
#6 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
I see. Unfortunately this is not supported. A ray is just a drawing object and not a data series which you would need for your calcs.
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#7 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
You could check out the Automatic Trend Line Detection indicator I coded. Its located in the NinjaScript File Sharing section. If my memory serves me correctly, I calculate the trend line and draw a ray and I then have code that detects when there is a cross of that ray by price.
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#8 |
|
Senior Member
Join Date: Dec 2007
Posts: 190
Thanks: 0
Thanked 0 times in 0 posts
|
Dont take this the wrong way Ray... I love you
|
|
|
|
|
|
#9 |
|
Senior Member
Join Date: Dec 2007
Posts: 190
Thanks: 0
Thanked 0 times in 0 posts
|
Awesome!!!!
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| EMA cross Question | Ninja Learner | Strategy Development | 23 | 05-28-2009 07:13 AM |
| Simple STO Cross problem | gyoung | General Programming | 4 | 02-18-2008 11:19 AM |
| MTF Ema Cross | buderim | Market Analyzer | 1 | 10-17-2007 04:17 AM |
| How to write second cross over of MACD? | Jenny | Strategy Development | 2 | 07-18-2007 06:23 AM |
| Alert on cross over/under | scjohn | Market Analyzer | 5 | 05-25-2007 07:21 AM |