I wish to create an Array (Array XY) where the first "10" bars are the "Close" price of that bar and then the rest (from bar 11 on) are a formula that includes the previous bars value in that formula.
For example Bars 1-10 = Close Bars 11 to Current Bar = (Close + Ref (Array XY, -1)) / 2 Please note that above is not the formula but an example to make it simpler.I have tried If and IIf Statements but no luck as yet. I am trying to convert the below part of a TradeStation formula to afl. "// Input: Price(numericeseries), Period(numericsimple); Vars: Mm (0); If (currentbar <= period) then mm = Price; If(currentbar > period) then mm = (mm[1] + price)/2; ADP = mm; End; //" I am at a loss, any direction would be great. Crashoz
