Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Paint unmovable shapes

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

    Paint unmovable shapes

    Hi,

    I am new to Ninja and NinjaScript, and I have checked in the 6.5 documentation but could not so far find an answer or example for the task I want to do:

    My simple MA crossover strategy places drawing tools over the chart when a signal is produced, for example:

    Code:
           
    protected override void OnBarUpdate()
    {
         if (CrossAbove(EMA(Fast), EMA(Slow), 1))
         {
             DrawVerticalLine("My Line" + CurrentBar, 0, Color.Gainsboro, DashStyle.Solid, 5);
    ............
    .......etc
    However the produced VerticalLine-s over the chart can be activated with a single mouse click. I also saw the same behavior with HeikinAshi indicator (all parts of it are movable by the mouse).

    Is there a way that I could make the line "un-clickable" i.e. to prevent it from being accidentally dragged?

    Also, the lines are drawn over the bars, and completely cover them, which is not quite acceptable. How to overcome this?


    If these tasks can not be achieved by placing drawing objects could anyone point me to example(I have some programming skills) where I can draw directly on chart's background?

    Any help is really very much appreciated!
    chris

    #2
    Chris,

    To achieve this you will need to use NT7 and lock the object you have set.

    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thank you Josh for your prompt response!

      I will get NinjaTrader 7 and rewrite my strategy for it.

      BestRegards,
      chris

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      574 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      332 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      553 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      551 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X