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

Re: XAverage (simple function)



PureBytes Links

Trading Reference Links

> factor1 = (H - L)*2.5; 
> What is the meaning of the following?
> factor3 = XAverage(factor1,emaLength); 
> 
> I understand the application of XAverage (EMA) when used on close
> prices, for example. But what will it do in this case? 

xaverage doesn't care whether you pass it close prices or any 
other numeric value.  It only looks at the current value you pass 
it, and treats it as a numeric value (even though the function 
declares it as a NumericSeries).  So that code will just 
calculate the xaverage of (H-L)*2.5.

> I'm trying to translate some EasyLanguage code but I cannot figure
> out how to run it in TS 2000i. 
> When creating it as a signal in PowerEditor and verifying it I get a
> "Word not recognized by EasyLanguage" error on "Short" portion of
> "Short × Sell Short("SE") Next Bar at trigger limit;" 
> I also get the same on "Cover" in "Buy to Cover ("SX Trgt") 

Your problem is TRAD's gratuitous change in syntax, for no good 
reason other than to appeal more to stock traders.  "Sell Short" 
and "Buy to Cover" are TS6/7-isms.  

In TS7 you "buy" to go long, and "sell" to exit your long 
position, "sell short" to go short, and "buy to cover" to exit 
the short position.  In TS2k you use buy / exitlong and sell / 
exitshort.

Note that "sell" works on both TS2k and TS7, but it means totally 
different things on the two platforms!!

Gary