Hi,
I tried many workarounds to implement your requirement but unfortunately this implementation is too heavy for VJF because it needs at least 2 loop cycles one inseide the other. When using the 9 previous candles and embedding this cycle into another to get the previous values of your Cyclo (I tried with 20 previous candles) the historical tester became very slow and it is almost impossible to achieve the test. Therefore at this stage I recommend the programming using Java. You can check the automated trading section of this forum or contact an external programmer from this list:
https://www.dukascopy.com/fxcomm/member ... am_serviceApologies for the inconvenience