I created a double-click event that triggers my custom order with ninjascript. I set a margin on the right side of my chart where I do my clicks. Works great.
For the next step, I've added some lines to my chart with Draw.Line(). The lines act as support and resistance so I want them extended to the right.
So started drawing the lines at the originator event and extending them to the right by giving the endBars ago parameter a value of -400 (on a 2m chart). This makes them "extend right" but the chart margins are not respected.
And as such the lines are interfering with my double-clicks and instead of triggering my code, it ends up just selecting the drawings...
It is possible to lock down drawings and indicators so they don't get selected when clicking them?
If not possible, how can I draw the lines (without having to redraw on each bar update) so that the margin on the right of the chart is respected and I can use that area to do my double clicks?
EDIT: The green line towards the bottom is the OrderFlorVWAP plot... as you can see it ends in a way that respects the margins, this is exactly the behavior I'd like my lines to follow
Comment