Help with simple MS formula - Aussie Stock Forums

Results 1 to 5 of 5
  1. #1

    Default Help with simple MS formula

    Hello All,

    I am new to Metastock and I am trying to work out how to write a simple formula but I am unable to do it so I am hoping someone can help me here. It's should be very simple but still I cannot work out how to do it.

    This is what I have so far -

    EL:=H > Ref(HHV(H,20),-1); {Enter Long Position on a New 20 Period High}

    CL:=L < Ref(LLV(L,10),-1); {Exit Long Position on a New 10 Period Low}

    ES:=L < Ref(LLV(L,20),-1); {Enter Short Position on a New 20 Period Low}

    CS:=H > Ref(HHV(H,10),-1); {Exit Short Position on a New 10 Period High}

    EnterLongTrigger:= EL;

    I want my "EnterLongTrigger" to only give me a signal to buy long if my previous trade WAS NOT Profitable.

    In other words if my previous buy signal proved to be a profitable trade then disregard this buy signal.

    How can I write this?

    Thank You

  2. #2

    Default Re: Help with simple MS formula

    Hey Dracuu,

    The MS formula language seems to be pretty restrictive with this type of thing. There are a limited number of portfolio functions which you can find in the MS manual (search for "simulation functions" in the MS help) but I don't think they'll allow you to do this. If you can't find anything, try the equis forum link below - there's some guys on there who really know they're stuff and it's a great resource when you're new to the language.




  3. #3

    Default Re: Help with simple MS formula

    Thanks AMSH, I have already posted on the Equis forum but no replies at all.
    I have taken a look at the simulation functions but still I can't work out how to base a future trades on the outcome of a previous trade.
    I have just got TradeSim so I will look into that today.

  4. #4

    Default Re: Help with simple MS formula

    Quickly saw this today ... it can be done. Metastock is not that restrictive ... unfortunately it takes time to check coding ... something I am short of atm. I assume you are referring to a trade on the same symbol.

    The metastock yahoo mailing list is another great resource, you could also post on The Chartist (as the following coders are members there too).

    Roy Larson, Wabbit or Jose could probably knock something up quickly, pretty sure if you go looking you will find similar examples also on the same forums or lists through google or search facility etc.

    I would join the yahoo Metastock mailing list, Pumrysh , is very helpful to new posters with code, and stuff like this. Roy is very active on that list as well.

  5. #5

    Default Re: Help with simple MS formula

    Thanks weird for the info, at least you have given me some hope and I will do as you suggested.

Similar Threads

  1. Intrinsic Value Formula: Your Thoughts!
    By tybutler in forum Beginner's Lounge
    Replies: 28
    Last Post: 25th-October-2013, 10:00 AM
  2. Can someone please help with Metastock formula?
    By Rob_ee in forum Software and Data
    Replies: 73
    Last Post: 17th-December-2012, 08:34 PM
  3. Value business formula
    By shareNoob in forum Beginner's Lounge
    Replies: 1
    Last Post: 25th-November-2007, 04:56 PM
  4. Formula to calculate loan repayments
    By bullmarket in forum General Investment and Economics
    Replies: 2
    Last Post: 18th-April-2006, 05:26 PM
  5. Making a Simple Medium Term System
    By Neb in forum Trading Strategies/Systems
    Replies: 7
    Last Post: 12th-October-2005, 02:18 PM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Aussie Stock Forums