PosTradeCount with Different Filled Prices  [SOLVED]

Questions about MultiCharts and user contributed studies.
scotthkao
Posts: 31
Joined: 19 Feb 2014
Has thanked: 14 times

PosTradeCount with Different Filled Prices

Postby scotthkao » 14 Dec 2017

Suppose we have the following statement:
buy("Entry 1") 10 contracts next bar at 1000 stop;

After the order is filled at 2 different prices: 1000 and 1001,
what will PosTradeCount(0) return?

Will it be 1 because they are both from "Entry 1"?
Or will it be 2 because they are filled at different prices?

Thanks a lot!

Scott

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: PosTradeCount with Different Filled Prices

Postby TJ » 15 Dec 2017

I don't have the answer for you.

Does your broker offer a paper trading account?

You should always test your strategy to gain a better understanding of how the codes work.

scotthkao
Posts: 31
Joined: 19 Feb 2014
Has thanked: 14 times

Re: PosTradeCount with Different Filled Prices

Postby scotthkao » 15 Dec 2017

If the paper trading account does not fill an order with varying prices, which is most likely the case,
the situation can not be observed in that way.

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: PosTradeCount with Different Filled Prices

Postby TJ » 15 Dec 2017

If the paper trading account does not fill an order with varying prices, which is most likely the case,
the situation can not be observed in that way.

Who is your broker?

What do you mean by " not fill an order with varying prices"?

scotthkao
Posts: 31
Joined: 19 Feb 2014
Has thanked: 14 times

Re: PosTradeCount with Different Filled Prices

Postby scotthkao » 15 Dec 2017

My broker is Interactive Brokers.
For example,
buy("Entry 1") 10 contracts next bar at 1000 stop;
8 contracts are filled at 1000 and the other 2 contracts are filled at 1001.

Thanks!

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: PosTradeCount with Different Filled Prices  [SOLVED]

Postby TJ » 15 Dec 2017

My broker is Interactive Brokers.
For example,
buy("Entry 1") 10 contracts next bar at 1000 stop;
8 contracts are filled at 1000 and the other 2 contracts are filled at 1001.

Thanks!

Please use IB's paper trading account to test your trading system.

IB's paper trading account is a 100% copy of your real money account.
ie what you get in the paper account is exactly what you will get in your real money account.


note: use the paper trading account, not the demo account.

scotthkao
Posts: 31
Joined: 19 Feb 2014
Has thanked: 14 times

Re: PosTradeCount with Different Filled Prices

Postby scotthkao » 15 Dec 2017

I'll give it a try.

Thanks!


Return to “MultiCharts”