Get number of contracts executed in a day

Questions about MultiCharts and user contributed studies.
waveslider
Posts: 222
Joined: 16 Oct 2011
Has thanked: 66 times
Been thanked: 20 times

Get number of contracts executed in a day

Postby waveslider » 08 Oct 2014

I am looking to find out how many contracts (opened and closed) that were actually executed at the broker for a given day.

Code: Select all

If time=sess1begintime then quantity=0;
if barstatus(1)=2 then quantity = quantity+("get executed contracts this bar");
if time=sess1endtime then print("quantity");
None of the "get...." functions seem to get me there.
Any suggestions?

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: Get number of contracts executed in a day

Postby Andrew MultiCharts » 09 Oct 2014

Hello waveslider,

May i know what is the final goal? How would you like to use this value?

waveslider
Posts: 222
Joined: 16 Oct 2011
Has thanked: 66 times
Been thanked: 20 times

Re: Get number of contracts executed in a day

Postby waveslider » 09 Oct 2014

Hi Andrew
I would export this number to an excel spreadsheet for tracking

User avatar
bensat
Posts: 331
Joined: 04 Oct 2014
Has thanked: 46 times
Been thanked: 104 times

Re: Get number of contracts executed in a day

Postby bensat » 09 Oct 2014

Do you need the counter for automated or manual trading and do you need half- or roundturns ? If for manual trading, I would like to ask MC it is possible to track trades (live broker statements) from manual trades via PowerLanguage ?

Thank you.

Ben

waveslider
Posts: 222
Joined: 16 Oct 2011
Has thanked: 66 times
Been thanked: 20 times

Re: Get number of contracts executed in a day

Postby waveslider » 12 Oct 2014

What about the ability to access "order and position tracker" entries? Can it be exported?

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: Get number of contracts executed in a day

Postby Andrew MultiCharts » 14 Oct 2014

You can develop a code that would be calculating the number using the PosTradeSize keyword.

waveslider
Posts: 222
Joined: 16 Oct 2011
Has thanked: 66 times
Been thanked: 20 times

Re: Get number of contracts executed in a day

Postby waveslider » 14 Oct 2014

Is there a key word that would actually reference the quantity executed at the broker (as would show on the order and position tracker)?

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: Get number of contracts executed in a day

Postby Andrew MultiCharts » 14 Oct 2014

Is there a key word that would actually reference the quantity executed at the broker (as would show on the order and position tracker)?
Unfortunately no, you cannot access the values from broker (like in order and Position Tracker) from EL code.


Return to “MultiCharts”