Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

phase21

Members
  • Content Count

    14
  • Joined

  • Last visited

Posts posted by phase21


  1. Razz,

     

    Have you selected the most appropriate interval per bar? If your system is currently based on 10min intervals, have you tried it on say 5 or 3min bars, with/out adjustment to the number of periods in you MA?

     

    Have you looked at the time of day that you are trading - if you look at the volume and price movements on the TF, you'll see that most of th action takes place 8:30-11:00am and 2:00-4:00pm. The rest is just so choppy, unless there's been a major reaction to an announcement.

     

    Have you looked at different data for the bars, eg using a fixed number of ticks per bar will give you whole different picture, than a fixed number of minutes.

     

    Using tick data you can see all the false signals that happen mid bar. That is a real eye opener on many of the indicators. They do things that are totally unexpected during bar formation.

     

    Having traded YM, TF, and ES in real-time, I understand what you mean about intra-bar formations.

     

    There was a time when I thought that reacting to intra-bar price movements was a good thing, but came to realize that it was a waste of time - I'd invariably get it wrong: bad fill, wrong direction, etc.

     

    But, do you really want to react to thousands of (false) signals that occur during a bar, or, do you want to decipher and trade the main direction. Will you MAs give you the main direction? Is there something else that you need to use in conjuction with them?

     

    I agree, Bandy's book doesn't cover real-time.

     

    One of the things he does talk about though, is the difference between signal and "noise" - we want to trade the signal. If your signal is sound, and has statistical significance (which he outlines in QTS), then proceed to walk-forward testing, and then trade it if it still stands up.

     

    Regards,


  2. G'day Firewalker,

     

    Interesting charts.

     

    What struck me most about them, was that this market tends to find congesting/ support/ resistance at key fib levels (weekly timeframe). :2c:

     

    It'll be interesting see where this one goes next - hit a wall and head south mid Sep/09?, or just keep going!!??

     

    attachment.php?attachmentid=12943&stc=1&d=1250411929

     

     

    attachment.php?attachmentid=12944&stc=1&d=1250411929

    HSI_Weekly_50pct_PartA.thumb.PNG.60783ec02d26d758e994d91196ca6c05.PNG

    HSI_Weekly_50pct_PartB.thumb.PNG.83c8667bb23717656bea78826005d44b.PNG


  3. Hello Minetoo,

     

    The code I posted above is a direct copy from a function in Trade Navigator. I use TN for trading and quick prototyping of ideas. You can define functions in TN, but it doesn't have a programming language to speak of.

     

    However, you should be able to plonk this code/algorithm into a template you use for defining functions in your favourite software, hence no "*.eld". :(

     

    But, below is some code which does the same thing in AmiBroker. AB has a "C"-like programming language.

     

    Define the function:

    /*=============================================================================

    Zero-Lag Moving Averages

     

    This AFL contains functions to calc moving averages with minimal lag.

    =============================================================================*/

     

    //-----------------------------------------------------------------------------

    function ZeroLagMovingAvg(ValToSmooth, BarsToUse)

    /*

    This AFL smooths the input data, and then removes as much lag as possible.

     

    Note: Original source of the formula not known.

    -----------------------------------------------------------------------------*/

    {

    // Declare local variables

    local result ;

    local MAOne ;

    local MATwo ;

    local MADiff ;

     

    // Initialise the local variables.

    result = Null ;

     

    // Your code goes in here

    MAOne = MA(ValToSmooth , BarsToUse) ;

    MATwo = MA(MAOne , BarsToUse) ;

    MADiff = MAOne - MATwo ;

    result = MAOne + MADiff ;

     

    // Declare which variable/value to be returned to the user/calling function

    return result ;

    }

     

     

    Call the function:

    /*=============================================================================

    Zero-Lag Moving Averages

     

    This AFL plotts the moving averages with minimal lag.

    =============================================================================*/

     

    #pragma nocache ;

    #include_once <ZeroLagMovingAvg.afl> ;

     

    ValToSmooth = ParamField("Price field", 3) ;

    BarsToUse = Param("Bars to use", 13, 2, 1000, 1, 1) ;

    SmoothedVal = ZeroLagMovingAvg(ValToSmooth, BarsToUse) ;

     

    Plot(SmoothedVal, "ZeroLagMovingAvg", colorBlue, styleLine | styleDots | styleThick, 0, 0, 0) ;

     

     

    Note: I tend to define things as componentised as possible, a-la building blocks, and draw them all together as late as possible/appropriate. That way I can separate the visuals from the calcs.

     

     

    Regards,


  4. Hi Chad,

     

    I was interested in your method of determining divergence, but for Trade Navigator, and came up with the following.

     

    Original code by Chad:

     

    ((RSI (Close , BarsToUse , False).(BarsToUse) - RSI (Close , BarsToUse , False)) * (Close > Close.(BarsToUse)) * (RSI (Close , BarsToUse , False) < RSI (Close , BarsToUse , False).(BarsToUse))) - ((RSI (Close , BarsToUse , False) - RSI (Close , BarsToUse , False).(BarsToUse)) * (Close < Close.(BarsToUse)) * (RSI (Close , BarsToUse , False) > RSI (Close , BarsToUse , False).(BarsToUse)))

     

    Indicator independent version:

     

    (((UserExprOne).(BarsToUse) - (UserExprOne).0) * ((UserExprTwo).0 > (UserExprTwo).(BarsToUse)) * ((UserExprOne).0 < (UserExprOne).(BarsToUse))) - (((UserExprOne).0 - (UserExprOne).(BarsToUse)) * ((UserExprTwo).0 < (UserExprTwo).(BarsToUse)) * ((UserExprOne).0 > (UserExprOne).(BarsToUse)))

     

    Example of implementation with chart:

     

    TLabQuantDiverg (Regression Value (Close , 7 , 0) , Regression Value (Momentum (Close , 7) , 7 , 0) , 7)

     

    attachment.php?attachmentid=12683&stc=1&d=1249381472

     

    Note: the use of Regression is merely to smooth-out some of the wrinkle in the input values.

     

    Regards,

    QuantDiverge.thumb.PNG.c3aeffa920f13a35fdb545d55cc9705f.PNG


  5. Hi All,

     

    Having looked at the thread on Hull MA, I thought this might be of interest to others.

     

    When I got interested in technical analysis, I was very keen on using indicators, etc, like most newbies, and came across the following formula for significantly reducing the lag inherent in moving averages.

     

    That was a while ago, and am now more interested in reading price and volume, but thought others might be able to make better use of it than I have.

     

    The basic formula is:

    &EMAOne := MovingAvgMethod (Close , Periods , 2)

    &EMATwo := MovingAvgMethod (&EMAOne , Periods , 2)

    &Diff := &EMAOne - &EMATwo

    &EMAOne + &Diff

     

    Replace "MovingAvgMethod" with whatever MA you prefer.

     

    And here's a pic comparing several different MAs with/out Zero Lag, including Hull:

    attachment.php?attachmentid=12539&stc=1&d=1248896583

     

    Regards,

    ZeroLagMAs.thumb.PNG.12605083171c7fc5541bf349589eb2d6.PNG

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.