Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Alerts and/or flatten open positions when tier-1 news are scheduled

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

    Alerts and/or flatten open positions when tier-1 news are scheduled

    I would like to develop a special indicator/strategy for NT7 that would alert me x hours before a tier-1 news regarding any of the major currencies, and I would also want this code to flatten any open positions x minutes before any tier-1 news.

    I am open to suggestions on how to solve this the best way, or if I need some more special feature regarding news that I have not thought of.

    It has happened once or twice that I missed important tier-1 news and the volatility made my positions go in big loss.

    Any ideas are welcome, not only code.
    Thank you!

    #2
    Hello Warcious,

    Thank you for your note.

    To have an alert that would trigger prior to news you’d have to define a list of dates/times considered tier 1 news. You then could have an indicator/strategy reference this list and if time equals that time minus x hours, trigger an alert.

    You could define this list of dates/times in a .txt file which you could then reference, a reference example for this can be found,


    To have the alert trigger x hours before those defined dates/times, you would need to manipulate the DateTime Objects, a reference example demonstrating that can be found here,


    Regarding that same logic also closing all positions/flattening everything, NinjaTrader does not support any method which does this. However there is a command which is unsupported and you could read about that on this thread.



    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by judysamnt7, 03-13-2023, 09:11 AM
    4 responses
    59 views
    0 likes
    Last Post DynamicTest  
    Started by ScottWalsh, Today, 06:52 PM
    4 responses
    36 views
    0 likes
    Last Post ScottWalsh  
    Started by olisav57, Today, 07:39 PM
    0 responses
    7 views
    0 likes
    Last Post olisav57  
    Started by trilliantrader, Today, 03:01 PM
    2 responses
    21 views
    0 likes
    Last Post helpwanted  
    Started by cre8able, Today, 07:24 PM
    0 responses
    10 views
    0 likes
    Last Post cre8able  
    Working...
    X