fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    Closing oldest trades on specific event

    Questions & Answers
    1
    1
    412
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      malfy last edited by malfy

      Hi there!

      I want to test a trading system where losable trades are never closed unless they are compensated.
      To do this, when i open a new trade i also open an opposite pending at the distance of my wanted "stop loss". In this way, when the trade goes bad, i freeze the loss by hedging. Then, every new trade has a trailing stop with same size of the pips distance between each hedging couple. What i want to do is to close the oldest couple of hedging trades each time that the trailing stop moves the SL.
      I wrote the system and it seems to be ok unless that i can't close the oldest couple of orders.
      I tried to realize it using a "trade SL modified" under "on trade" section. I connected a loop to this block where the sequence is: for each trade, oldest to newest, no more than 2 trades, close trades... but this is not working
      I also tried to place the same loop "on tick", with using other ways to identify the condition where oldest orders must be closed but i have no results.

      Where is the mistake? Or... what could be the right way to achieve the result?
      Here the link to the project: https://fxdreema.com/shared/obdqfrjjb

      Thanks for the help and happy sunday!
      Malfy

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      • First post
        Last post

      Online Users

      E
      F
      D
      S
      J
      S
      C
      J

      14
      Online

      146.7k
      Users

      22.4k
      Topics

      122.6k
      Posts

      Powered by NodeBB Forums | Contributors