Thanks to everyone replying. I'll explain my request due to restrictions of me not being able to post the codes. I have 4 Signals. Each buy Signal is from 4 different indicators that I've combined. 3 of them are proprietary and I have no permission to post them. Sorry about that everyone and I understand if help is not provided due to lack of information. Here goes.
Each signal are Buy Signal from respective indicators;
Signal1= Indicator A
Signal2 = Indicator B
Signal3 = Indicator C
Signal4 = Indicator D
If Signal1 then Signal2, Signal3, Signal4 need to fulfill for a Final Signal. The condition must start with Signal1, Signal2-4 doesn't need to be in sequence.
Once Signal1 triggers, all the other 3 Signals might be coming from the same bar or different upcoming bars. This is where I'm stuck.
Indicator A(Signal1) triggers at bar X1,
Signal2 at bar X3,
Signal3 at bar X5,
Signal4 at bar X5,
The Final Signal will trigger at the close of bar X5 since it has now fulfilled all the conditions. The reset will be triggered by Signal1 if it appears anywhere in between and it will be treated as the new starting point.
My unsuccessful attempt:
plot finalsignal = if signal1 and signal2 and signal3 and signal4 then 1 else 0;
This ends up on finding a signal if all condition is met on the first bar X1. 😅. Thank you so much knowledgeable Thinkscripters and helping me learn to code. If answered this can help us combine a few indicators for solid final confirmation. Good day, all.