i developing a strategy that enter with alternative limit order (buy, sell,buy, sell ecc.), in a specific price.
so, i need to know how to get the:
1. last market Position type (buy/sell), in particulary the last insert position: for exemple if the order touch the price the strategy insert one sell order, so in this moment i need to know the last type of trade (in this case sell) to insert an opposite (buy) order limit.
i try with this code but it's not working
Position lastPosition = Position[total_position-1]; if(lastPosition.MarketPosition == MarketPosition.Long){
thank u
Comment