Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How change SnapMode

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

    How change SnapMode

    Hello support --

    I'd like to move object drawn by my script and like to change snapmode as soon as object drawn. How change snapmode programmatically.

    Thank you in advance.

    #2
    Hello Alex_bbfg,

    Thank you for your post.

    You can move a draw object drawn by your script by using the same tag name again to move that draw object.

    You can change the SnapMode, however, please note that this kind of coding is unsupported and would be able to offer full assistance.

    You will need to use the ChartControl function to access the SnapMode.

    Let me know if I can be of further assistance.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Hello Trader_Cal,

      thank you for your reply. I've found the following methods of snapmode

      public int SnapModeBarAndPrice { get; set; }
      Member of NinjaTrader.Data.ChartHotKeys

      public bool SnapModeBar { get; set; }
      Member of NinjaTrader.Gui.Chart.ChartControl

      public bool SnapModePrice { get; set; }
      Member of NinjaTrader.Gui.Chart.ChartData

      I'm not god at c# coding yet. Could you please give me advice which one to use to change snapmode. Sample of the code would be great.

      Regards.

      Comment


        #4
        Alex,

        ChartControl.SnapModeBar = true;

        There are others available that you would be able to find in the NinjaScript editor when doing ChartControl.
        The editor will bring up the intellisense for the ChartControl
        Cal H.NinjaTrader Customer Service

        Comment


          #5
          Cal

          it is realy simple. thank you very much!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          579 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          334 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
          554 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