Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Add an offset to Swing Indicator high&lows plots

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

    Add an offset to Swing Indicator high&lows plots

    Hi,

    I have started using Swing Indicator and I want to add an offset to plots (swing high/low) in order to visualize better the wicks (img1)

    I'm struggling but I can't find out where to add/modify that in the code

    In the end, I would like to add this property to the options panel just like appears in Wiseman fractal indicator (img2)

    I'll appreciate any guide or help

    BR
    Attached Files
    Last edited by ninjistu10; 10-26-2019, 07:48 AM.

    #2
    Hello, thanks for your post.

    You can apply offsets programmatically like so:

    Code:
    public class TestStrategy: Strategy
        {
            private Swing Swing1;
    
            protected override void OnStateChange()
            {
                ...
                else if (State == State.DataLoaded)
                {                
                    Swing1 = Swing(Close, 5);
                }
            }
    
            protected override void OnBarUpdate()
            {
    
                if ([B](Swing1.SwingHigh[0] + (5 * TickSize))[/B]  == <somenumber>)
                {
                }
    
            }
        }

    Comment


      #3
      Hi Chris,

      Thanks for your reply. My idea was to add offset property directly to indicator and implementating it in the code, like as Strength property. Finnaly I got it

      BR

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      83 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      45 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      65 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      68 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      57 views
      0 likes
      Last Post CarlTrading  
      Working...
      X