Keeps asking me to transmit orders...

Questions about MultiCharts and user contributed studies.
KhaosTrader
Posts: 186
Joined: May 10 2012
Has thanked: 14 times
Been thanked: 11 times

Aug 31 2012

Hi,

I am running a strategy with code that updates the orders every tick if unfilled, the problem is, it asks me to resubmit every tick or so, even if the buy and sell orders are the same value... so what do i do about that? is there a way where it wont keep asking me to submit new orders?

KhaosTrader
Posts: 186
Joined: May 10 2012
Has thanked: 14 times
Been thanked: 11 times

Aug 31 2012

A better question would be for me to change my code where it wont resubmit orders that are the same, what function can i use to do that?

KhaosTrader
Posts: 186
Joined: May 10 2012
Has thanked: 14 times
Been thanked: 11 times

Aug 31 2012

i need a function that will detect if there are existing orders that are unfilled which can be verified by number of shares , price , etc

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

Aug 31 2012

i need a function that will detect if there are existing orders that are unfilled which can be verified by number of shares , price , etc
There's no such function already available as far as I know; you need to code this yourself in your strategy.
A better question would be for me to change my code where it wont resubmit orders that are the same, what function can i use to do that?
There's no function to stop sending orders; you need to code that in your strategy.
I am running a strategy with code that updates the orders every tick if unfilled, the problem is, it asks me to resubmit every tick or so, even if the buy and sell orders are the same value... so what do i do about that? is there a way where it wont keep asking me to submit new orders?
That's the default behaviour of MultiCharts; as long as your order conditions remain true, the order is submitted. If you don't want to resubmit orders, you need to code that in your strategy.

KhaosTrader
Posts: 186
Joined: May 10 2012
Has thanked: 14 times
Been thanked: 11 times

Aug 31 2012

ok what code can i use to find if there are any unfilled open entries?

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

Aug 31 2012

KhaosTrader, you need to disable "Require Order confirmation" in Format->Strategy properties->Auto Trading tab.

KhaosTrader
Posts: 186
Joined: May 10 2012
Has thanked: 14 times
Been thanked: 11 times

Aug 31 2012

got it.

Also I am putting in "if OpenEntriesCount=0 then.." as a condition in my entry code.. is that right?

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

Sep 07 2012

ok what code can i use to find if there are any unfilled open entries?
See Josh's reply.
There's no such function already available as far as I know; you need to code this yourself in your strategy.
got it.
Also I am putting in "if OpenEntriesCount=0 then.." as a condition in my entry code.. is that right?
It depends on what you are trying to achieve. This code checks that you have no filled entries at the broker. It does not check whether you have unfilled entries or not.