I read the documentation about the TradePrice function and I do some tests and I realize that the TradePrice function does not make the difference between an entry price and an exit price, is there a solution to remedy this problem?
For example on the documentation we can use the following code:
1
IFBARINDEX-TRADEINDEX(1)>5......
The problem is that if you use a filter to enter a trade after five candles then when you exit a trade you will also have to wait five candles to re-enter.
Other question: If I have for example a position with five different entries how can I allocate to five different variables (or more) the entry price to be able to use them in the future and reset them once I have exited my position completely (or partially to complicate things further)
Do you have another idea if you have several inputs and several outputs and you don’t know the total number of trades in advance, also and you to reset them?
example with 3 entries and 2 exits?
I have to program something simple and put the code here
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue