NexusFi: Find Your Edge


Home Menu

 





Is this type of thing possible in NinjaTrader?


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one richw with 5 posts (0 thanks)
    2. looks_two traderwerks with 3 posts (3 thanks)
    3. looks_3 sam028 with 2 posts (2 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 4,576 views
    2. thumb_up 5 thanks given
    3. group 5 followers
    1. forum 10 posts
    2. attach_file 0 attachments




 
Search this Thread

Is this type of thing possible in NinjaTrader?

  #1 (permalink)
 
richw's Avatar
 richw 
Salt Lake City, UT
 
Experience: Advanced
Platform: NinjaTrader
Broker: NinjaTrader Brokerage
Trading: CL, ES, NQ, YM
Posts: 1,809 since May 2010
Thanks Given: 2,249
Thanks Received: 1,541

I want to develop a strategy for testing purposes. However, I have never programmed a strategy for NinjaTrader, except for a couple of simple strategies using the strategy wizard. I have an idea that I am testing for an automated strategy, but I am doing it by hand. So far the results are very promising, but I want to know if it is possible to program it for NinjaTrader so that I can do the analysis on lots of data more easily.

Can an NT strategy do this?

- When the current price is below an indicator, enter multiple buy orders at so many ticks apart and varying contract amounts below the indicator starting so many ticks below the indicator being monitored?
- Then, as the orders get filled, track the average price for all contracts in the current position and automatically move the target order(s) to be so many ticks above the price average and automatically keep the stop order so many ticks below the price average of the contracts in the current position.
- Then, based on how many contracts are in the position, automatically adjust the target order(s) to a different price above the position price average.
- When the target order has been filled, close out any other unfilled orders.

Visit my NexusFi Trade Journal Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Cheap historycal L1 data for stocks
Stocks and ETFs
REcommedations for programming help
Sierra Chart
MC PL editor upgrade
MultiCharts
About a successful futures trader who didn´t know anyth …
Psychology and Money Management
How to apply profiles
Traders Hideout
 
  #3 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,765 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,629


I'm not 100% sure to understand what you would like to do, but if you can describe the logic of a strategy, it's possible to code it.

Success requires no deodorant! (Sun Tzu)
Follow me on Twitter Reply With Quote
Thanked by:
  #4 (permalink)
 
richw's Avatar
 richw 
Salt Lake City, UT
 
Experience: Advanced
Platform: NinjaTrader
Broker: NinjaTrader Brokerage
Trading: CL, ES, NQ, YM
Posts: 1,809 since May 2010
Thanks Given: 2,249
Thanks Received: 1,541


Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #5 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,765 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,629

So yes, it's possible to code something like that.
Is it also possible to blow very quickly an account with this strategy ?
Absolutely !!!
To blow it more quickly, the idea is not to add a cars after each step, but X2 after each time.

Success requires no deodorant! (Sun Tzu)
Follow me on Twitter Reply With Quote
Thanked by:
  #6 (permalink)
 traderwerks   is a Vendor
 
Posts: 692 since Jun 2009
Thanks Given: 436
Thanks Received: 465


richwaters View Post
I want to develop a strategy for testing purposes. However, I have never programmed a strategy for NinjaTrader, except for a couple of simple strategies using the strategy wizard. I have an idea that I am testing for an automated strategy, but I am doing it by hand. So far the results are very promising, but I want to know if it is possible to program it for NinjaTrader so that I can do the analysis on lots of data more easily.

Can an NT strategy do this?

- When the current price is below an indicator, enter multiple buy orders at so many ticks apart and varying contract amounts below the indicator starting so many ticks below the indicator being monitored?
- Then, as the orders get filled, track the average price for all contracts in the current position and automatically move the target order(s) to be so many ticks above the price average and automatically keep the stop order so many ticks below the price average of the contracts in the current position.
- Then, based on how many contracts are in the position, automatically adjust the target order(s) to a different price above the position price average.
- When the target order has been filled, close out any other unfilled orders.

Yes it is possible. I coded something similar in NT6.5

Sam is right, unless you know what you are really doing, it is easy to blow out an account.

Math. A gateway drug to reality.
Reply With Quote
Thanked by:
  #7 (permalink)
 
richw's Avatar
 richw 
Salt Lake City, UT
 
Experience: Advanced
Platform: NinjaTrader
Broker: NinjaTrader Brokerage
Trading: CL, ES, NQ, YM
Posts: 1,809 since May 2010
Thanks Given: 2,249
Thanks Received: 1,541

Thanks guys. I know this is not how you want to do it, but I also do not want to give away the "secret sauce" at present. I just want to know if the technical ideas to make it happen are even possible. Then, I have to learn what I need to know to program it.

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #8 (permalink)
 traderwerks   is a Vendor
 
Posts: 692 since Jun 2009
Thanks Given: 436
Thanks Received: 465


richwaters View Post
I know this is not how you want to do it, but I also do not want to give away the "secret sauce" at present. I just want to know if the technical ideas to make it happen are even possible. Then, I have to learn what I need to know to program it or find partners.

The answer is yes .

Math. A gateway drug to reality.
Reply With Quote
Thanked by:
  #9 (permalink)
 
richw's Avatar
 richw 
Salt Lake City, UT
 
Experience: Advanced
Platform: NinjaTrader
Broker: NinjaTrader Brokerage
Trading: CL, ES, NQ, YM
Posts: 1,809 since May 2010
Thanks Given: 2,249
Thanks Received: 1,541

Is there anything you can tell me to point me in the direction of what I need to know or are you aware of a sample code that I could see that would have most of the elements I would need?

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #10 (permalink)
 traderwerks   is a Vendor
 
Posts: 692 since Jun 2009
Thanks Given: 436
Thanks Received: 465



richwaters View Post
Is there anything you can tell me to point me in the direction of what I need to know or are you aware of a sample code that I could see that would have most of the elements I would need?

The Ninjatrader site is a good place to start.

Just start coding and it comes quickly. I did something similar and it did not take long.

( BTW, I would stick to NT 7)

Math. A gateway drug to reality.
Reply With Quote
Thanked by:




Last Updated on February 19, 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