Login Page - Create Account

Support Board


Date/Time: Wed, 27 Nov 2024 15:59:45 +0000



Post From: sc.IsSwingLow not working in Replay Backtest

[2024-07-26 07:13:27]
User431178 - Posts: 544
Yes, tried calling it with sc.Index and v2661. Also tried pulling from the study

Calling with sc.Index directly is not going to work at all for swing low (or correctly for swing high).

Both functions look backwards and forwards by the specified length, checking for lower low / higher high.

sc.IsSwingLow and sc.IsSwingHigh without the index parameter seem incorrect, as they start at the current bar.

User719512 mentioned the source code, suggest looking at that (\ACS_Source\Studies6.cpp "Swing High And Low"), you will then see how to use the functions (with the index parameter) correctly.