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

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 helpwanted, Today, 03:06 AM
          1 response
          12 views
          0 likes
          Last Post sarafuenonly123  
          Started by Brevo, Today, 01:45 AM
          0 responses
          9 views
          0 likes
          Last Post Brevo
          by Brevo
           
          Started by aussugardefender, Today, 01:07 AM
          0 responses
          5 views
          0 likes
          Last Post aussugardefender  
          Started by pvincent, 06-23-2022, 12:53 PM
          14 responses
          242 views
          0 likes
          Last Post Nyman
          by Nyman
           
          Started by TraderG23, 12-08-2023, 07:56 AM
          9 responses
          387 views
          1 like
          Last Post Gavini
          by Gavini
           
          Working...
          X