Stop loss at x% of low of entry bar

Forums ProRealTime English forum ProOrder support Stop loss at x% of low of entry bar

Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • #78045

    Hello !

    I want to sell a long position if at any time after the buy, the stock reaches a price 2% below the low of the candle of entry. I thought about using (0,98*Tradeindex(low)) but that doesn’t work.

    Can anyone tell me how to code this ?

    Thank you very much !

    #78047

     

    #78048

    Tradeindex is the bar when the trade was opened. Tradeprice is the keyword you should use, instead.

    But first of all you have to save the price of the LOW when the trade is opened, like:

    Then you can test the exit conditions:

    A) comparing the current price each bar

    or

    B) using a pending order each bar

     

     

    #78049

    You don’t need to use TRADEPRICE either.

    #78057

    I think we have both got it slightly wrong Robert where the pending orders are concerned as mine only lasts one bar and yours it not placed on the first bar!

    These two options might work better:

    or

    If it is a market with lots of gaps then the last option might not work so well.

    1 user thanked author for this post.
    #78084

    Ok it works. Thank you !!

Viewing 6 posts - 1 through 6 (of 6 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login