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

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 geddyisodin, Today, 05:20 AM
      3 responses
      20 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by lorem, Today, 09:18 AM
      1 response
      4 views
      0 likes
      Last Post lorem
      by lorem
       
      Started by bmartz, Today, 09:30 AM
      0 responses
      3 views
      0 likes
      Last Post bmartz
      by bmartz
       
      Started by GussJ, 03-04-2020, 03:11 PM
      14 responses
      3,245 views
      0 likes
      Last Post GussJ
      by GussJ
       
      Started by ArkansasClint, Today, 09:28 AM
      0 responses
      1 view
      0 likes
      Last Post ArkansasClint  
      Working...
      X