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
Real time strategy maxiddrawdown
-
- Posts: 283
- Joined: 05 Dec 2014
- Location: Italy
- Has thanked: 53 times
- Been thanked: 3 times
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: Real time strategy maxiddrawdown
Does `MaxIDDrawDown` return 0 immediately after you enable a strategy for real-time trading or not?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.
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.
-
- Posts: 283
- Joined: 05 Dec 2014
- Location: Italy
- Has thanked: 53 times
- Been thanked: 3 times
Re: Real time strategy maxiddrawdown
My strategy has performed several real trade but the value is still zero
Can you help me?
Can you help me?
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: Real time strategy maxiddrawdown
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.
-
- Posts: 283
- Joined: 05 Dec 2014
- Location: Italy
- Has thanked: 53 times
- Been thanked: 3 times
Re: Real time strategy maxiddrawdown
Code: Select all
if balance > 5000 and maxiddrawdown <> 0
then begin
N = Round((balance)/((maxiddrawdown*-1)),0);
end;
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: Real time strategy maxiddrawdown
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