NexusFi: Find Your Edge


Home Menu

 





New Strategy Coding Help


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one FatDemon with 25 posts (3 thanks)
    2. looks_two MWinfrey with 13 posts (10 thanks)
    3. looks_3 grimReaper with 6 posts (2 thanks)
    4. looks_4 vegasfoster with 2 posts (1 thanks)
      Best Posters
    1. looks_one MWinfrey with 0.8 thanks per post
    2. looks_two vegasfoster with 0.5 thanks per post
    3. looks_3 grimReaper with 0.3 thanks per post
    4. looks_4 FatDemon with 0.1 thanks per post
    1. trending_up 14,842 views
    2. thumb_up 17 thanks given
    3. group 23 followers
    1. forum 49 posts
    2. attach_file 9 attachments




 
Search this Thread

New Strategy Coding Help

  #1 (permalink)
 
FatDemon's Avatar
 FatDemon 
San Francisco California, USA
 
Experience: Intermediate
Platform: MetaTrader, NinjaTrader
Broker: Mirus Futures/Zen-Fire, Oanda
Trading: USD/JPY, ES
Posts: 110 since Nov 2012
Thanks Given: 48
Thanks Received: 318

I'm trying to use the Strategy Wizard to make this work, but it seems to be too limited to do.

What I am trying to accomplish is placing an order to buy (or sell in a reverse scenario) when my 2 tick Renko chart crosses the DonchianChannel Mean line by 2 points.

Once it crosses, I want my order to follow the mean line by one tick above (or below if going short) the Mean (Blue line).

I attached a few graphics to show how it would be placed and follow the Mean until execution.

Thanks in advance for your help!






Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
How to apply profiles
Traders Hideout
REcommedations for programming help
Sierra Chart
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Tao te Trade: way of the WLD
24 thanks
Just another trading journal: PA, Wyckoff & Trends
24 thanks
Bigger Wins or Fewer Losses?
21 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #3 (permalink)
 vegasfoster 
las vegas
 
Experience: Intermediate
Platform: Sierra Chart
Broker: Velocity/IB
Trading: 6E
Posts: 1,145 since Feb 2010
Thanks Given: 304
Thanks Received: 844


Option 1, have someone code a Donchian with an upper and lower channel with selectable offset then use the crossing of those lines.

Option 2, after you create the strategy, edit the strategy and find the lines of code with DonchianChannel(period)[0] and insert "+2*TickSize" after for the long and "-2*TickSize" after for the short. Note once you do this you will no longer be able to use the wizard to make changes.

Reply With Quote
Thanked by:
  #4 (permalink)
 
FatDemon's Avatar
 FatDemon 
San Francisco California, USA
 
Experience: Intermediate
Platform: MetaTrader, NinjaTrader
Broker: Mirus Futures/Zen-Fire, Oanda
Trading: USD/JPY, ES
Posts: 110 since Nov 2012
Thanks Given: 48
Thanks Received: 318

Thanks Vegas Foster,

Your post gave me an idea. I just used an SMA set to 1 as the cross over for the Donchian Mean. Still trying to get the moving orders to work right though... almost there

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #5 (permalink)
 vegasfoster 
las vegas
 
Experience: Intermediate
Platform: Sierra Chart
Broker: Velocity/IB
Trading: 6E
Posts: 1,145 since Feb 2010
Thanks Given: 304
Thanks Received: 844

Or Option 3, use an SMA 1 as the cross over the Donchian Mean. That may work too.




Reply With Quote
  #6 (permalink)
 
MWinfrey's Avatar
 MWinfrey 
Lubbock TX
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Stage 5 Trading
Trading: CL
Posts: 1,878 since Jul 2009
Thanks Given: 1,450
Thanks Received: 3,335

I noticed you are using Renko bricks. You didn't ask for this but thought I'd mention it in case this concerns you. Back testing the Renko using Strategy Analyzer will give you results much better than you will get in a live market. This is because entries and exits are placed at the open of the next bar which can give much better results. If this is a concern for you, try using the BetterRenko brick that is in the Elite Downloads,

Reply With Quote
Thanked by:
  #7 (permalink)
 
FatDemon's Avatar
 FatDemon 
San Francisco California, USA
 
Experience: Intermediate
Platform: MetaTrader, NinjaTrader
Broker: Mirus Futures/Zen-Fire, Oanda
Trading: USD/JPY, ES
Posts: 110 since Nov 2012
Thanks Given: 48
Thanks Received: 318

MWinfrey, I tried the BetterRenko, but I get better results with the standard. I'm not too concerned with back testing, I've been trading this system on the ES for a few weeks with great results. Now, if I could just automate it so I don't have to get a tan from my sea of monitors!

I know it's retarded to test a system on a live account, but what the hell! It's been working... luckily! I'm currently live testing it with two contracts with separate targets. Here are my results so far:

P/L Ticks
11/5/2012 $587.50 47
11/6/2012 $725.00 58
11/7/2012 $312.50 25
11/8/2012 $287.50 23
11/9/2012 $525.00 42

11/12/2012 Holiday
11/13/2012 ($225.00) -18
11/14/2012 ($287.50) -23
11/15/2012 $562.50 45
11/16/2012 $525.00 42

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #8 (permalink)
 
MWinfrey's Avatar
 MWinfrey 
Lubbock TX
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Stage 5 Trading
Trading: CL
Posts: 1,878 since Jul 2009
Thanks Given: 1,450
Thanks Received: 3,335


FatDemon View Post
MWinfrey, I tried the BetterRenko, but I get better results with the standard. I'm not too concerned with back testing, I've been trading this system on the ES for a few weeks with great results. Now, if I could just automate it so I don't have to get a tan from my sea of monitors!

I know it's retarded to test a system on a live account, but what the hell! It's been working... luckily! I'm currently live testing it with two contracts with separate targets. Here are my results so far:

P/L Ticks
11/5/2012 $587.50 47
11/6/2012 $725.00 58
11/7/2012 $312.50 25
11/8/2012 $287.50 23
11/9/2012 $525.00 42

11/12/2012 Holiday
11/13/2012 ($225.00) -18
11/14/2012 ($287.50) -23
11/15/2012 $562.50 45
11/16/2012 $525.00 42

Outstanding...good luck and remember what I said if you do decide to back test it and actually there is a way to backtest the renko brick if you want. PM if you develop an interest.

Reply With Quote
  #9 (permalink)
 
FatDemon's Avatar
 FatDemon 
San Francisco California, USA
 
Experience: Intermediate
Platform: MetaTrader, NinjaTrader
Broker: Mirus Futures/Zen-Fire, Oanda
Trading: USD/JPY, ES
Posts: 110 since Nov 2012
Thanks Given: 48
Thanks Received: 318


MWinfrey View Post
Outstanding...good luck and remember what I said if you do decide to back test it and actually there is a way to backtest the renko brick if you want. PM if you develop an interest.

I wouldn't mind back testing.... if I could just figure out how to script it! If you're willing to help, I can send you all my parameters. Or, I can just post them on this thread. Perhaps that may help others looking for a simple scalping system..?..

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #10 (permalink)
 
MWinfrey's Avatar
 MWinfrey 
Lubbock TX
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Stage 5 Trading
Trading: CL
Posts: 1,878 since Jul 2009
Thanks Given: 1,450
Thanks Received: 3,335



FatDemon View Post
I wouldn't mind back testing.... if I could just figure out how to script it! If you're willing to help, I can send you all my parameters. Or, I can just post them on this thread. Perhaps that may help others looking for a simple scalping system..?..

Why don't you post your rules here being as you're willing to share them and let's see what falls out. We can all take a look at them and offer what we can.

Bear in mind that strategies won't necessarily free you from watching your screens. Strategies still need supervision and in fact, I suggest that most strategies fall into this category. There are too many things that can happen that can compromise your strategy. The other point about back testing is that unfortunately the method I use to back test based on the close of the bar instead of the open uses the JAMRenkoFills.cs script that was in the Elite downloads at one time but is no longer there. I think @Big Mike told me it was removed at the request of the author. If that is true, then I will not be able provide it to anyone without permission from the author and I don't know who that is. However, I have no problem running it myself because I downloaded when it was available.

Reply With Quote




Last Updated on January 4, 2013


© 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