In post http://forum.esignalcentral.com/show...=lowerDonchian I saw reference to the upperDonchian and lowerDonchian and have incorporated the code into a few strategies.
When those strategies are run for 30 days of 1 minute data on EUR A0-FX Esignal and my PC crashes requiring a reboot.
When a simplier function such as low() is substituted it runs for 1986 ms and 27K function calls according to the performance monitor.
When the donchian functions are run it takes 284000 ms, in elapsed time thats 2 seconds without the functions to almost 5 minutes with them on 10 days data, beyond that it crashes my system.
Either I'm invoking them incorrectly or something is definately wrong.
If the functions are being invoked correctly then I can't imagine that they would not have discovered this in the system release testing.
When those strategies are run for 30 days of 1 minute data on EUR A0-FX Esignal and my PC crashes requiring a reboot.
When a simplier function such as low() is substituted it runs for 1986 ms and 27K function calls according to the performance monitor.
When the donchian functions are run it takes 284000 ms, in elapsed time thats 2 seconds without the functions to almost 5 minutes with them on 10 days data, beyond that it crashes my system.
Either I'm invoking them incorrectly or something is definately wrong.
If the functions are being invoked correctly then I can't imagine that they would not have discovered this in the system release testing.
PHP Code:
if ((Strategy.isInTrade() == true) && (Strategy.isShort() == true) ) {
TrailingStop = (1 + TrailingStopPercent) * lowerDonchian(BarsSinceEntry, low(),0);
// TrailingStop = (1 + TrailingStopPercent) * low(0);
BarsSinceEntry = BarsSinceEntry + 1;
}
if ((Strategy.isInTrade() == true) && (Strategy.isLong() == true) ) {
TrailingStop = (1 - TrailingStopPercent) * upperDonchian(BarsSinceEntry, high(),0);
// TrailingStop = (1 - TrailingStopPercent) * high(0);
BarsSinceEntry = BarsSinceEntry + 1;
}
Comment