in Search

Need help with a formula.

Last post 05-18-2008, 9:41 by henry766. 4 replies.
Sort Posts: Previous Next
  •  04-30-2008, 8:33 27079

    Need help with a formula.

    Hi everyone!

    I'm hoping someone can help me out.  I'm writing some formulas and I'm a little stuck in one area of what I want to identify a swing high and I'm just having a difficult time with a programatic approach, so I thought I'd ask.

    I want to identify a swing high  --  a high where there are at least 5 lower highs than the swing high bar high and at least 5 lower lows that the swing high bar low on either side of the swing high bar.  The tricky part is they do not have to be consecutive?

    Any ideas?

  •  04-30-2008, 20:37 27084 in reply to 27079

    Re: Need help with a formula.

    Optimus:
    I want to identify a swing high  --  a high where there are at least 5 lower highs than the swing high bar high and at least 5 lower lows that the swing high bar low on either side of the swing high bar.  The tricky part is they do not have to be consecutive?

    I think you will find the forum.dll variable sum function will help you out here; or you could use a count and reset system which is a little more complicated, but not impossible.


    Hope this helps.

    wabbit Big Smile [:D]



    MS: 6.52 EOD, 7.x EOD, 8.0 PRO, 9.2 PRO w/QC, 10 PRO w/QC & MDK
    For custom MetaStock programming : http://www.wabbit.com.au
    My SkyPE status : wabbit.com.au SkyPE online status
    My SkyPE account : wabbit.com.au

  •  05-01-2008, 9:14 27096 in reply to 27084

    Re: Need help with a formula.

    As always wabbit you are an assett to the forum.

  •  05-08-2008, 14:29 27150 in reply to 27096

    Re: Need help with a formula.

    Wabbit,

    I thought I'd ask a follow up question, as I'm trying to wrap my head around this one.  How would you go about creating this in the Forum DLL.  I just don't know what function would work best.

  •  05-18-2008, 9:41 27202 in reply to 27150

    Re: Need help with a formula.

    I think you should use the "highest since function" which allows your prviouse high expression and is also the "nth "expression of this , in your case 5 , i.e highestsince (nth, expression ,data array) then reference this formula before reverse (lowset since). IF YOU REQUIRE ANY FURTHER ASSISTANCE CONTACT ME AT -                          http://www.tradingtraders.co.uk/

View as RSS news feed in XML