logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Dendee  
#1 Posted : Thursday, August 13, 2009 10:38:57 PM(UTC)
Dendee

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 8/13/2009(UTC)
Posts: 6

I want to create a Floating Stop Loss (FSL) indicator line, that places a horizontal line 10% 'below' a stocks buying price. The line then rises when the stock price rises, but stays fixed when the stock price falls. If the stock falls and then rises in the future the line will rise again when the price exceeds the FSL line. To enter my buying price for a stock, I need a pop up data entry window that appears each time I set the FSL indicator, so that I can enter the buying price. I don't want to have to alter the formulae every time to set a new buying price, but rather use the data entry window. My problem is that I am not Metastock formulae language literate and have really been struggling for weeks without any sucsess, so I have had to give up. Could someone please help me with a workable formulae t do the above!
johnl  
#2 Posted : Saturday, August 15, 2009 10:43:57 PM(UTC)
johnl

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 11/7/2005(UTC)
Posts: 602


Use the INPUT() function to create the window which will allow you to right click the indicator to set the buy price. It is "global", not security specific however. The FSL can be calculated from that variable using a IF(,,) statement.



wabbit  
#3 Posted : Monday, August 17, 2009 11:49:39 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
See Richard Dale's Advanced Stop.


wabbit [:D]

Dendee  
#4 Posted : Thursday, August 20, 2009 12:06:29 AM(UTC)
Dendee

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 8/13/2009(UTC)
Posts: 6

Thanks johnl. Your reply doesn't give me the the formulae I need, but it does 'Open the locked door" I had been knocking on for about a month. I can now experiment and try to learn how to write the code to work with the window that appears when using the INPUT() function. THANKS Dendee
Dendee  
#5 Posted : Thursday, August 20, 2009 12:16:04 AM(UTC)
Dendee

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 8/13/2009(UTC)
Posts: 6

Thanks wabbit. Richard Dale's stop loss (SL) is a bit to complicated as I only want a simple stop loss based on the buying (entry) price. But what Richards SL code does, is give me a formulae to study and to try and learn from. i.e how does it work and what can I do to write my own more basic code? Thanks for your help. Dendee
Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.