Specific entry price script

Hi,

I’m using the Signal Tester on a couple of ideas. One involves triggering only if the code trades above a price level on the next bar after a signal.

For example the purple Showbar arrow is the current signal. Is there a function to make the next bar the signal (green arrow as entry) based on it being 6 cents higher than the previous bar high?

Thanks

Annotation-2020-02-26-150833.jpg

Hi Ben,

You could try the SIGNALAFTER function:

Sig1 = [Your Signal];

//Is the high at least 0.06 higher than yesterday?

Sig2 = HIGH() >= (HIGH(1)+0.06);

SIGNALAFTER(S1, S2)

Thanks Darren, much appreciated.

Is there a way to look only at the next bar?

I’ve tested using ShowBar and it often flags the condition numerous bars ahead of the trigger. For example the attached has the Purple as S1, and the Green is the SIGNALAFTER(S1, S2).

 

Annotation-2020-02-29-120352.jpg

All good Darren, have used the TIMESINCESIGNAL function to achieve what I’m looking for.

Cheers

Ben