Close all oders at broker?

Questions about MultiCharts and user contributed studies.
Gaempi
Posts: 32
Joined: 27 Jul 2010
Location: Switzerland
Has thanked: 1 time
Been thanked: 2 times

Close all oders at broker?

Postby Gaempi » 28 Aug 2017

Hello

I want to close all open orders at broker after a specific time:

... if time > 1720 then close all open orders at broker ...

How to code this?

Thanks!

User avatar
Henry MultiСharts
Posts: 8503
Joined: 25 Aug 2011
Has thanked: 1213 times
Been thanked: 2731 times

Re: Close all oders at broker?

Postby Henry MultiСharts » 28 Aug 2017

Hello Gaempi,

If you want your code to cancel the active orders at broker - you need to stop generating them in your code, means make order generation conditions invalid.
If you want to close your open positions - please refer to this sample code:
http://www.multicharts.com/discussion/v ... 380#p61380


Return to “MultiCharts”