Setting up a strategy: confused with all the methods - NinjaTrader Programming | futures io social day trading
futures io futures trading


Setting up a strategy: confused with all the methods
Updated: Views / Replies:2,757 / 17
Created: by wown Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • 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.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Setting up a strategy: confused with all the methods

  #1 (permalink)
Just starting out...
Boston
 
Futures Experience: Beginner
Platform: NinjaTrader
 
Posts: 21 since Nov 2010
Thanks: 0 given, 17 received

Setting up a strategy: confused with all the methods

Hi guys,

A little background:

I have spent the last few months coding and testing a couple of indicators created by Tom Demark (I would post a link but the forum wont let me please google it). Specifically, I have managed to code the Setup, Combo, and Sequential in ninjatrader.

Now, I want to automate the trading (or at least backtest it) so that I can trade a strategy based on these indicators. In short here is the strategy (works for either direction, long or short. I will explain the long side):
1. When any 2 of indicators (setup or combo or sequential) are completed within 5 bars of each other, a buy signal is ready.
2. Calculate targets 1, 2 and a stop loss. basically, take 33,50,61, 23) retracements for the two completed sub-signals.
compare the 33,50,and 61 retarcements between the two sub-signals and figure out which two retracements are the closest (see pictures below). the lower of the two smallest differences is target 1, while the higher is target 2. Stop loss is the 23% retracement average for the two sub-signals.
I have everything up to here coded.

3. So, I want to enter long when my buy signal is ready. i will enter long with target 1,2 and stop loss when the ask price is more than the close/open (whichever is higher) of the previous bar. i want to keep the order open for 5 bars then cancel the order and basically forget about this signal.
4. once i enter, i want to
a: sell 25% at target 1 and move stop loss to B/E
b: sell 50% at target 2, and move stop loss to target 1
c: if price moves beyond the high of any of the sub signals (already calculated), start a trailstop loss with some amount (for the sake of argument, lets say 10% of the range of the subsignal exceeded - can be easily caluclated).
d: and of course sell all if we go to stop loss.

As I said, I have already coded points 1 and 2. But I am highly confused by how to manage my orders in the way described above. Ideally, I want to be able to optimize and see what settings work best (for example sell 50% at target 1, etc). I would really appreciate it if I can get some guidance on how to code the above points 3 and 4. I would be happy to share the indicators with you if you are interested if you can help me code my strategy.

I have included some pictures on my blog (stockjockz.blogspot.com/2011/03/strategy-definition.html) to show what I intend to do.

Thanks a lot!

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Israel
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: pfg
Favorite Futures: eminis
 
Posts: 323 since Jun 2009
Thanks: 6 given, 206 received


Hi,
I just want to advise you to code any strategy with only one target.
In your case code 3 variants of your strategy. One for each PT. Then see if each is a profitable strategy. (My guess is that not), then you can combine them or just trade 3 strategies.

Baruch

Reply With Quote
 
  #4 (permalink)
Elite Member
Dartmouth NS
 
Futures Experience: Intermediate
Platform: MC, MC.Net, NT, TWS
Broker/Data: IB / IQFeed / Kids
Favorite Futures: Forex, stocks
 
bnichols's Avatar
 
Posts: 638 since Feb 2010
Thanks: 64 given, 459 received

I found Big Mike's Hurley9_5 and MWinfrey's GenericStrategy_v1 (available to Elite members) very instructive as templates for order management.

P.S. I don't intend to influence anyone one way or another about Elite membership but for me it's proven worthwhile.

Reply With Quote
 
  #5 (permalink)
Just starting out...
Boston
 
Futures Experience: Beginner
Platform: NinjaTrader
 
Posts: 21 since Nov 2010
Thanks: 0 given, 17 received


Quoting 
Hi,
I just want to advise you to code any strategy with only one target.
In your case code 3 variants of your strategy. One for each PT. Then see if each is a profitable strategy. (My guess is that not), then you can combine them or just trade 3 strategies.

Baruch

I am not sure how would you structure that. You will have 3 independant strategies, execute them all at the same time?? I am confused.
Also, when you say "my guess is that not", i assume you are referring to the strat? why do u say that?

thanks

Reply With Quote
 
  #6 (permalink)
Elite Member
Israel
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: pfg
Favorite Futures: eminis
 
Posts: 323 since Jun 2009
Thanks: 6 given, 206 received


Quoting 
I am not sure how would you structure that. You will have 3 independant strategies, execute them all at the same time?? I am confused.
Also, when you say "my guess is that not", i assume you are referring to the strat? why do u say that?

Let say that your strategy gives 4K a month. Its a good result, even very good. But now you examine each setup separately and you see that setup with a smallest target end with -2K, the setup with the second target ends with -1K. What is the result of a biggest target? What will you do? Continue the same? You need to know this!
So yes first test each target separately and if each is profitable you can combine them into one strategy or trade 3 strategies together.
Please, after you code your strategy that way and all 3 targets are profitable, post the results here and I'll eat my hat.

Baruch

Reply With Quote
 
  #7 (permalink)
Elite Member
Near the BEuTiFULL Horse Shoe
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: MBTrading Dukascopy ZenFire
Favorite Futures: $EURUSD when it is trending
 
Trader.Jon's Avatar
 
Posts: 500 since Jul 2009
Thanks: 401 given, 176 received


baruchs View Post
Let say that your strategy gives 4K a month. Its a good result, even very good. But now you examine each setup separately and you see that setup with a smallest target end with -2K, the setup with the second target ends with -1K. What is the result of a biggest target? What will you do? Continue the same? You need to know this!
So yes first test each target separately and if each is profitable you can combine them into one strategy or trade 3 strategies together.
Please, after you code your strategy that way and all 3 targets are profitable, post the results here and I'll eat my hat.

Baruch

Baruch,

I dont want to eat hat, but I am interested in your response to my perspective of market activity.

I have been backtesting and SIM a strategy with 3 targets: PT1 and PT 2 are hard coded targets and PT3 is a 'runner' with a maximum target. Runner is referencing that there is a trailing code setup, besides the hard code stoploss. PT 1 and PT2 are taken out by the stoploss, or traget hit, or an exit algorithm based on 3 indicators. This is not the final setup, just example of looking at the distribution of targets and backtested profit values.

Optimization based on two months data, and out of sample test without changeing parameters is 10 months.

Using EURUSD as an example, PT1 of 7 pips target x 10000 euro = 38% of profit acheived
and PT2 of 12pips target x 10000 euro = 35% of profit acheived
and PT3 of 40pips target x 10000 euro = 27% of profit acheived

The '% of profit achieved' was done in place on one strategy with 3 targets: with the currency settings in NT7 I would plug-in a value of '1' for PT2 and PT3 and the 10000 for PT3 to get the representative values for PT3 etc etc.
'Eyeballed' moneymanagement would likely give about a ratio of PT1 == 50-60000 euro, PT2 == 20-30000 euro and PT3 10-20000 euro on an 'average' day.

My feeling on all this is that there is more gained by having the 3 targets together as a help in not taking a lot of trades during non-profitable market chop sessions. Running PT2 alone is MORE profitable when all 30000 euro are applied to the target, and also has more consecutive losing trades, and also many more entries so there is some degree of added risk to use of that scenario (that statement is based on NOT re-optimizing on just the PT2 !). PT3 has same entry as PT1/2, but effectively is a different strategy because it has a longer term target and a trailing stop instead of the exit rules PT1/2 have. PT3 is less profitable that the combination of PT123 when all 30000 euro is applied to that target, but also has many fewer trades and as a result less likehood of as much slippage accumulation.

Different markets = different potentials. Different market activity, day to day, can be acknowledged within the same overal strategy. You like a basket of markets, I like a basket of strategys for 1 market (at least for now).

I am about to add 2 more targets that will use partially the entry rules that PT123 already use, but different trailing and exit conditions. Challenging, and time consuming, unfortunately lol

Regards,
TJ

Writing to you from the wonderful province of Ontario, Canada. Home to the world's biggest natural negative ion generator, the Niagara Falls, and to those that dare to know how to go over it in a barrel. SALUTE!

Last edited by Trader.Jon; March 3rd, 2011 at 07:27 PM.
Reply With Quote
 
  #8 (permalink)
Just starting out...
Boston
 
Futures Experience: Beginner
Platform: NinjaTrader
 
Posts: 21 since Nov 2010
Thanks: 0 given, 17 received

Tj- that sounds a lot like what i want to do. I think i would agree with uin saying one 1 target by itself wud probably not be profitable. In any case- aint nothin like testin it out myself.

Tj- could you provide some guidance on how you set that up?

Reply With Quote
 
  #9 (permalink)
Elite Member
Near the BEuTiFULL Horse Shoe
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: MBTrading Dukascopy ZenFire
Favorite Futures: $EURUSD when it is trending
 
Trader.Jon's Avatar
 
Posts: 500 since Jul 2009
Thanks: 401 given, 176 received


wown View Post
Tj- that sounds a lot like what i want to do. I think i would agree with uin saying one 1 target by itself wud probably not be profitable. In any case- aint nothin like testin it out myself.

Tj- could you provide some guidance on how you set that up?

What do you specifically need to know ... and have you checked out the strategies available in the Elite downloads?

Jon

Writing to you from the wonderful province of Ontario, Canada. Home to the world's biggest natural negative ion generator, the Niagara Falls, and to those that dare to know how to go over it in a barrel. SALUTE!
Reply With Quote
 
  #10 (permalink)
Elite Member
Israel
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: pfg
Favorite Futures: eminis
 
Posts: 323 since Jun 2009
Thanks: 6 given, 206 received


Hi TJ,
First I want to say that what you did, by testing each PT, is very good. If those are the results then of course do it like this. My point was that you need to test each target if it contributes to your profit or not.
Still I'm very skeptical about this approach. As you said I think that the biggest strength of automation is multi. Multi strategies/instruments/time frames.
The benefit of this is that because of lower correlation of the outcomes your draw down shrinks.
As you know I even demonstrated that with two absolutely negatively correlated strategies (correlation=-1) it can be beneficial to add a loosing strategy to a wining one.
Again the main issue is outcome correlation! Not instruments correlation, not time frame correlation.
I showed an actual beck test of one strategy on 20 different instruments with same parameters on same time frame. Apparently their outcome correlation was very small, hence the results.
Now lets check multi target approach in this sense. Lets do it with only 2 targets. I'm certain that you'll be able to extrapolate it to 3, 4 or 10 targets.
The possible outcomes of strategy with 2 targets:
1. Bigger target is met - then smaller is met too. Correlation 1.
2. Smaller target is not met (hit the stop) - bigger target is not met too. Correlation 1.
3. Smaller target is met, stop is moved to BE and second target not met. Correlation 0.
So you see in this approach the outcome correlation is too high. It is still smaller than 1. So go ahead and trade it.

Baruch,
p.s.
If you read my thread and saw my excel sheet, I told that the results are not correct. They were not correct because that test was on currency pairs, but done only on last (bid) price. When I added the ask price series the results were much worse. I hope you took this into your consideration.

Reply With Quote

Reply



futures io > > > > > Setting up a strategy: confused with all the methods

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Referencing an indicator setting within a strategy script ktmdave NinjaTrader Programming 7 April 28th, 2011 01:48 AM
Set "Default 24/7" as default setting on strategy zwentz NinjaTrader Programming 6 January 18th, 2011 12:37 PM
How many methods do you focus on? jonc Psychology and Money Management 6 December 15th, 2010 12:07 PM
Reading Interval setting in Strategy leduc NinjaTrader Programming 4 May 26th, 2010 07:48 PM
New indicators and methods sharky NinjaTrader 0 July 24th, 2009 06:21 PM


All times are GMT -4. The time now is 05:04 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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 2017-12-14 in 0.14 seconds with 19 queries on phoenix via your IP 54.221.73.186