[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Re: Any Trade Station Coders Out There?



PureBytes Links

Trading Reference Links

Dimitris-

Thanks for your interest and help.

When I couldn't get "<>" to work I "brute forced" the comparison. Later
I found the "!=" comparison operator in the documentation. Thanks.

I presume the second instance of arc tangent should be converted from
radians to degrees as well. Is the line

"Phase = Iif(I1 != 0, 57.3 * Atan(Q1/I1), Phase);"

appropriate for this? (If I do this it appears to create large
oscillations in the MAMA and FAMA so something must still be wrong!)

I remain concerned about the initialization of variables and the
sequence of the calculations (Your initial comment) I basically
converted the TradeStation code line by line. I am unclear about the
order that is required in AFL. Does AFL process each line of code for
every bar sequentially and then proceed to the next line of code? If
so, then the order of the calculations definitely needs to be rearranged
so that all of the predecessor calculations are done first before they
are called If, on the other hand, the entire AFL code is run for each
day in sequence then the current order seems acceptable because Var(-x)
will have been computed x passes before.

The TradeStation code appears to be an implied loop as the first line is

"If CurrentBar > 5 then begin"

and the final line is "End;". There is no explicit incrementation of
this loop but this implies to me that TradeStation goes through the
entire code before stepping to the next bar.

AFL seems to require and accept the initialization that I did to run but
maybe the initialization that I have done is incorrect. What is the
correct way to do this?

Best regards and thanks for your help.
-Tom McDaniel