I would like to count the number of a ticks(how far it moves) after a trigger from a RTX signal until the next RTX signal triggers a reversal. I would also like an average over X instances. any guidance and what tokens to use would be appreciated.
I would like to count the number of a ticks(how far it moves) after a trigger from a RTX signal until the next RTX signal triggers a reversal. I would also like an average over X instances. any guidance and what tokens to use would be appreciated.
If you have already created a signal you can use the signal statistics feature to find this information.
Right-click chart > Add > Technical indicator > Signal statistics
Then select the signal you have already created, under the signal statistics options you can now select "price at n signals ago" or "price at last signal".
If you wanted to find the price difference between the last 2 signals then you can open up a custom indicator and create 2 SSTAT tokens (signal statistic) and using the "price n bars ago result" you can configure SSTAT_a to 1 signal ago and SSTAT_b to 2 signals ago. Now you can return the difference in the custom indicator simply with the following RTL code:
(SSTAT_a - SSTAT_b)
thanks! I'll give that a try