Progressive Trade

Questions about MultiCharts and user contributed studies.
allenlowe
Posts: 37
Joined: 29 Jun 2011
Has thanked: 2 times
Been thanked: 3 times

Progressive Trade

Postby allenlowe » 24 Jun 2014

Dear All,

My strategy is simple. Once the price is trigger, I would like to buy 10 contracts with the current bar bid price every 5 seconds until a total of 200 contracts. However, due to the OCO rules, some of my order will be cancelled before it has been executed.

I search the wiki and cannot find any function that I can checked the order status. Is it any possible way I can check the order status of last submission so that I can submit a new order after the last order has been filled or canceled?

Thanks a lot.

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Progressive Trade

Postby JoshM » 24 Jun 2014

I search the wiki and cannot find any function that I can checked the order status. Is it any possible way I can check the order status of last submission so that I can submit a new order after the last order has been filled or canceled?
You can monitor `MarketPosition(0) * CurrentContracts` to see if the order has been filled (i.e., position size increased) before submitting a new order.

allenlowe
Posts: 37
Joined: 29 Jun 2011
Has thanked: 2 times
Been thanked: 3 times

Re: Progressive Trade

Postby allenlowe » 24 Jun 2014

I have tried before but seems the update of marketposition and currentcontracts are not update as fast as I expected. I end up having more contracts than I expected.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Progressive Trade

Postby Henry MultiСharts » 30 Jul 2014

allenlowe, you can also use MarketPosition_at_Broker and MarketPosition_at_Broker_for_The_Strategy.

With the new backtesting/auto trading engine more order control will be provided to the user. This functionality is coming with the next major platform update: https://www.multicharts.com/pm/viewissu ... no=MC-1497


Return to “MultiCharts”