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

Money Management Coding

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

    Money Management Coding

    Can a script be created that will allow one to enter the number of ticks risked and have the contracts for any new open position and the stop to be automatically entered upon opening a trade? For example:

    1. A registry entry will hold the risk parameter (let's make it simple and say some % of account value).
    2. A registry entry will holda benchmark price with which to determine how faraway the currentmarket price is. Let's say it has been fluctuating between 4 and 10 ticks from the benchmark price over the last 5 min. Right now it's 6 ticksandashort is entered.
    3. When the short is entered, Ninja Trader will consider the account size,the % risk and the distance the market is from the entry price to buy that specific number of contracts.

    THEN

    Is it possible to create a script that runs as a "pre-packaged" profit target that takes into account money management? For example:

    1.Enter a short position with a stop in the market above current price.
    2. The market moves down and reachesa first profit target.
    3. Based on the closed profit on the trade in Step 2, move the initial stop down to only risk a specific % of remaining open profit.

    Can NT do something like this, and if so, how could it be accomplished?

    Thanks
    Will

    #2
    imported post

    Hi,

    I will answer your question in several parts.

    1) We do not provide money management methods out of the box. This is on our list for the next major development cycle.

    2) You could code all of this yourself. NinjaScript is just a library on top of the C# language.If you can code it, it will work. We do not have any sample code for this.

    Ray
    RayNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    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
    21 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Started by jeronymite, 04-12-2024, 04:26 PM
    3 responses
    43 views
    0 likes
    Last Post jeronymite  
    Working...
    X