Support Board
Date/Time: Fri, 07 Nov 2025 17:31:45 +0000
Post From: [Programming help] How to exit any position after 20 bars since it's opened using ASCII?
| [2023-03-10 12:07:57] |
| User395175 - Posts: 94 |
|
Hi, i want my programme exit the position after a fixed number of bars (like 20), how can i do it? I will have multiple positions open at the same time, for each, i want it to be closed after 20 bars since it opened. I saw there is a sc function called sc.GetBarsSinceLastTradeOrderEntry(), but it only consider the last trade. i don't think i can use it in my case. Please help me, thank you. |
