Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Snap Mode

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

    Snap Mode

    Hello

    I am creating two custom DrawingTools and I have a problem with the snap mode.

    I am setting the Snap mode in OnRender method like this :

    ChartControlProperties myProperty = chartControl.Properties;
    myProperty.SnapMode = SnapMode.Bar;

    One DrawingTools needs to use Snap Mode Bar and the other Snap Mode Bar And Price.

    When I apply them one after the other the second drawing tool first Anchor point is always wrong ( the others being fine ).

    For example if I apply the DrawingTools SnapMode.Bar first
    when I apply the DrawingTools SnapMode.BarAndPrice the first anchor point will set the point as SnapMode Bar !

    I tried to set myProperty in MouseDown and OnRender without any success.

    Is there a way to set myProperty elsewhere so that the SnapMode will work properly for all anchor points.


    Thank you






    #2
    Hello blar58, thanks for writing in.

    The help guide page on ChartControl includes a warning about setting the properties through a script:


    Warning: These are UI properties that are designed to be set by a user. Attempting to modify these values through a custom script is NOT guaranteed to take effect.
    There's no guarantee that setting the SnapMode property will be set through the calling NinjaScript object, we recommend only setting these properties through the user interface.

    Please let me know if I can provide any further information.


    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    68 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    151 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    162 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    100 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    288 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X