[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EquisMetaStock Group] Re: indicator that starts from a specified date



PureBytes Links

Trading Reference Links

Thanks Preston,

I had already tried using zero for the else condition, but as you 
point out it distorts the chart.  I want there to be no else 
statement - ie that the indicator does not indicate prior to the 
specified date.  The formula I have so far (with Close in the else 
condition)is : 

If((DayOfMonth()>=12 AND Month()=8 AND Year()=2002) OR (Month()>8 AND 
Year()=2002) OR Year() >2002,If(.95*LOW>PREV,0.95*LOW,PREV), C) 

This will display a 5% trailing stop loss which moves up but will not 
move down, starting from 12 Aug 2002 (I intend to input the date as a 
variable when I get the rest sorted out).

I am sure I have seen it done elsewhere - any more thoughts?

Thanks
Shaun


--- In equismetastock@xxxxxxxxxxxxxxx, pumrysh <no_reply@xxxx> wrote:
> Shaun,
> 
> Let's see if I can totally confuse you. :-)
> 
> Straight from Metastock help[top line of your program]:
> 
> IF FUNCTION:A conditional function that returns the second 
parameter 
> (THEN) if the conditional expression defined by the first parameter 
> is true; otherwise, the third parameter is returned (ELSE).
> 
> EXAMPLE	The formula "if(1<2,3,4)" will always return the 
value three.
> 
> 
> Another way to look at this is:
> if(condition,value,null)
> 
> or if the condition is true,{then} use this value,{else} no value.
> 
> In your case it would be:
> if({share bought},{stop loss},0)
> 
> In your case you will need to consider several factors:
> 
> 1.Will the actual date of the purchase be needed or could you 
simply 
> use a trigger or barsince condition?
> 
> 2.In this example you would plot either the stop loss or zero.The 
> value between the stop loss and zero may be large. If plotted on a 
> price chart it would require a plot of 0 to the stop loss value and 
> if prices are around 100 or greater you would have a large price 
> display. If plotted in a seperate window it may not be as 
> significant. Consider also that this is the case if you plot from 
> left to right or from the beginning of the price display. Another 
> option and I think what you may be looking for is to plot from 
right 
> to left or from today backwards. This is unorthodox to metastock 
BUT 
> I have seen it done. Let me look through some older post and see if 
I 
> can scrounge up the solution. In the mean time maybe some others 
will 
> be able to glean another method to accomplish the task.
> 
> Preston
> 
>  
> 
> 
> 
> --- In equismetastock@xxxxxxxxxxxxxxx, "shauncris" <spc901@xxxx> 
> wrote:
> > I want to create a stop loss line that only starts calculating 
from 
> a 
> > specified date (when the share was bought).  I can partially do 
> this 
> > with an 'if' function which tests if the date has yet occurred 
> (using 
> > dayofmonth, month and year functions).  But the 'if' function 
> > requires a formula to use if the result of the test is false (ie 
> > before the specified date).  I dont want anything to be displayed 
> if 
> > the date is before the specified date.  How do I do this?  Is 
there 
> > something like a null value or function I can specify if the 'if' 
> > function is false,  or should I be using something other than 
> > the 'if' function?
> > 
> > Thanks
> > Shaun


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make Money Online Auctions! Make $500.00 or We Will Give You Thirty Dollars for Trying!
http://us.click.yahoo.com/yMx78A/fNtFAA/46VHAA/BefplB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/