PDA

View Full Version : Snapping horizontal lines to price


MikeInMA
08-11-2010, 11:04 AM
When Snap Mode is set to Price, are horizontal lines supposed to snap? If so, that doesn't appear to work in beta 19.

Specifically, if I use F6 to draw a horizontal line when Snap Mode is set to Price and then select the line to move it, it moves smoothly and I can position it anywhere. I would have expected the line to step from one valid price point to the next.

NinjaTrader_Brett
08-11-2010, 11:17 AM
Hello,

Can you please change the Snap mode to Bar and Price and see if this works more as you expect. As depending on how much data you are loading into the chart the snap to price can have a lot of prices to snap. As if there are several OHLC data points around one price point it could give the impression that is not snapping to price. In this case Snap to Bar and Price would need to be used to narrow down what bar your wanting to snap to.

Let me know if I can be of further assistance.

MikeInMA
08-11-2010, 11:31 AM
No, Bar and Price is not what I had in mind. And my prices are far enough apart that I would see the line stepping from price to price if it were doing so.

Suppose, for example, that I wanted to draw a line at a potentially significant price, like an old low or an old high, that is not the OHL or C of a particular bar. I hit F6 to draw my line, and then I want to drag it to my preferred price. If Snap Mode is set to Price, shouldn't my line move from valid price to valid price? If that's not the expected behavior – and that's certainly not what's happening – then what does Snap Mode Price mean with respect to horizontal lines?

NinjaTrader_Brett
08-11-2010, 11:49 AM
Hello,


Please see the screenshot. You can see that I have moved this horizontal line. The points that it can snap to are every OHLC on the entire chart. For example in the screenshot. You can see where I wanted to get the low of the circled lowest point. Instead I got the High of the bar ahead of that and I'm not quite on the lowest low or snapped to the lowest low. As every price is valid when in snap to price mode.

Now in this situation if I was on snap to Price and Bar, and I had my curser on the bar I wanted to specifically snap to I could have got this point without having interference from the other High point that was so close by having my pointer on the bar that I was only interested in the low for.



Let me know if I can be of further assistance.

MikeInMA
08-11-2010, 11:56 AM
On an ES chart with Snap Mode set to Price, I hit F6 and got a horizontal line at 1089.425 (according to the line's properties). That is not a valid ES price. Then I grabbed the line and dragged it an arbitrary amount, and it came to rest at 1087.761. Definitely not a valid ES price. So what's my line snapping to? The answer appears to be Nothing.

NinjaTrader_Brett
08-11-2010, 02:43 PM
Hello,

What time frame chart are you using when you can reproduce this?

MikeInMA
08-11-2010, 06:53 PM
Further investigation seems to indicate that this problem is provoked by the presence of a particular third-party indicator. I'm waiting for a new release of this suite of indicators, and if the problem persists at that point I'll bring it to the attention of the vendor.

NinjaTrader_Brett
08-12-2010, 07:18 AM
Hello,

Sounds good for our records which indicator package do you have installed that you believe is causing this?

393mach1
08-12-2010, 10:58 AM
hi, same problem here. mine is being caused by the "KeltnerChannel" indicator (the one that came with ninjatrader). its weird, it only happens on a chart of the ES. i also have a chart of the TF, and YM and they both work fine. i tried making a new chart for each contract and get the same results every time; snaps work fine for all charts until i add the KeltnerChannel, then just the ES stops snapping, but the other two work fine.

NinjaTrader_Brett
08-12-2010, 11:13 AM
Hello,

Thank you for posting this.

This is reproducable on my side when an indicator is applied to a chart. What is occuring is that it is snapping to the price value of the indicator. I am checking with development to see if this is expected.

I look forward to assisting you further.

MikeInMA
08-12-2010, 11:33 AM
I'm glad this was reproduced without me having to rat out the indicator vendor! Anyway, I reproduced the issue using the Keltner channel because I was curious to see if the object the line was attached to somehow got changed. It did not.

As long as the line remains attached to the data series, it should only snap to valid values for the data series, doncha think...?

NinjaTrader_Brett
08-12-2010, 12:00 PM
Hello,

Heard back from development, this is expected as Snap to price means any plotted y value.

Let me know if I can be of further assistance.

393mach1
08-12-2010, 12:01 PM
but why does it work as i expected on the TF and YM? is there any way to make it work correctly on the ES?

MikeInMA
08-12-2010, 12:08 PM
And what, then, does it mean that the horizontal line is attached to the data series? (Seems like that's being completely ignored.) If I wanted to snap to indicator values I'd attach the line to the indicator!

NinjaTrader_Brett
08-12-2010, 02:14 PM
Hello,

393,

This has to do with the instruments pricing format. Since the ES has 2 decimal points being it has this amount to be truncated to. Whereas on the YM this has no decimal value and the TF only has one decimal value therefor it truncates right to the decimal value that your expecting the ES does not.

MikeInMA,

Attach to is unrelated to its positioning. Attach to allows you to duplicate this drawing object on multiple charts.

Please see the following from the help guide:

http://www.ninjatrader.com/support/helpGuides/nt7/working_with_drawing_tools__ob.htm?zoom_highlights ub=Attach%2BTo

Attach to
Applies the drawing object to the selected instrument on a single chart or all charts with the same instrument. (see the "How to Enable a Global Drawing Object" section below)



Let me know if I can be of further assistance.

393mach1
08-12-2010, 02:22 PM
but with no indicators, the snap works perfectly fine on the ES and it will snap in .25 increments. is there any way to specify snap increments? is there any way to exclude the indicators for the snap function?

NinjaTrader_Brett
08-12-2010, 02:41 PM
Hello,

This is correct as the snap will snap to any y price. If you apply an indicator to a chart you are adding snap points. These snap points will snap to the indicator values in addition to the price values and this is expected. Unfortunately on the ES since the ES has a .25 tick value and any other instrument that has a similar tick value you will see this occur on, since the indicator can be calculated to be 1024.63 for example and ploted on the y axis. An example of this would be instead of going from .25 to .50 to .75 like on the ES the instrument went .1 .2 .3 .4 like the TF (There is no gaps) you do not see this occur.

Let me know if I can be of further assistance.

393mach1
08-12-2010, 04:57 PM
ok, i see. do you know of any kind of work-around? is there a way to exclude objects to snap to? a way to change the decimal places on the indicators?

NinjaTrader_Brett
08-13-2010, 07:18 AM
Hello,

No work around currently.

NinjaTrader_Josh
08-13-2010, 09:22 AM
You can change the decimal formatting of the indicator through code.
http://www.ninjatrader.com/support/helpGuides/nt7/formatpricemarker.htm

393mach1
08-13-2010, 11:18 AM
I successfully changed the decimal place on the indicator, but the snap still uses the full data points even though the indicator only displays one decimal place. any other ideas?

NinjaTrader_Josh
08-13-2010, 12:49 PM
393mach1,

Then you will most likely need to force rounding your indicator values to your desired format. This will need to be done in indicator code on the value before you do .Set().