Real time strategy maxiddrawdown

Questions about MultiCharts and user contributed studies.
tradingest
Posts: 283
Joined: 05 Dec 2014
Location: Italy
Has thanked: 53 times
Been thanked: 3 times

Real time strategy maxiddrawdown

Postby tradingest » 13 Nov 2016

Hi all,

when I print the function maxiddrawdown the output in my real time strategy is 0.0. Why?
I'd like to identify the max DD for the whole period the my real time strategy.

It's possible? There are suggestions?

thanks

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

Re: Real time strategy maxiddrawdown

Postby JoshM » 15 Nov 2016

when I print the function maxiddrawdown the output in my real time strategy is 0.0. Why?
I'd like to identify the max DD for the whole period the my real time strategy.
Does `MaxIDDrawDown` return 0 immediately after you enable a strategy for real-time trading or not?

The first case would be expected, since a real-time strategy doesn't contain the information of historical backtested trades. That's also why you won't see those trades appear on the chart after automated order execution is turned on.

But the second case (when your strategy has already executed several real-time trades) is unexpected; I think `MaxIDDrawDown` should return a value then.

tradingest
Posts: 283
Joined: 05 Dec 2014
Location: Italy
Has thanked: 53 times
Been thanked: 3 times

Re: Real time strategy maxiddrawdown

Postby tradingest » 15 Nov 2016

My strategy has performed several real trade but the value is still zero

Can you help me?

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

Re: Real time strategy maxiddrawdown

Postby JoshM » 15 Nov 2016

I suppose it then has to be related to your strategy's code. Can you share that? A simplified piece of code that replicates the behaviour is fine too.

tradingest
Posts: 283
Joined: 05 Dec 2014
Location: Italy
Has thanked: 53 times
Been thanked: 3 times

Re: Real time strategy maxiddrawdown

Postby tradingest » 17 Nov 2016

Code: Select all

if balance > 5000 and maxiddrawdown <> 0
then begin
N = Round((balance)/((maxiddrawdown*-1)),0);
end;
thanks so much

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

Re: Real time strategy maxiddrawdown

Postby JoshM » 18 Nov 2016

I get an error when using your code so cannot test it, unfortunately:

Code: Select all

------ Compiled with error(s): ------
assignment is allowed only for variables or array elements
line 3, column 3


Return to “MultiCharts”