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 Hwop38, 05-04-2026, 07:02 PM
      0 responses
      164 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      317 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      245 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      350 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      179 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X