NexusFi: Find Your Edge


Home Menu

 





Trailing Stop Loss and Reverse


Discussion in NinjaTrader

Updated
    1. trending_up 5,045 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread

Trailing Stop Loss and Reverse

  #1 (permalink)
shergenr
Memphis,TN
 
Posts: 3 since Jan 2011
Thanks Given: 0
Thanks Received: 0

I'm not a programmer, but have some skills in this area and have been helping a trader develop a custom indicator and now I am trying to hook it up to an automated strategy to backtest it. The strategy reverses in one of two ways: (1) a signal is violated during a bar and an order to reverse is submitted (EnterLong/Short @ market) the next day or (2) the bar moves through a stop loss point and triggers a stop and reverse (these are typically 5-10 ticks from our signals). Along the way, the stop loss price gets modified as the trend lengthens.

I have been advised to use unmanaged orders and now (by ninja support) quasi-managed orders (highly overloaded and provided an orderid ...e.g., .stopLoss = EnterLongStop(.........). Within OnBarUpdate I am evaluating incoming bars against my indicator values and trading rules and enter a first position, reverse a position, or amend a stop/reverse order. I am creating the stop/reverse order in OnExecutionUpdate. I have some processing going on in OnOrderUpdate (primarily setting orderids to null for unfilled or cancelled orders).

Everything seems to work through the first pair of EnterLong or EnterShort and EnterShort/LongStops, after that first entry and reverse everything seems to fall apart. The tendency is to get gaps where for some reason instead of exiting the position and reentering in the other direction, it simply exits.... Does anyone have any suggestions for coding this? Should I go back to coding unmanaged order entries? Any advice?

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
About a successful futures trader who didnt know anythin …
Psychology and Money Management
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
What broker to use for trading palladium futures
Commodities
MC PL editor upgrade
MultiCharts
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
  #3 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,463 since Jun 2009
Thanks Given: 33,239
Thanks Received: 101,662


Unmanaged orders == major experience required.

If you truly need unmanaged orders, you would probably benefit from hiring the strategy done by an experienced NT programmer. Then if you want to learn to program, you can use this as a foundation going forward.

Mike



Join the free Markets Chat beta: one platform, all the trade rooms!

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #4 (permalink)
shergenr
Memphis,TN
 
Posts: 3 since Jan 2011
Thanks Given: 0
Thanks Received: 0

Thanks Mike. Yes the thought of boot-strapping had occured to me as I have used it often. In fact, my plan was to get the backtesting done and then sub it out for the automated trading. I was hoping that the real complexity of unmanaged orders lies in the error and message trapping required for automated trading and not the mere submission of orders into a historical backtest.

Since I had been advised by NT Support that alternatively either managed or unmanaged orders would work, I was hoping that someone could confirm which was really true.

Reply With Quote




Last Updated on March 1, 2011


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts