in Search

Floating Stop Loss Line (FSL)

Last post 08-20-2009, 0:16 by Dendee. 4 replies.
Sort Posts: Previous Next
  •  08-13-2009, 22:38 30415

    Floating Stop Loss Line (FSL)

    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!
  •  08-15-2009, 22:43 30431 in reply to 30415

    Re: Floating Stop Loss Line (FSL)


     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.


     
  •  08-17-2009, 23:49 30463 in reply to 30431

    Re: Floating Stop Loss Line (FSL)

    See Richard Dale's Advanced Stop.


    wabbit Big Smile [:D]


    "The question of whether a computer can think is no more interesting than the question of whether a submarine can swim."
    Edsgar W. Dijkstra

     

    MS: 6.52 EOD, 7.x EOD, 8.0 PRO, 9.2 PRO w/QC, 10 PRO w/QC & MDK
    For custom MetaStock programming : http://www.wabbit.com.au
    My SkyPE status :
    My SkyPE account : wabbit.com.au

  •  08-20-2009, 0:06 30494 in reply to 30431

    Re: Floating Stop Loss Line (FSL)

    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
  •  08-20-2009, 0:16 30495 in reply to 30463

    Re: Floating Stop Loss Line (FSL)

    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
View as RSS news feed in XML