• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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.

    Chris L.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by fredrikn, 05-08-2019, 04:01 AM
    17 responses
    668 views
    1 like
    Last Post emtrader  
    Started by zacharydw00, Yesterday, 10:19 PM
    0 responses
    3 views
    0 likes
    Last Post zacharydw00  
    Started by chafan11, Yesterday, 09:28 PM
    0 responses
    7 views
    0 likes
    Last Post chafan11  
    Started by GreenspanAlec, Yesterday, 05:32 PM
    0 responses
    7 views
    0 likes
    Last Post GreenspanAlec  
    Started by mrwarkhan, Yesterday, 03:45 PM
    0 responses
    18 views
    0 likes
    Last Post mrwarkhan  
    Working...
    X