How to get tradeprice of first order where cumulative orders taken?

Forums ProRealTime English forum ProOrder support How to get tradeprice of first order where cumulative orders taken?

Viewing 4 posts - 1 through 4 (of 4 total)
  • #88546

    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?

     

    #88547

    You can retrieve the “n” variable dynamically with COUNTOFPOSITION

    #88563

    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.

    #88569

    Yes because COUNTOFPOSITION depends of how much Lots / Shares or contracts  you have launched at market obviously, I should have been more precise.

Viewing 4 posts - 1 through 4 (of 4 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login