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

[Metastockusers] Re: Writing an Indicator



PureBytes Links

Trading Reference Links

--- In Metastockusers@xxxxxxxxxxxxxxx, "mickie_pitts" 
<jaguarvp@xxxx> wrote:
> I am a newbee with Metastcok and am trying to write:
> 
> When I get into a position, I would like to have a popup box come 
up 
> to ask:
> 1. Price Entered?
> 2. Long or Short?
> 
> Then I would like to display a horzional line on the chart at that 
> price and, if long display five additional lines at 10% intervals 
> higher than the entered price.  And one line 5% below the entered 
> price.
> 
> Am I dreaming or can this be donw.
> Thanks for all your help.
> Jaguar

I think this formula is what you are looking for

A1:=Input("date mmddyyyy",1011960,12312100,1072000);
LS:=Input("Long=1 Short=2",1,2,1);
EPR:=Input("Entry Price",.001,100000,20);
PA:=If(LS<>0,ValueWhen(1,A1=Month()*1000000 + DayOfMonth()*10000 + 
Year(),EPR),0);
Stop:=If(LS=1,ValueWhen(1,A1=Month()*1000000 + DayOfMonth()*10000+ 
Year(),EPR*.95),ValueWhen(1,A1=Month()*1000000 + DayOfMonth()*10000+ 
Year(),EPR*1.05));
PB:=If(LS=1,ValueWhen(1,A1=Month()*1000000 + DayOfMonth()*10000+ Year
(),EPR*1.1),ValueWhen(1,A1=Month()*1000000 + DayOfMonth()*10000+ Year
(),EPR*.9));
PC:=If(LS=1,ValueWhen(1,A1=Month()*1000000 + DayOfMonth()*10000+ Year
(),EPR*1.2),ValueWhen(1,A1=Month()*1000000 + DayOfMonth()*10000+ Year
(),EPR*.8));
PD:=If(LS=1,ValueWhen(1,A1=Month()*1000000 + DayOfMonth()*10000+ Year
(),EPR*1.3),ValueWhen(1,A1=Month()*1000000 + DayOfMonth()*10000+ Year
(),EPR*.7));
PE:=If(LS=1,ValueWhen(1,A1=Month()*1000000 + DayOfMonth()*10000+ Year
(),EPR*1.4),ValueWhen(1,A1=Month()*1000000 + DayOfMonth()*10000+ Year
(),EPR*.6));
PF:=If(LS=1,ValueWhen(1,A1=Month()*1000000 + DayOfMonth()*10000+ Year
(),EPR*1.5),ValueWhen(1,A1=Month()*1000000 + DayOfMonth()*10000+ Year
(),EPR*.5));
Stop;PA;PB;PC;PD;PE;PF;

Enter the date of entry in MMDDYYYY format
Enter the entry price
Enter long or short
Merge with scale


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/zMEolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx

 

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