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

error in TS Pro 6 easylanguage



PureBytes Links

Trading Reference Links

Solution to error in code had to do with need to treat price of data2 as a
variable instead of an input.

The code that works is as follows:

 {MA for data 2}
 Inputs:            MALength(1);

  Vars:    MA2(0, data2),

               Price(0 );

price = close of data2;

MA2 = AverageFC( price, MALength ); print(date,time," ",MA2);





----- Original Message -----
From: "Barry Silberman" <barry@xxxxxxxxxxxxxxxxxxxxx>
To: <omega-list@xxxxxxxxxx>
Sent: Thursday, November 15, 2001 11:34 AM
Subject: error in TS Pro 6 easylanguage


> There may be an error in the program when one has a data2 that is on a
> different time frame than data1.
>
> A simple 1 period MA is fine if data1 and data2 are both say 1 minute
bars.
>
> However, if data1 is 1 minute and data2 is 5 minutes, the values for the 1
> pd MA is wrong.
>
> The Easylanguage department at Tradestation is looking into this, and when
> then get back to me I'll advise the list.
>
> Barry
>
>
> This is the code I used:
>
>  Inputs:  Price(close data2),
>               MALength(1);
>  Vars:    MA2(0, data2);
>
>  MA2 = AverageFC( Price, MALength );
>
>  Commentary("", newline, newline ,
>
>             "4- MA2=", MA2, newline,
>
>             "5- price=", price, newline,
>
>             "6- MAlength=", MAlength, newline,
>
>             "7- AverageFC( Price, MALength )=", AverageFC( Price,
> MALength ));
>
>
>