in Search

Expert Question

Last post 06-04-2007, 12:16 by termi21. 5 replies.
Sort Posts: Previous Next
  •  06-03-2007, 16:41 24228

    Expert Question

    Hello! I have another question about a custom Expert i am make...

    Is there a built in formula command so as to make it give a positive result (buy or sell) only for the first signal of a row possible or negative signal. I was thinking of making it to compare the value (0 or 1) of the previous day, but the formulas are too many and it's not productive :)

    Thank you in advance,

    Termi

  •  06-03-2007, 19:03 24230 in reply to 24228

    Re: Expert Question

    Termi, post your existing code at the Trader's Consortium MetaStock forum, and we'll have the MetaStock experts take a good look at it and offer a workable solution.


    jose '-)


    MetaStockTools.com
  •  06-04-2007, 7:30 24235 in reply to 24228

    Re: Expert Question

    hey termi..... yes you can compare any signal to any other signal and make a buy/sell decision.....so  todays 'emc' negative or sell signal can be compared to any prior days signal or any signal on any other security...

    without more to go on thats about the best i can help.....  if more help is needed just holler back.....h

     

  •  06-04-2007, 9:51 24237 in reply to 24235

    Re: Expert Question

    What i want to do is something like this

    a:=Mov(C,3,E) > Mov(C,70,E);

    b:=(the same but for the previous day)

    if(b=a,0,1)

     

    So if there is a row of "1" signals only the first to be plotted on the graph.

    But, if the formula is not that simple, and is derived from many calculations, is there a command that can tell Metastock what i want to do, without re-writting all the formulas for the previous day and then compare? In simpler words, i want the Expert to work like the option that exists in System Tester "Limit number of simultaneous positions to 1". I want the Explorer to give a buy signal only if it is the first one after a "sell" signal and the oposite.

  •  06-04-2007, 11:01 24238 in reply to 24237

    Re: Expert Question

    hey termi21.... there are several ways to achive that..... slightly modifying your code is perhaps one of the best methods..... it should plot a 1 only on the initial day the new buy/cross  occurs.....holler back if more is needed.....h

     

    --------------------------------

    a:=Mov(C,3,E) > Mov(C,70,E);

    b:=Ref(a,-1);

    If((a=1 AND b=0),1,0)

    -------------------------------

    a second popular method would be to use the cross function..... it also only plots a 1 on the initial day of the cross.....such as;

    -------------------------------

    Cross(Mov(C,3,E),Mov(C,70,E))

    -------------------------------

  •  06-04-2007, 12:16 24240 in reply to 24238

    Re: Expert Question

    Thanx man you are the best!... I knew there should be an easy way to do it
View as RSS news feed in XML