Martingale in strategies
Hello friends,
I'm trying to implement a Martingale system in my strategy and for that I need at least count the quantity of win and loss. All the calculations are ok, but I can not get the result of the last trade in the history (see, https://protrader.org/forum/algostudio/ptmc-c-api/get-positions-history).
Other way I thinking is to memorize the last result in a variable and use it in the calculus, but, how can I know when a trade ends to get the result? There is a event like OnTradeTransaction() that is called after the execution of an order?
Any clue?
Thanks!
I'm trying to implement a Martingale system in my strategy and for that I need at least count the quantity of win and loss. All the calculations are ok, but I can not get the result of the last trade in the history (see, https://protrader.org/forum/algostudio/ptmc-c-api/get-positions-history).
Other way I thinking is to memorize the last result in a variable and use it in the calculus, but, how can I know when a trade ends to get the result? There is a event like OnTradeTransaction() that is called after the execution of an order?
Any clue?
Thanks!
No replies yet
Join PTMC community to post your replies on forum