Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Multi line tool

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

    Multi line tool

    Hi, I am looking for some advice please. I have coded some basic indicators etc.
    What I am wanting to do now is, I have a "Horizontal Ray", drawing tool which will draw a horizontal ray from where you mouse click. I want to know how difficult it would be to code a tool that calls this "Horizontal Ray" tool and use it to create multiple rays from one mouse click on the chart. For example I would have these rays set up to all appear on the same Y axis, but at different offsets from the mouse click. The mouse click would snap to a bar high or low. If a high, the lines would be applied for a long entry, or if a low, a short entry. The rays would represent the entry, stop, and targets. I would want to have the colours to be user defined. If not overly complicated I would appreciate if you could outline how I would go about this? What ninja script references could you point me to? Any similar tools you know of already coded that I could look at for some ideas?
    Thanks,
    Ken.

    #2
    Hello Ken,

    While the difficulty level would be "Advanced", I think it would be possible to achieve.

    I have an example that converts a mouse click to a price and bar index -> time.


    From there, drawing a drawing object shouldn't be too difficult as you have the index of the bar which you can use .GetHigh() or .GetValue() to get a value at.

    Below are publicly available links to the help guide.

    Last edited by NinjaTrader_ChelseaB; 11-19-2017, 08:13 PM.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Rapine Heihei, Today, 08:25 PM
    0 responses
    2 views
    0 likes
    Last Post Rapine Heihei  
    Started by Rapine Heihei, Today, 08:19 PM
    0 responses
    1 view
    0 likes
    Last Post Rapine Heihei  
    Started by f.saeidi, Today, 08:01 PM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by Rapine Heihei, Today, 07:51 PM
    0 responses
    5 views
    0 likes
    Last Post Rapine Heihei  
    Started by frslvr, 04-11-2024, 07:26 AM
    5 responses
    96 views
    1 like
    Last Post caryc123  
    Working...
    X