How to count trade long e short in a day

Questions about MultiCharts and user contributed studies.
turbofib
Posts: 213
Joined: 11 May 2013
Has thanked: 67 times
Been thanked: 1 time

How to count trade long e short in a day

Postby turbofib » 09 Mar 2018

Hi,

i want to count trade long and short executed in a day

Can you help me?

User avatar
Svetlana MultiCharts
Posts: 645
Joined: 19 Oct 2017
Has thanked: 3 times
Been thanked: 163 times

Re: How to count trade long e short in a day

Postby Svetlana MultiCharts » 16 Mar 2018

Hello, turbofib,

Please describe the specific difficulty you have with the code you use.

turbofib
Posts: 213
Joined: 11 May 2013
Has thanked: 67 times
Been thanked: 1 time

Re: How to count trade long e short in a day

Postby turbofib » 16 Mar 2018

if i code it :
for Loop = 0 to 10 begin
if (EntryDate(Loop) = Date0)
then Cnt = Cnt + 1 ;
end ;
it give me total trade in this Date...
But if i want to distinguish between long trade and short trade which reserved word should I use?

User avatar
Svetlana MultiCharts
Posts: 645
Joined: 19 Oct 2017
Has thanked: 3 times
Been thanked: 163 times

Re: How to count trade long e short in a day

Postby Svetlana MultiCharts » 22 Mar 2018

turbofib,

Unfortunately, there are no such keywords in PowerLanguage that would allow accessing this info. You can determine if the position is long or short using the PosTradeIsLong keyword, provided that the total number of trades (PosTradeCount) and the date of trade (PosTradeEntryDateTime) are known:
https://www.multicharts.com/trading-sof ... radeIsLong
https://www.multicharts.com/trading-sof ... TradeCount
https://www.multicharts.com/trading-sof ... ryDateTime


Return to “MultiCharts”