Hi everyone,
Quick and naive question: what is the instruction in order to close position after n bars from the opening of the position?
Many thanks
Francesco
This is the first URL that come from a quick search with the search tool of the website: https://www.prorealcode.com/topic/general-question/
Sorry, but it has been answered soooo many times already 🙂 You’ll find a lot of code snippet for this in many different forum topics.
Despite of this fact, you can find the barindex from when your last Y order has opened at market with TRADEINDEX
Thank you Nicolas, sorry again for the naive question. This website is a jewel!