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 sjsj2732, 03-23-2026, 04:31 AM
    0 responses
    154 views
    0 likes
    Last Post sjsj2732  
    Started by NullPointStrategies, 03-13-2026, 05:17 AM
    0 responses
    356 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    393 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    182 views
    1 like
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    138 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Working...
    X