STOP BELOW SIGNAL CANDLE

Forums ProRealTime English forum ProOrder support STOP BELOW SIGNAL CANDLE

Tagged: 

Viewing 9 posts - 1 through 9 (of 9 total)
  • #36402

    Hi,

    I’m having trouble getting my stop to be placed below the signal candle. Please can you tell me where i’m going wrong.

     

    #36725

    If you put figures in you will see it? The heat today has switched my brain off, I will probably think what it should be when it gets cooler? 🙂

    slong = 10000  9800
    SET STOP LOSS 200

     

    Maybe …

     

     

    #36858

    Tradeprice is an absolute price / the price that the position was opened at. Thus you can’t reference LOW because LOW relates to a candle and not Tradeprice – I think. What you have to do is reference the LOW of the bar when it was opened. What i think your looking for is Tradeindex.

    #36863

    Forget my previous at #36725 (the heat really did addle my brain! :)).

    You need to record / use the low  at the time of the Trade so the definition of slong at time of Buy needs to be bounded by the If Endif statement as below.

    Try it anyway and let us know please?

     

    1 user thanked author for this post.
    #80559

    Hello community,

    I am looking for approximately the same request than Kage12 but instead of using the low of the signal candlestick as a stop, I would like to use the low of the day before the signal.

    I tried to edit the code that Grahal sent but my version doesn’t seem to work as some orders are closed without touching the low of the day before the signal (please find attached a screenshot).

    Please note that below the last line of my code, i’ve got some conditions to close my positions. The stop loss i’m asking would be used as a protective stop and to optimize my money management.

    Also, i’v tried the original version that Grahal sent and the orders are closed the same day of the signal so if you also have a solution to fix that, l would be very interested to run some backtest.

    Thank you in advance and have a great day !

    Valentin

    #80562

    GraHal is right about IF..ENDIF.

    But you should replace line 3 with

    because

    • TRADEPRICE will be known the next bar
    • when you BUY/SELLSHORT at market the price will be the current one, that is CLOSE (+- some gap and/or slippage).

     

    #80563

    Assuming you are running on a Daily TF, does below work?

     

    #80662

    Yes it will work, but keep in mind that:

    1. the STOP pending order will only last for 1 bar each time c1 is true
    2. Low[1] is the candle low at bar n-1, the bar before the c1 signal
    #81130

    Thank you a lot for your help Gentlemen! This is was I needed for few of my strategies.
    Have a great day!

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

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