NexusFi: Find Your Edge


Home Menu

 





Custom Strategy with Money Mangement


Discussion in NinjaTrader

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




 
Search this Thread

Custom Strategy with Money Mangement

  #1 (permalink)
 
fesx's Avatar
 fesx 
Georgia
 
Experience: Intermediate
Platform: Ninja
Broker: AMP/CQG
Trading: ZN, ES, FGBL, FESX
Posts: 133 since Jul 2009
Thanks Given: 874
Thanks Received: 113

Hi,

We're trying to write a strategy that would allow us to use a similar algorithm found in the ATM Strategy but with the ability to backtest on historical data. Writing the code (i.e. C#) is not an issue, what's an issue is understanding how it all should tie in. Here's what I would like to have:

1) If some condition is met then go long. Set some variable to the low and high value to exit. For example -2 ticks to cut our loss and +4 to make a profit.
a) If already long and we reached our profit target we should raise the profit bar and change the loss bar. For example -1 tick for a loss and +2 for a profit.
b) If already long but below or above these limits we should exit the long.

We would have something similar for the short part. The problem we're having is figuring out where to put all this logic (OnBarUpdate or OnExecution) and what methods we should use for enter/exit trades. There are 4 variations only on exiting the long alone (ExitLong, ExitLongLimit, ExitStop, ExitStopLimit). Which one do we need to use?

The way I understand the system so far, we should be able to control the whole process in bar-by-bar. Ideally, from my point of view, we should decide manually when to enter or exit a trade, without relying on the xxxLimit magic

I realize this is all vague, and it's because we're missing many pieces of the puzzle. Any help is appreciated.

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Increase in trading performance by 75%
The Elite Circle
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Exit Strategy
NinjaTrader
ZombieSqueeze
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
36 thanks
Tao te Trade: way of the WLD
24 thanks
Spoo-nalysis ES e-mini futures S&P 500
20 thanks
Bigger Wins or Fewer Losses?
19 thanks
GFIs1 1 DAX trade per day journal
16 thanks
  #2 (permalink)
 
sefstrat's Avatar
 sefstrat 
Austin, TX
 
Experience: Advanced
Platform: NT/Matlab
Broker: Interactive Brokers
Trading: FX majors
Posts: 285 since Jun 2009
Thanks Given: 20
Thanks Received: 768

you will want to use the custom IOrder interface to handle this (ie OnOrderUpdate and OnExecution)

See the samples on Ninja forum of how to do the basics with IOrder, but be forewarned its much harder than you would think it should be due to bugs and stupid design decisions in Ninja core.

Reply With Quote




Last Updated on October 5, 2009


© 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