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 maybeimnotrader, Yesterday, 05:46 PM
    3 responses
    23 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by adeelshahzad, Today, 03:54 AM
    5 responses
    32 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by stafe, 04-15-2024, 08:34 PM
    7 responses
    32 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by merzo, 06-25-2023, 02:19 AM
    10 responses
    823 views
    1 like
    Last Post NinjaTrader_ChristopherJ  
    Started by frankthearm, Today, 09:08 AM
    5 responses
    23 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Working...
    X