NexusFi: Find Your Edge


Home Menu

 





Two Line Trading


Discussion in Traders Hideout

Updated
      Top Posters
    1. looks_one Andrew with 54 posts (3 thanks)
    2. looks_two cunparis with 49 posts (16 thanks)
    3. looks_3 FredyMegaG with 36 posts (31 thanks)
    4. looks_4 Eric j with 11 posts (6 thanks)
      Best Posters
    1. looks_one cclsys with 1 thanks per post
    2. looks_two FredyMegaG with 0.9 thanks per post
    3. looks_3 Eric j with 0.5 thanks per post
    4. looks_4 cunparis with 0.3 thanks per post
    1. trending_up 97,603 views
    2. thumb_up 66 thanks given
    3. group 43 followers
    1. forum 187 posts
    2. attach_file 38 attachments




 
Search this Thread

Two Line Trading

  #11 (permalink)
 steve2222 
Auckland, New Zealand
 
Experience: Beginner
Platform: Sierra Chart
Broker: AMP/CQG
Trading: Whatever moves in my timezone
Posts: 1,896 since Sep 2009
Thanks Given: 3,379
Thanks Received: 1,540


cunparis View Post
I do not see how the trade frequency can make it more vulnerable to curve fitting. First, the parameters that I optimized are not for trade entry, so I'm not filtering out trades. I'm taking every inside bar breakout.

However I have to admit I do not have experience optimizing the target & stop for a strategy that doesn't use any indicators. In the past I've optimized moving averages and such and curve fitted perfect systems that didn't hold up.

In fact the only parameter that I optimized is the stop. Since the target optimized to 150 that effectively means no target, just exit on close.

I think this strategy captures a valid market behavior that breakouts of inside bars can be profitable. I'm not saying I'll trade it, i prefer to have more trade data. I just wanted to share because I think it's valid. if I have time later I'll try testing it on hourly or 30min bars..

Morning Cunparis

Did you use 30 min bars in your back testing? I thought Fredy was using daily bars (1440 min)?

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
Build trailing stop for micro index(s)
Psychology and Money Management
ZombieSqueeze
Platforms and Indicators
Online prop firm The Funded Trader (TFT) going under?
Traders Hideout
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
59 thanks
Funded Trader platforms
37 thanks
NexusFi site changelog and issues/problem reporting
23 thanks
GFIs1 1 DAX trade per day journal
22 thanks
The Program
19 thanks
  #12 (permalink)
 
cunparis's Avatar
 cunparis 
Paris, France
 
Experience: Advanced
Platform: Market Delta & Ninjatrader
Trading: ES
Posts: 2,565 since Jun 2009
Thanks Given: 1,162
Thanks Received: 2,093

I got better results taking a breakout of the inside bar.

For historical minute charts, I often export CL & Euro minute data from tradestation and import into the ninja ##-## continous contract. Works great. That way I have 10+ years of data. I can do it for ES if you like.

Follow me on Twitter Reply With Quote
  #13 (permalink)
nqemini
north east, usa
 
Posts: 16 since Oct 2009
Thanks Given: 128
Thanks Received: 4


I had a similar strategy on the NQ's using a 1600 tick chart on TOS data...probably be a 3200 tick or higher chart on NT.

I used a key reversal bar as entry signal and stop and reverse on the next key reversal bar signal. The s&r would not be automatically after the signal was generated, but would trail the candles/bars till the high/low of a candle was taken out.

Maybe someone kind enough could back test this for me, since i have tried it and had ZERO success (I am technically challenged....and math challenged)

Reply With Quote
  #14 (permalink)
 
wh's Avatar
 wh 
Neubrandenburg, Germany
 
Experience: Advanced
Platform: R
Trading: Stocks
Posts: 538 since Jun 2009
Thanks Given: 298
Thanks Received: 512

@cunparis for your strategy you can easy use for target and stop this methods, i think is better then curve fitting ...

you take the average-range or median of the last x bars with a factor

 
Code
                            
int[] = new int[21];
            
               for(
int i 0d.Lengthi++)
            {
                
d[i] = (int)Math.Round((High[i] - Low[i])/TickSize,0);
                
                
            }

            
double av getAverageFromArray(d);
            
double med getMedianFromArray(d); 
 
Code
                            
private double getAverageFromArray(int[] dd)    
        {
        
            
int dblResult 0;
        
            foreach (
int dblValue in dd)
        
                
dblResult += dblValue;
        
            return 
dblResult dd.Length;
        
        }

         private 
double getMedianFromArray(int[] ee)
        {
            
int size ee.Length;
            
int mid size /2;
            
double median = (size != 0) ? (double)ee[mid] :
            ((double)
ee[mid] + (double)ee[mid-1]) / 2;
            return 
median;
        } 
best regards

Causality is the relationship between an event (the cause) and a second event (the effect), where the second event is a consequence of the first.
Reply With Quote
  #15 (permalink)
 
cunparis's Avatar
 cunparis 
Paris, France
 
Experience: Advanced
Platform: Market Delta & Ninjatrader
Trading: ES
Posts: 2,565 since Jun 2009
Thanks Given: 1,162
Thanks Received: 2,093


steve2222 View Post
Morning Cunparis

Did you use 30 min bars in your back testing? I thought Fredy was using daily bars (1440 min)?

Ah the power of tradestation!

I use a 30 minute bar for entries but the inside bar is calculated on the daily.

Follow me on Twitter Reply With Quote
  #16 (permalink)
 
FredyMegaG's Avatar
 FredyMegaG 
Lisbon
 
Experience: Beginner
Platform: NinjaTrader
Broker: Mirus Futures / Zen-fire
Trading: Es
Posts: 59 since Dec 2009
Thanks Given: 19
Thanks Received: 44

hey cunparis,

Can you teach me how to import historical ES data for Ninjatrader?

Im always on the lookout for these kind of setups (and some new ones im figuring out, ill post them if i find them to be reliable) but im stuck with only a couple of months worth of data....so im always afraid that something might have worked in the previous couple of months but not before...

hmmm i get it... youre trigger bar is in the 30 minutes when the limits of he hourly inside bar are broken.

I guess you get a fill much sooner... so youll probably benefit from that, but on the other hand, how do you know its not a fakeout? (ie, the limit of the outside bar arent broken)

Do you feel that most of the time, when the inside bar limits are broken, eventuall so its the ouside bar's?

Started this thread Reply With Quote
  #17 (permalink)
 
cunparis's Avatar
 cunparis 
Paris, France
 
Experience: Advanced
Platform: Market Delta & Ninjatrader
Trading: ES
Posts: 2,565 since Jun 2009
Thanks Given: 1,162
Thanks Received: 2,093


FredyMegaG View Post
hey cunparis,

Can you teach me how to import historical ES data for Ninjatrader?

Im always on the lookout for these kind of setups (and some new ones im figuring out, ill post them if i find them to be reliable) but im stuck with only a couple of months worth of data....so im always afraid that something might have worked in the previous couple of months but not before...

hmmm i get it... youre trigger bar is in the 30 minutes when the limits of he hourly inside bar are broken.

I guess you get a fill much sooner... so youll probably benefit from that, but on the other hand, how do you know its not a fakeout? (ie, the limit of the outside bar arent broken)

Do you feel that most of the time, when the inside bar limits are broken, eventuall so its the ouside bar's?

I will export the ES minute data from 1/2/2000 to 12/31/2009 later today. it takes a lot of cpu. Then you just do historical data -> import. I have already posted this for CL & Euro, look in the forum and/or file download section. I'll do ES later today.

The 30 min bar is only visual, it has no impact on the trade. It's so I can see inside the daily bars and confirm the strategy works properly. I could put 1 min or anything else, doesn't matter.

Tradestation is very good about filling inside a bar and doing bracketing. This is why I use TS for this sort of thing. For simple strategies TS blow Ninja out of the water. For very complex strategies Ninja blows TS away. But my experience is simple strategies work best.

Follow me on Twitter Reply With Quote
  #18 (permalink)
 
cunparis's Avatar
 cunparis 
Paris, France
 
Experience: Advanced
Platform: Market Delta & Ninjatrader
Trading: ES
Posts: 2,565 since Jun 2009
Thanks Given: 1,162
Thanks Received: 2,093

What's weird is that while programming your strategy I had made some logic mistakes and I got very good backtest results, 1.76 profit factor. I then fixed the logic mistakes thinking that would surely improve the results and it didn't. By the time I got done I couldn't remember the mistake version. Now 2 days later I'm kicking myself for not having figured it out Saturday.

Follow me on Twitter Reply With Quote
  #19 (permalink)
 
FredyMegaG's Avatar
 FredyMegaG 
Lisbon
 
Experience: Beginner
Platform: NinjaTrader
Broker: Mirus Futures / Zen-fire
Trading: Es
Posts: 59 since Dec 2009
Thanks Given: 19
Thanks Received: 44

ahahah could it be that you were using the outside bar breakout on the initial strategy you tested? or perhaps taking profits at the end of the day instead of a target?

I'll check the ES historical data later on the day too!

Started this thread Reply With Quote
  #20 (permalink)
 
cunparis's Avatar
 cunparis 
Paris, France
 
Experience: Advanced
Platform: Market Delta & Ninjatrader
Trading: ES
Posts: 2,565 since Jun 2009
Thanks Given: 1,162
Thanks Received: 2,093



FredyMegaG View Post
ahahah could it be that you were using the outside bar breakout on the initial strategy you tested? or perhaps taking profits at the end of the day instead of a target?

I'll check the ES historical data later on the day too!

No there was an error in my logic for calculating an inside/outside bar and/or in the entry criteria. I will try to program it again and see if I can remember the mistake.

Follow me on Twitter Reply With Quote




Last Updated on February 18, 2012


© 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