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

High and Low Water Mark Indicator For Each Instrument and Account for the Day?

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

    High and Low Water Mark Indicator For Each Instrument and Account for the Day?

    Hi:

    Where could I find a:

    High and Low Water Mark Indicator For Each Instrument and Account for the Day?

    All it would do is plot or print on the chart what the high and low P&L (unrealized, realized, Profitloss and/or all 3 as selectable options) would be nice.

    Any place here on NT or other resources anyone know about?

    If not, is anyone game to potentially create (I think it to be a worthy indicator if folks agree)...

    For NT 7...
    Last edited by birdog; 05-19-2014, 09:05 AM.

    #2
    Hello birdog,

    I am not aware of an Indicator that would do something like this but it should be possible to do. There is not a supported way of getting an Account inside of an Indicator but you may try to get the Account by doing something like the following:

    private Account account = null;
    private string accountName;

    protected override void OnStartUp()
    {
    //have to reinitialze if connection gets lost
    NinjaTrader.Cbi.Globals.Connections.ConnectionStat us += new ConnectionStatusEventHandler(OnConnection);

    account = NinjaTrader.Cbi.Globals.Accounts.FindByName(accoun tName);

    //return if cannot find the account
    if (account == null)
    {
    DrawTextFixed("msg", "Could not retrieve the account", TextPosition.BottomRight);
    return;
    }
    else
    {
    // Do something
    }
    }
    JCNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by awwenzovs, Today, 08:03 AM
    1 response
    6 views
    0 likes
    Last Post bltdavid  
    Started by nicthe, Today, 07:38 AM
    1 response
    12 views
    0 likes
    Last Post bltdavid  
    Started by michi08, Today, 08:51 AM
    1 response
    4 views
    0 likes
    Last Post bltdavid  
    Started by algospoke, 02-19-2024, 03:25 PM
    4 responses
    36 views
    0 likes
    Last Post gummybar  
    Started by gummybar, 02-14-2024, 03:22 PM
    2 responses
    35 views
    0 likes
    Last Post gummybar  
    Working...
    X