Forums ProRealTime English forum ProOrder support Pyramiding for S&P500 doesn’t work Reply To: Pyramiding for S&P500 doesn’t work

#185721

Thanks XORANDNOT for your comment. However it didn’t solve the problem.

But by accident I found out that it has something to do with the command “Exitshort at market”. When I delete the lines 60-62, the second trade at 21:06 is entered. But this is obviously not a solution as then the first trade wouldn’t exit when it’s supposed to (the exit is triggered at 21:06). I don’t understand why. Maybe entering a new position while at the same time an Exitshort command is triggered somehow prevents the next trade to be taken.

Anyone any idea?

Because you enter a trade and close it immediately, before it is even entered. So it will never be entered.

I also want to point out that, in case of additional positions, TRADEDEPRICE(1) AND TRADEINDEX(1) will refer to the most recent position. To refer to the average price calculated by ProOrder, use POSTIONPRICE, instead.

 

 

1 user thanked author for this post.