Exit of market in tradeprice

Forums ProRealTime English forum ProOrder support Exit of market in tradeprice

Viewing 12 posts - 1 through 12 (of 12 total)
  • #145582

    I need code. I have a position, after 12 hours in the market it is in losses. I want that if the price returns to the purchase price the operation is closed.

     

    #145593

    There you go:

     

    #145631

    Like doing the same thing but with 5-minute bars. Instead of 12 hours it would be 144 bars of 5 minutes.

     

    The trade begins, if after 144 bars of 5 minutes the trade is lost, if the quote returns to the purchase price the trade is closed.

     

    Thanks, and sorry.

    #145737

    I think your code does not work Roberto, also

    I would need the code but with 5 minute bars.

    Operation opens.
    If after 144 bars the operation is in losses, if the price returns to the purchase point, the operation is closed.

    Thanks!

    #145751

    Yes, my fault, I exited at market.

    Replace lines 11-12 with:

    I’ll make the other code later.

    Please do NOT use the “insert PRT code” button to enter common text. Use it only for code, instead.

    #145757

    Thanks Roberto.

     

    🙂

    #145761

    Fran55 – Please be more careful when posting. Your last two posts have had attached HTML (from I guess cutting and pasting translations) which moderators have had to tidy up to make your posts readable.

    #145779

    Ok Roberto.

     

    I always have problems with translators, sorry.

    One more thing:
    I want to do the same with%.
    That is … I have a position, I want that if the position loses 1% and returns to the purchase price, the operation is closed.

    Thank you very much!

     

     

    #145787

    This is the code with the 3 different ways to exit when in loss:

     

    2 users thanked author for this post.
    #145788

    Much, much, thanks!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    #146037

    Okay. And if I want it to close 0.5% above the purchase price ???

    #146047

    We cannot always tidy up your code!

    Please use plain text without embedded formatting codes. Thank you 🙂

    Use

     

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

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