Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

2 trades

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

    2 trades

    Hello,

    I tried to find out without success how I can determine in my script-coded-strategy that strategy takes only 2 trades once conditions are filled. I tried also with variables.

    EG when MACD is falling there should be only 2 entries short and when rising there should be only 2 entries long (not important if 1,2,3 or more contracts per entry)

    I don´t mean EntriesperDirection and EntryHandling. This is clear of course.

    Thanks
    Tony

    #2
    tonynt,

    I am happy to assist.

    You could use a flag, such as one set to -1 for short, 0 for flat, 1 for long, and then use it as a filter for your entrance conditions. You could use standard C# counters as well. It is up to you how to increment and reset them.

    Here is a thread where someone wanted something similar.



    Please let me know if I can assist further.
    Adam P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    20 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    120 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    174 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    92 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    134 views
    0 likes
    Last Post cmoran13  
    Working...
    X