![]() |
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#16 |
|
Senior Member
Join Date: Mar 2010
Location: Sweden
Posts: 123
Thanks: 6
Thanked 4 times in 3 posts
|
Thanks for you reply Ryan. To clarify the erratic behaviour please take a look at these pics. Pic 1 zoomes in with a blue circle marking the indicator ray, just under the peak. At Pic 2 Iīve zoomed out. Now the ray is ABOVE the peak and far out the blue marking circle!
Pic 3 is to show the ray gets its MAX(Highs[0], lookback)[0] from the second peak. The ray placement from Pic 2 zoom remains. The blue cirkle marks to area zoomed in Pic 1 and 2. Do you still think this is a matter of the ray ancors? All same settings, only a zooming made?! Edit: Iīve used the code you returned, but /* excluded to mid and low rays. My question at this point isnīt the lines not beeing parallel at times. ![]() ![]()
Last edited by FREEN; 07-28-2011 at 08:16 AM.
|
|
|
|
|
|
#17 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,555
Thanks: 261
Thanked 1,014 times in 995 posts
|
FREEN, I tried to reproduce your issue seen here but was unfortunately unable to - when I draw a simple ray programmatically like attached zooming / changing the scale would not impact it's anchor points used for me. You can also doubleclick on the draw object and checks it's points used in the 'data' section. Would you see issues with this script as well? I was testing here for example on today's ES 09-11 1 Minute chart on the ETH sessions.
Thanks,
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#18 | |
|
Senior Member
|
Quote:
I cannot seem to be able to create a table in this editor, so I have attached a picture showing the calculations. It would be nice if someone would show me how to create a table. My HTML did not seem to do it right.
Last edited by koganam; 07-28-2011 at 11:17 AM.
|
|
|
|
|
|
|
#19 |
|
Senior Member
Join Date: Mar 2010
Location: Sweden
Posts: 123
Thanks: 6
Thanked 4 times in 3 posts
|
Thanks Bertrand,
Well, if I remove the if statement your "DrawRayTest.cs" plots. But you pretty much hardcoded the ancorpoints, so I donīt get you point here. I might give up on this one, but please look at this video. Iīm simply zooming in/out with [alt-up/down arrows]. Still 30 min bars on TNA. http://www.workplanner.se/nt.wmv As you say, [Start Y] ray properties changes at this zooming. See bellow: ![]() ![]() So, I guess my question boils down to: Why does the anchorpoints change when the screen is redrawn (ie: at zooming)?!
Last edited by FREEN; 07-28-2011 at 01:56 PM.
|
|
|
|
|
|
#20 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,555
Thanks: 261
Thanked 1,014 times in 995 posts
|
FREEN, I was not able to exactly reproduce this with your script - if you print the anchors used and calc'ed by your script > would you see the same change? If you use for example a line with the same anchors same issue for you?
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#21 | |
|
Senior Member
Join Date: Mar 2010
Location: Sweden
Posts: 123
Thanks: 6
Thanked 4 times in 3 posts
|
Quote:
In video indicator is green hashed ray: Step 1: Outzoomed - indicator loaded Step 2: Variable anchor points confirmed in Output window Step 3: Zoom in on second highest peak Step 4: Step zooming -> ray jumps (changes anchorpoints in ray properties) Step 5: Look in output window -> no changes (since indicator not reloaded) Step 6: Reload indicator when zoomed in -> anchorpoints changes and indicator finds zoomed high instead!!! Step 7: New anchorpoints confirmed in output window Step 8: Zoom out -> anchorpoints changes back Screen video on the above steps: http://www.workplanner.se/nt2.wmv |
|
|
|
|
|
|
#22 |
|
NinjaTrader Customer Service
Join Date: Jun 2009
Location: Denver, CO
Posts: 3,149
Thanks: 10
Thanked 90 times in 82 posts
|
Freen, thanks for the update. We'll look into and get back to you, most likely on Monday.
Austin
NinjaTrader Customer Service |
|
|
|
|
|
#23 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,555
Thanks: 261
Thanked 1,014 times in 995 posts
|
FREEN, at which point do you exactly apply your script to the 30 min chart you use?
Single series script would process up to the last seen bar on the chart, and only process further if you scroll ahead up to the last bar, which could influence then in turn finding of your anchor points used.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#24 | ||
|
Senior Member
Join Date: Mar 2010
Location: Sweden
Posts: 123
Thanks: 6
Thanked 4 times in 3 posts
|
Quote:
Quote:
1. Is what you see in the video expected behaviour? 2. Are you able to reproduce? |
||
|
|
|
|
|
#25 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,555
Thanks: 261
Thanked 1,014 times in 995 posts
|
FREEN, I could unfortunately not debug your anchor point selection for you - I suggest you simplify your script to identify the point where it breaks for you - the bars loading for a single series indicator is like I mentioned : the bars are processed until the last visible data point only, as such scolling and zooming will likely change your lookback results as new data is used.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#26 | |
|
Senior Member
Join Date: Mar 2010
Location: Sweden
Posts: 123
Thanks: 6
Thanked 4 times in 3 posts
|
Quote:
Q: Is there a way to force NT to have all bars loaded processed rather than all bars up to current visible point? Elsewise itīs pretty hard to make a reliable indicator working in retrospect rather than prospect, as most indicators do. //Fredrik
Last edited by FREEN; 08-04-2011 at 04:55 AM.
|
|
|
|
|
|
|
#27 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,555
Thanks: 261
Thanked 1,014 times in 995 posts
|
What you can do is add another series to make this a MultiSeries script and then just return out of processing anything for this additional series. MultiSeries indicators would process all bars up to the last bar.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#28 |
|
Senior Member
|
|
|
|
|
|
|
#29 |
|
Senior Member
Join Date: Mar 2010
Location: Sweden
Posts: 123
Thanks: 6
Thanked 4 times in 3 posts
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Horizontal Rays? | ephilip | Charting | 3 | 03-01-2011 07:40 PM |
| Need some help with drawing rays | kaywai | Indicator Development | 4 | 02-05-2011 01:33 PM |
| Parallel optimization | jjmmg | Strategy Development | 1 | 11-12-2010 05:20 AM |
| re:fractal rays,shadowtraders | laredo | NinjaScript File Sharing Discussion | 3 | 05-06-2010 05:37 PM |
| Limit the number or rays drawn | pstiles | Indicator Development | 3 | 02-25-2009 05:43 AM |