Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Label Horizontal Line with Text

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mindset
    replied
    DrawLL.LabeledHorizontalLine(this,"LXLine",price,B rushes.Fuchsia,true);
    Also works as a global line using NinjaTraders labeled lines Drawing Tool

    you can name it as well eg myline = DrawLL.......
    you can sort the text you want in the properties and then just save as a default

    Leave a comment:


  • taltobello
    replied
    Thank you for posting the link to labeled lines. I have added it to my platform, but I'm wondering if there are any examples of how to implement this feature, specifically how to draw a horizontal line at a specific price point with an accompanying label. Thanks in advance.

    Leave a comment:


  • jeronymite
    replied
    Try this in an Indicator:
    Code:
    public override string FormatPriceMarker(double price)
    {
        return "MyText " + Instrument.MasterInstrument.FormatPrice(price);
    }
    Can't say for DrawingTools though.

    Thanks.
    Last edited by jeronymite; 05-27-2022, 01:47 AM.

    Leave a comment:


  • Mindset
    replied
    Thanks Jim - I read your code and found the correct syntax. One thought - would it be possible to add an override so that you could add your own text rather than just price. ( or even as additional text eg "My stop line")
    I tried but couldn't do it.

    Leave a comment:


  • NinjaTrader_Jim
    replied
    Hello Mindset,

    The LabeledLines drawing tool adds additional drawing tools which add the label, it does not add labels to existing lines.

    If you want to use LabeledLines in NinjaScript, you will need to call the appropriate Draw method.

    I.E.

    If you type:

    DrawLL.

    after you press the '.' key, you can use Intelliprompt to see the available methods.

    Using Intelliprompt - https://ninjatrader.com/support/help...elliprompt.htm

    Leave a comment:


  • Mindset
    replied
    Hi
    I have downloaded the code but it is not labelling my lines - everything is checked. Code runs on pricechange. Any thoughts?

    Leave a comment:


  • martyn73
    replied
    Just a follow up. Not sure how clean of a solution this is but I got it to work by getting the tick size of the instrument in OnRender for global drawing objects.

    ChartBars cb = chartScale.GetFirstChartBars();

    if (cb != null)
    tickSize = cb.Bars.Instrument.MasterInstrument.TickSize;

    I then did my own rounding calculation instead of using RoundToTickSize().





    Leave a comment:


  • martyn73
    replied
    Great, thanks for the feedback Jim.

    Leave a comment:


  • NinjaTrader_Jim
    replied
    Hello martyn73,

    Rounding price to TickSize specifically does not work with Global Drawing Objects and this tool.

    I use GetAttachedToChartBars to get the Instrument that the object is drawn on to be able to round the price to the right tick size, but this is not compatible with Global Drawing objects.

    If you wanted to get rid of the rounding to TickSize behavior, you could remove where masterInst is used and then be able to remove GetAttachedToCharBars.

    This should then work for Global Drawing object purposes.

    GetAttachedToCharBars - https://ninjatrader.com/support/help...ochartbars.htm

    I can't make any promises since this was a pet project I worked on my free time, but I may make those modifications some time in the future to only reference Instrument/GetAttachedToChartBars when rounding is needed.
    Last edited by NinjaTrader_Jim; 04-04-2022, 07:58 AM.

    Leave a comment:


  • martyn73
    replied
    I'm really interested in a developing a global horizontal line drawing tool that supports both custom labels and automatically append price. The Labeled Lines Drawing Tool that NinjaTrader_Jim developed pretty much is that, but I see the append price feature was removed for global draw objects because it would cause those lines to be removed when adding a new chart template. I'm curious to know what the root cause of that issue is? I'm assuming it deleted the GlobalDrawingObject xml template for some reason? Was any thought put into providing a solution for that issue vs. simply not allowing it? Thanks.

    Leave a comment:


  • omololu
    replied
    Originally posted by iwanko View Post
    Good morning, I arrived at this discussion when looking for a label on the horizontal lines.
    I accessed the link
    https://ninjatraderecosystem.com/use...-drawing-tool/

    posted earlier right here and downloaded the updated plug-in. I installed it as requested on his own download page, but he even adds the horizontal line and the label appears, but if I double-click the line to edit it by pressing OK he gives the following error in popup:



    This error only occurs entering the line properties without even making any edits to its properties.
    My NT8 version 8.0.22.2 64-bit - portuguese Brazil version

    Sorry my bad English!!

    Thiago Iwanko



    UPDATE:
    I already solved the problem, it was necessary to delete the old graphics with my studies and create new graphics, there it worked perfectly.
    iwanko,

    Please, could you give more details on how you solved the problem. I'm having the same issue ... what do you mean by 'old graphics" and "new graphics".

    Omololu

    Leave a comment:


  • NinjaTrader_PatrickG
    replied
    Are you able to reproduce this symptom? If so, what exact steps are you taking? Or did it only occur once? Other than the pop-up message itself, were there any other symptoms?

    Deciding on features for future releases is not a simple black and white decision. There are many factors involved including but not limited to:
    • Demand which is measured by objective user requests and subjective discretion on the part of our Product Management team.
    • Feasibility
    • Developer bandwidth
    • Current projects in the queue
    • Economics
    You'll find a note regarding your feature request in the release notes when a feature is implemented.

    In the meantime, you could reconfigure your hotkeys to have the custom 'labeled' lines assigned to the function keys. Learn more here:

    Leave a comment:


  • dmking
    replied
    Hi,

    I downloaded and installed the "Labeled line Drawing Tool". It seemed to work well for most of the session. Late in the session, I wanted to add another Ref Line and modify it as I had done to other lines previously. When I clicked on the new line I got an error "Unhandled exception: The value "NinjaTradeer.Ninjascript.DrawingTools.PriceLe vel" is not of type "NinjaTradeer.Ninjascript.DrawingTools.PriceLe vel" and cannot be used in this generic collection. Parameter name: value". Any explanation for this. It worked most of the day.

    To a Broader Question: How can NT get this "basic" capability into their Horizontal Line - F6? At a minimum, why not swap out the existing horizontal line function and replace it with the tool provided by Jim? It does what most of us want and at least the function would get support. It seems that this kind of functionality should be fundamental to NT. Other platforms that I use provide this kind of capability.

    Thanks in Advance

    Leave a comment:


  • NinjaTrader_PatrickG
    replied
    Is there a reason you're closing your charts before shutting down NinjaTrader? If you leave the chart window open then shut down from the Control Center (choosing 'yes' to save the workspace), your charts and any objects on them should appear the next time NinjaTrader is opened.

    Leave a comment:


  • MANJEET
    replied
    Once the charts closed, these lable lines washed away. Is there any option if we can retrieve back these horizontal label line after restart?

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by aa731, Today, 02:54 AM
0 responses
4 views
0 likes
Last Post aa731
by aa731
 
Started by thanajo, 05-04-2021, 02:11 AM
3 responses
470 views
0 likes
Last Post tradingnasdaqprueba  
Started by Christopher_R, Today, 12:29 AM
0 responses
10 views
0 likes
Last Post Christopher_R  
Started by sidlercom80, 10-28-2023, 08:49 AM
166 responses
2,237 views
0 likes
Last Post sidlercom80  
Started by thread, Yesterday, 11:58 PM
0 responses
5 views
0 likes
Last Post thread
by thread
 
Working...
X