Manta, Ecuador
Site Administrator Developer Swing Trader
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,399 since Jun 2009
Thanks Given: 33,175
Thanks Received: 101,541
|
A quick look at the code indicates it is using a single array "arr2[]" to hold the values of 8 moving averages. I would just take this Indicator code and convert it to a Function, then have that function return the array values to your Signal.
From the signal, just look at the minimum value and the maximum value, and look for the cross over.
You can open up existing Functions and see how they differ from Indicators. Mainly two differences: a) the input block keywords, and b) how they return values. Make those two adjustments, and delete the Plots(), and you now have your function. You can also open up example Signals and see how they call functions to get values.
Mike
|