Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Opposite Trade

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

    Opposite Trade

    Dear NT,

    I've designed a relatively easy strategy.
    Let's say:

    Close0 >Close1, Enter Long
    Close0 < Close1, Enter Short

    If I enter long it will auto close out my short (if exists).

    How can I do the opposite to this?

    I've reverse engineered this strategy (below) and I get different execution times, which doesn't make sense as to me that is the complete inverse of the first strategy.

    Close0 >Close1, Enter Short
    Close0 < Close1, Enter Long

    If I wanted to do the complete opposite trade, is there a function in NT where it allows me to do so?

    Cheers,

    Z

    #2
    Hello Zhorny,

    With the logic here, your script would exit any long position and enter a short position if the close of the current bar is less than the close of the previous bar. It would also exit any short position and enter a long position if the close of the current bar is greater than the close of the previous bar.

    The script would likely flip back and forth from a short position to a long position repeatedly.

    I am not quite sure what you are asking when you say "If I wanted to do the complete opposite trade".

    Are you wanting a long position if the close of the current bar is less than the close of the previous bar?
    If so, just change the greater than and less than symbols in your logic.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by andrewtrades, Today, 04:57 PM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by chbruno, Today, 04:10 PM
    0 responses
    6 views
    0 likes
    Last Post chbruno
    by chbruno
     
    Started by josh18955, 03-25-2023, 11:16 AM
    6 responses
    436 views
    0 likes
    Last Post Delerium  
    Started by FAQtrader, Today, 03:35 PM
    0 responses
    7 views
    0 likes
    Last Post FAQtrader  
    Started by rocketman7, Today, 09:41 AM
    5 responses
    19 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X