Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

New strategy idea

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

    New strategy idea

    So, here is the idea:

    Most people use dollar cost averaging in their 401k and have % of stocks and % of Bonds. But, they let their entire portfolio bounce around with the market.
    My idea is to lock in the upside.

    For example,

    A person puts in $1000 into their 401k every two weeks. Let say they buy the same ETF (SPY). But, they put in a trailing stop of .50 on each share.

    They buy $1000 of SPY @ $10 a share, next paycheck $1000 of SPY @ $20 and so on and so forth.

    Fast forward 8 paychecks. You buy the $1000 of SPY stock at $50 but, the market turns down and you are out of your entire position at 49.50 a share. But, if the stock returns to 49.50 you buy back again at it goes up to 56. But, the market tanks for a long time. You were out of the position at 55.50. But, new money from your paycheck is buying new shares on the way down, let say it hits $15 a share. You lose .50 a share on each batch of stock you buy on the way down. But, as the stock recovers, you buy back each batch of stock at the price you sold it on the way up! I will have to play with a few variables since stock can open up or down from the previous close. And I have to take expenses into consideration.

    How can I test this in Ninja Trader? Thxs



    #2
    Hi blittlej thanks for your post.

    If you need account data I would need to recommend you use NinjaTrader 8 as we added the Account class where you can pull values from your live account in NinjaScript. The strategy itself as far as implementation goes, this type of project would be best completed by one well versed in NinjaScript and C# programming. To test it, the best thing would be to use the Playback connection to find a data window that matches the price movement you are looking for, and test by running your strategy over this window over and over.

    Please let me know if I can assist any further.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    553 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    324 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    100 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    543 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    546 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X