Hi,
I would be grateful for help on the following question. I have a strategy which uses multiple orders. I’m aware the most recent entry price can be obtained using the tradeprice(1) instruction. How could I obtain the first entry price where multiple orders have been taken?
ie. Tradeprice (n) where n is the countofpositions
I suppose I could write it to a variable on opening the first order in a cumulative set, or is there a better way?
You can retrieve the “n” variable dynamically with COUNTOFPOSITION
Thanks Nicolas. Not sure why but command ‘tradeprice(countofposition)’ does not work correctly. I have however solved the issue by setting a variable with the initial order tradeprice.
Yes because COUNTOFPOSITION depends of how much Lots / Shares or contracts you have launched at market obviously, I should have been more precise.