Login Page - Create Account

Support Board


Date/Time: Sat, 23 Nov 2024 15:21:19 +0000



Same Formula Functioning Differently with Different Studies

View Count: 90

[2024-08-25 20:44:16]
Rich_B - Posts: 31
Hi

I have tested the following formula using the Colour Background Based On Alert Condition Study ...

=AND(C>H[-1], C>H[-2], C[-2]<H[-2])

This highlights the second green candle if it closes above the high of a red candle two bars earlier. The highlight study works as expected.

When I take the exact same formula and use it in the Trading System Based On Alert Condition study, it executes more trades at different bars than those highlighted using the Colour Background study.

I have checked the Trade Activity Log which confirms that it is the Trading System Based On Alert Condition study that is executing the trades.

Can anyone point out where I am going wrong?

Thank you
[2024-08-25 21:04:01]
Rich_B - Posts: 31
I figured it out, but leaving the post active in case it helps anyone else.

I noticed during the bar-by-bar replay that there was a split second the background highlighted ... this indicated that one of the earlier parts of the formula was momentarily TRUE (before the subsequent AND conditions had been met).

I changed the settings to alert on bar close only on both the Settings And Inputs and Alerts tabs. This fixed it.
Date Time Of Last Edit: 2024-08-25 21:15:20

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account