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

Re: Any Trade Station Coders Out There?



PureBytes Links

Trading Reference Links

Tom,
I have no idea how Tradestation operates.
I went first to S&C Tips, September 2001 and found the code from
Mr. Tom Kohl.
Then I went to tarnsoft.com and from similar codes I understood
that they give ArcTangent in degs.
In "Squelch that Whipsaw" he writes
180-Phase
and from this I am sure that he calculates ArcTangent in degs
and there is no need to read his Manual or ask him.
As for the relation:

A1=angle in degs
A2=angle in rads
A1=57.29*A2
or
A2=0.01745*A1

As I saw in our S&C Traders' Tips Issue 4/2001
we probably need some script here.
Dimitris Tsokakis 
--- In amibroker@xxxx, Tom McDaniel <tmtempe@xxxx> wrote:
> 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