Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Difference From Swing High and Low

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

    Difference From Swing High and Low

    I have a strategy that I would like to have exclude trades when the difference between the swing high and swing low is reduced to a particular level. I thought I could simply use swing high > swing low offset +x ticks as a condition, but this yields inconsistent results. I assume this is because the swing levels aren't being expressed as an integer? Any ideas how this could be done in strategy builder. I'm not a programmer so I'd like to avoid ninjascript if possible. Thank you for your help.

    #2
    Hi Matt, thanks for posting.

    If you need to get the mathematical difference of swing by subtracting the two values then the script will need to be unlocked. To see the results of a command in the builder, make a new set with no conditions and use the Misc>Print method to print out data. For example, you can print out the value of what you are using as a condition to see why the results are not consistent:

    Click image for larger version

Name:	Screenshot 2021-10-29 112141.png
Views:	151
Size:	255.9 KB
ID:	1176705

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    40 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    26 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    44 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    37 views
    0 likes
    Last Post CarlTrading  
    Working...
    X