Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Two independent strategies on the same futures contract

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

  • NinjaTrader_Emily
    replied
    Hello simple_goodoboy,

    Thank you for your note.

    I wouldn't be able to say if that is enough info or not, as that would be up to the New Accounts team. That is a pretty thorough description and you could certainly send that through as your reason. The proper teams will follow up with you if they need any other information from you.

    Please feel free to reach out with any additional questions or concerns.

    Leave a comment:


  • simple_goodoboy
    replied
    Originally posted by NinjaTrader_Emily View Post

    Hello simple_goodoboy,

    Thank you for your patience.

    For an additional explanation (if it is needed) regarding what happens when running multiple strategies on the same instrument/account, please see the following post from my colleague:


    It is not uncommon for users to request an additional account in order to run a separate automated strategy. Each sub-account request must be reviewed and approved. A sub-account may be requested from within the client portal per the following guide:
    • https://support.ninjatrader.com/s/ar...language=en_US
      • Note: Please include as many details as possible in the "Reason" section in order to offer sufficient information to aid in the decision to approve the request or not. We suggest that you err on the side of too many details, such as even explaining a little bit about what the separate strategies do and why they may not be on the same account at the same time.
    Please let us know if we may be of further assistance.
    Good Morning Emily,

    Thank you for the response.

    My goal is to run a Diversified ES and NQ automated trading systems portfolio.

    4 systems on the ES.
    4 systems on the NQ.

    The ES systems will take Long and Short trades.
    The NQ systems will take Long and Short trades.

    The ES systems will take trades on different time frames and bar types.
    The NQ systems will take trades on different time frames and bar types.

    In the future I plan to add more instruments to each account in CL, RTY, and GC.

    To avoid any order issues and closing positions that will occur with running the 8 systems on 1 account, I would like to request 4 more accounts to be open to run my systems for my portifilo, this will prevent order issues, mistaken loss of money, and proper risk, position sizing, and money management issues and ease my work load. I really need these accounts.

    My main account I already have will be used for my manual/discretionary trading I normally do.


    Is this enough detail, or should I provide more?

    Thank you,

    Leave a comment:


  • NinjaTrader_Emily
    replied
    Originally posted by simple_goodoboy View Post

    Good Morning bltdavid,

    LMFAO HAHAHHAHAHAHAHAHHAHAHA Thank you for the laugh.

    That is the best laugh I had in a very long time.

    I perfectly understand everything you are saying.

    Getting 5 independent accounts resolves the problem I am having. Then I can run 1 ES strategy and 1 NQ
    strategy pair per account. So 5 independent accounts.

    How many NT8 Sub Accounts can I create?

    Thank you​
    Hello simple_goodoboy,

    Thank you for your patience.

    For an additional explanation (if it is needed) regarding what happens when running multiple strategies on the same instrument/account, please see the following post from my colleague:


    It is not uncommon for users to request an additional account in order to run a separate automated strategy. Each sub-account request must be reviewed and approved. A sub-account may be requested from within the client portal per the following guide:
    • https://support.ninjatrader.com/s/ar...language=en_US
      • Note: Please include as many details as possible in the "Reason" section in order to offer sufficient information to aid in the decision to approve the request or not. We suggest that you err on the side of too many details, such as even explaining a little bit about what the separate strategies do and why they may not be on the same account at the same time.
    Please let us know if we may be of further assistance.

    Leave a comment:


  • simple_goodoboy
    replied
    Originally posted by bltdavid View Post

    Let's see ... running 5 strategies on 1 instrument,
    where each strategy can go either long or short?

    That's kinda obvious,
    you would need 5 different accounts.

    Otherwise you're asking for trouble as the single
    account position will quickly become out of sync
    when opposite direction strategy positions are
    taken.

    ​​

    Not unless you setup some kind of lock file, otherwise
    you need 5 accounts, then run 1 ES strategy and 1 NQ
    strategy pair per account.

    Are the source codes for these strategies under your
    direct control? If so, maybe you could combine the
    5 different strategies into one grand strategy.



    2 or 3 Long positions on an instrument is fine, but as
    soon as one of the strategies opens a Short position
    on that instrument, you're account position will become
    massively screwed, er, I mean, 'out-of-sync'.

    How so?
    Because your broker only sees BUY/SELL orders.
    Let's say you're 'LONG 1' in each of the 3 ES strats,
    no prob, these are actually handled separately just
    fine, but then a 4th strat does a 'SELL 3' to enter a
    SHORT position -- well, guess what, your real-money
    live account position back at the broker is now flat.

    Yep.
    Flatter than a dead beetle in a wagon rut.
    Flatter than a pancake dropped from a 100-story building.
    Flatter than the smooth surface of the Webb telescope.
    Ok, maybe not the Webb telescope ... just the Hubble.

    You get my point.

    Your 4 strats still run and do their thing, but your true
    account position is instantly 'out of sync' -- and you'll
    probably lose lots of moo-lah as soon as the 4 strats
    exit their now phantom positions.



    Who knows?

    You've failed to say how much $$$ you have in your
    account.



    Seriously, that's a risk management question that is
    between you, your broker, and your wallet.

    NinjaTrader Brokerage reps will never answer broker
    related questions on these forums. These forums are
    only for support of the software platforms.

    Study more about Account Position vs Strategy Position
    on these forums and in the help guide. Lots of good info
    on these topics awaits you.

    Just my 2˘.

    Good Morning bltdavid,

    LMFAO HAHAHHAHAHAHAHAHHAHAHA Thank you for the laugh.

    That is the best laugh I had in a very long time.

    I perfectly understand everything you are saying.

    Getting 5 independent accounts resolves the problem I am having. Then I can run 1 ES strategy and 1 NQ
    strategy pair per account. So 5 independent accounts.

    How many NT8 Sub Accounts can I create?

    Thank you​

    Leave a comment:


  • bltdavid
    replied
    Originally posted by simple_goodoboy View Post
    I have a serious questions. I am Algo trader with 5 ES strategies and 5 NQ strategies. Each strategy goes short and long. Diversified Portfolio.

    I have 1 NT8 Account.
    Let's see ... running 5 strategies on 1 instrument,
    where each strategy can go either long or short?

    That's kinda obvious,
    you would need 5 different accounts.

    Otherwise you're asking for trouble as the single
    account position will quickly become out of sync
    when opposite direction strategy positions are
    taken.

    ​​
    Originally posted by simple_goodoboy View Post
    1. Can I put 5 ES strategies and 5 NQ strategies on 1 account and run them all?
    Not unless you setup some kind of lock file, otherwise
    you need 5 accounts, then run 1 ES strategy and 1 NQ
    strategy pair per account.

    Are the source codes for these strategies under your
    direct control? If so, maybe you could combine the
    5 different strategies into one grand strategy.

    Originally posted by simple_goodoboy View Post
    ​2. Can NT8 allow for 2 or 3 Long ES positions from each strategy on the one account? There may be times where each strategy may have need to execute a short or long position.
    2 or 3 Long positions on an instrument is fine, but as
    soon as one of the strategies opens a Short position
    on that instrument, you're account position will become
    massively screwed, er, I mean, 'out-of-sync'.

    How so?
    Because your broker only sees BUY/SELL orders.
    Let's say you're 'LONG 1' in each of the 3 ES strats,
    no prob, these are actually handled separately just
    fine, but then a 4th strat does a 'SELL 3' to enter a
    SHORT position -- well, guess what, your real-money
    live account position back at the broker is now flat.

    Yep.
    Flatter than a dead beetle in a wagon rut.
    Flatter than a pancake dropped from a 100-story building.
    Flatter than the smooth surface of the Webb telescope.
    Ok, maybe not the Webb telescope ... just the Hubble.

    You get my point.

    Your 4 strats still run and do their thing, but your true
    account position is instantly 'out of sync' -- and you'll
    probably lose lots of moo-lah as soon as the 4 strats
    exit their now phantom positions.

    Originally posted by simple_goodoboy View Post
    ​3. Can each strategy run up to 100 ES or 50 NQ contracts? Or does the entire account allow for 100 ES or 50 NQ contracts executed at a time.
    Who knows?

    You've failed to say how much $$$ you have in your
    account.



    Seriously, that's a risk management question that is
    between you, your broker, and your wallet.

    NinjaTrader Brokerage reps will never answer broker
    related questions on these forums. These forums are
    only for support of the software platforms.

    Study more about Account Position vs Strategy Position
    on these forums and in the help guide. Lots of good info
    on these topics awaits you.

    Just my 2˘.

    Last edited by bltdavid; 07-25-2023, 08:29 PM.

    Leave a comment:


  • simple_goodoboy
    replied
    Hello Everyone,

    I have a serious questions. I am Algo trader with 5 ES strategies and 5 NQ strategies. Each strategy goes short and long. Diversified Portfolio.

    I have 1 NT8 Account.

    Questions please:

    1. Can I put 5 ES strategies and 5 NQ strategies on 1 account and run them all?
    2. Can NT8 allow for 2 or 3 Long ES positions from each strategy on the one account? There may be times where each strategy may have need to execute a short or long position.
    3. Can each strategy run up to 100 ES or 50 NQ contracts? Or does the entire account allow for 100 ES or 50 NQ contracts executed at a time.

    Thank you,


    Leave a comment:


  • bltdavid
    replied
    Some final thoughts ...

    I think you should start with Idea 1 -- then branch out from there.

    If you implement Idea 2 or 3, you should probably initialize by reading all
    parameters from the Ini file (if it exists) for their current values. Then your
    solution lets the user change these values as needed, and finally it rewrites
    the Ini file completely with the new (possibly updated) values.

    And there ya go. This means that Idea 1 (giving each user an initial bare
    bones Ini file with all parameters defined as 0) is actually a really good idea.

    Your update approach would just be updating this bare bones file (or the
    changed values, if the user previously edited/changed them). If the Ini file
    is missing, then your solution would just create a new one.

    A bare bones Ini file is a great way for a user to get started. They'd either
    edit it themselves, if they feel so inclined, or fire up your handy dandy GUI
    solution and change the global values that way. They could go back & forth,
    hand editing one day but using your tool the next day, and vice versa.

    -=o=-

    One more thing.

    Note the code solution I gave you has an important feature that could be
    quite the lovely aid -- it automatically reads the Ini file for the current value
    of the global setting any time OnAccountItemUpdate is executed

    This means the user could update their global settings, either using Notepad
    or via your GUI solution, and the global settings should update in real-time.

    Real-time? Yep.
    The new values will immediately take effect the next time the account's PnL
    is updated (aka, the next time a profit target is reached and/or a position
    goes flat).

    How does that happen?
    Every time the account's PnL changes, OnAccountItemUpdate gets executed
    inside all running strategies, all at the same time, and poof, the new global
    Ini parameter values will be re-read for the AcctMaxDailyLoss check.

    Pretty cool, eh?

    Leave a comment:


  • bobperez
    replied
    Originally posted by bltdavid View Post

    Well, there's the rub. If you want an input form, write one.

    You never revealed you might be a vendor with hundreds of customers.

    ​At some point, I agree, a couple of hundred users for your strategies can
    certainly create issues. If you have enough customers, it certainly sounds
    justifiable to create a font-end interface to the Ini file.

    As far as support goes, how often will customers be changing parameters
    in your Ini file? I mean, something like AcctMaxDailyLoss is not something
    you'd expect would be changed all that often, right?

    Anyway, you'll have to decide for yourself what to do, esp with regards to
    handling a couple of hundred users.

    ​-=o=-

    My 'external file' suggestion is just one way to go.

    How to mitigate your complaints?

    Idea 1:
    You can always create a bare bones Ini file with all the parameters already
    defined (and set to 0) and all you'd have to do is have your installation/installer
    drop this bare bones file into the correct location. It sits there and is benign
    until the user wants to setup account wide global 'Daily Max Loss' settings,
    upon which they'd have to follow your procedures on how to locate this
    file and and which parameters to edit. But at least you gave them a bare
    bones file to edit, and they didn't have to create it completely from
    scratch.

    You should adopt the convention that parameters defined as '0' don't do
    anything in the code, that way you can define them as 0 in the bare bones
    Ini file your install procedure sets up for each customer.

    If you really have lots of customers, you'll probably want to create a folder
    exclusive to just your stuff and put the Ini file there,

    NinjaTrader 8\BobStuff\MySettings.ini

    Idea 2:
    Create a separate GUI program that prompts the user for all account global
    settings, then have this GUI program create/update the Ini file.

    Idea 3:
    Write a special AddOn or Indicator that prompts for all global settings, and
    have it create/update the Ini file.

    Thank you Bltdavid. Good ideas!! I'll implement one of them!

    BobPerez

    Leave a comment:


  • bltdavid
    replied
    Originally posted by bobperez View Post
    Ok, we must admit it's not the most user-friendly way to have users define these settings. They need to find the Ninjatrader 8 folder, look for the file, and write the information without messing anything up.

    [Settings]
    MaxAcctDailyLoss =
    MaxAcctDailyProfit =

    Although it may be easy for experienced users, this process is what I was thinking should be done from some input form, and then processed automatically to relieve the user from doing it manually. The strategy may be used by hundreds of people. I can't imagine how many will ask for support.
    Well, there's the rub. If you want an input form, write one.

    You never revealed you might be a vendor with hundreds of customers.

    ​At some point, I agree, a couple of hundred users for your strategies can
    certainly create issues. If you have enough customers, it certainly sounds
    justifiable to create a front-end interface to the Ini file.

    As far as support goes, how often will customers be changing parameters
    in your Ini file? I mean, something like AcctMaxDailyLoss is not something
    you'd expect would be changed all that often, right?

    Anyway, you'll have to decide for yourself what to do, esp with regards to
    handling a couple of hundred users.

    ​-=o=-

    My 'external file' suggestion is just one way to go.

    How to mitigate your complaints?

    Idea 1:
    You can always create a bare bones Ini file with all the parameters already
    defined (and set to 0) and all you'd have to do is have your installation/installer
    drop this bare bones file into the correct location. It sits there and is benign
    until the user wants to setup account wide global 'Daily Max Loss' settings,
    upon which they'd have to follow your procedures on how to locate this
    file and which parameters to edit. But at least you gave them a bare
    bones file to edit, and they didn't have to create it completely from
    scratch.

    You should adopt the convention that parameters defined as '0' don't do
    anything in the code, that way you can define them as 0 in the bare bones
    Ini file your install procedure sets up for each customer.

    If you really have lots of customers, you'll probably want to create a folder
    exclusive to just your stuff and put the Ini file there,

    NinjaTrader 8\BobStuff\MySettings.ini

    Idea 2:
    Create a separate GUI program that prompts the user for all account global
    settings, then have this GUI program create/update the Ini file.

    Idea 3:
    Write a special AddOn or Indicator that prompts for all global settings, and
    have it create/update the Ini file.

    Last edited by bltdavid; 07-26-2023, 09:38 PM. Reason: typo

    Leave a comment:


  • bobperez
    replied
    Originally posted by bltdavid View Post

    Exactly.

    By using an external file, these settings are user-defined,
    and they are not hard-coded into any one strategy.



    With their fingers, using Notepad.



    Ok, we must admit it's not the most user-friendly way to have users define these settings. They need to find the Ninjatrader 8 folder, look for the file, and write the information without messing anything up.

    [Settings]
    MaxAcctDailyLoss =
    MaxAcctDailyProfit =

    Although it may be easy for experienced users, this process is what I was thinking should be done from some input form, and then processed automatically to relieve the user from doing it manually. The strategy may be used by hundreds of people. I can't imagine how many will ask for support.

    Leave a comment:


  • bltdavid
    replied
    Originally posted by bobperez View Post
    I am not an advanced programmer, and the idea is to use one account, so I guess I'll have to study how to use the lock file.

    Regarding the Ini file, The only issue I see is that the Account limits(Daily Profit/Loss) should be user-defined, not hard-coded.
    Exactly.

    By using an external file, these settings are user-defined,
    and they are not hard-coded into any one strategy.

    Originally posted by bobperez View Post
    How do you suggest the user defines those limits and then write them to the Ini file?
    With their fingers, using Notepad.




    Leave a comment:


  • bltdavid
    replied
    Hmm, just a minor advisement here on parameter names
    inside the Ini configuration file. This might help you.

    I checked my code, and I actually use these parameter
    names for the account settings,

    AcctMaxDailyLoss
    AcctMaxDailyProfit


    which (for me) jives quite well with the per-strategy settings,
    which uses these parameter names,

    MaxDailyLoss
    MaxDailyProfit


    -=o=-

    See that?
    By adding the 'Acct' prefix, I could make any per-strategy setting
    into a 'global' account setting -- of course, I had to add the code
    to perform the 'global' account check to every strategy -- but using
    the parameter naming convention of an 'Acct' prefix to symbolize
    a global setting worked out very well.

    My point is:
    A good naming convention can be very helpful.

    Just my 2˘.


    Leave a comment:


  • bobperez
    replied
    Originally posted by bltdavid View Post

    A lock file is advanced programming, and unless you
    know C# well, it may be a lot easier to just use two
    different accounts.

    Thanks again. Bltdavid. I am not an advanced programmer, and the idea is to use one account, so I guess I'll have to study how to use the lock file.

    Regarding the Ini file, The only issue I see is that the Account limits(Daily Profit/Loss) should be user-defined, not hard-coded. How do you suggest the user defines those limits and then write them to the Ini file?

    BobPerez

    Leave a comment:


  • bltdavid
    replied
    Originally posted by bobperez View Post
    Regarding the account's Market Position, what I'm really trying to understand is how to add code, perhaps to each strategy, to recognize if any one of the strategy instances has a market.position != flat, the rest of the strategy instances that are flat may not submit orders until the account is flat.
    No problem, I think my answer about using a lock file
    criss-crossed with your reply.

    In the past, I've used the lock file approach with great success.
    I think it works very well.

    Btw, I always locate the lock file in the 'NinjaTrader 8\tmp' folder.

    Why is that?
    Because the tmp folder automatically gets cleared every time
    NinjaTrader starts up.


    Leave a comment:


  • bobperez
    replied
    Thank you very much, Bltdavid. The steps are very clear. The only issue I see is that the Account limits(Daily Profit/Loss) should be user-defined, not hard-coded. How do you suggest the user defines those limits and write them to the Ini file?

    Regarding the account's Market Position, what I'm really trying to understand is how to add code, perhaps to each strategy, to recognize if any one of the strategy instances has a market.position != flat, the rest of the strategy instances that are flat may not submit orders until the account is flat.

    BobPerez
    Last edited by bobperez; 07-17-2023, 05:45 PM.

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by CarlTrading, 05-11-2026, 05:56 AM
0 responses
52 views
0 likes
Last Post CarlTrading  
Started by CarlTrading, 05-10-2026, 08:12 PM
0 responses
30 views
0 likes
Last Post CarlTrading  
Started by Hwop38, 05-04-2026, 07:02 PM
0 responses
194 views
0 likes
Last Post Hwop38
by Hwop38
 
Started by CaptainJack, 04-24-2026, 11:07 PM
0 responses
355 views
0 likes
Last Post CaptainJack  
Started by Mindset, 04-21-2026, 06:46 AM
0 responses
274 views
0 likes
Last Post Mindset
by Mindset
 
Working...
X