Custom Strategy with Money Mangement - NinjaTrader Programming | futures trading

Go Back

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming

Custom Strategy with Money Mangement
Started:October 4th, 2009 (05:25 PM) by fesx Views / Replies:952 / 1
Last Reply:October 5th, 2009 (09:58 AM) Attachments:0

Welcome to

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple, and we will never resell your private information.

-- Big Mike

Thread Tools Search this Thread

Custom Strategy with Money Mangement

Old October 4th, 2009, 05:25 PM   #1 (permalink)
Elite Member
Futures Experience: Intermediate
Platform: Ninja
Broker/Data: Mirus/Zen Fire
Favorite Futures: ZN, ES, FGBM, ZC
fesx's Avatar
Posts: 110 since Jul 2009
Thanks: 587 given, 96 received

Custom Strategy with Money Mangement


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.

Reply With Quote

Old October 5th, 2009, 09:58 AM   #2 (permalink)
Elite Member
Austin, TX
Futures Experience: Advanced
Platform: NT/Matlab
Broker/Data: Interactive Brokers
Favorite Futures: FX majors
sefstrat's Avatar
Posts: 285 since Jun 2009
Thanks: 20 given, 735 received

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

Reply > Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming > Custom Strategy with Money Mangement

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

An Afternoon with FIO trader bobwest

Elite only

NinjaTrader 8: Programming Profitable Trading Edges w/Scott Hodson

Elite only

Anthony Drager: Executing on Intermarket Correlations & Order Flow, Part 2

Elite only

Adam Grimes: Five critically important keys to professional trading

Elite only

Machine Learning Concepts w/FIO member NJAMC

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Dec 1

NinjaTrader 8: Features and Enhancements

Dec 6

Similar Threads
Thread Thread Starter Forum Replies Last Post
Combined auto-entry and manual-exit strategy as a money management device nanobiotech Psychology and Money Management 10 January 31st, 2015 07:51 AM
Custom NT indicator has stopped auto-loading with strategy, cache? drwylde NinjaTrader 1 July 9th, 2011 08:11 PM
IB and trade mangement eloso Brokers and Data Feeds 3 July 10th, 2010 04:55 AM

All times are GMT -4. The time now is 03:03 AM.

Copyright © 2016 by 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.
no new posts

Page generated 2016-10-25 in 0.06 seconds with 19 queries on phoenix via your IP