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

ma of spd



PureBytes Links

Trading Reference Links

Coders:

I need to be able to see 2 emas of a spread line, created by two data
streams in data1 and data2.  I need to be able to see this in line
crossovers or a histogram.

A spread function was written as follows for spreading the mini spoos and
mini nasdogs:
=====================================

{function: Spd
by Don Roos, 2001}

Input: input1(numeric), Input2(numeric);
Spd=Input1*20-Input2*50;

======================================

The function is added to the TS indicator below, and it does work, but I am
unsure if it is actually plotting the ma of the spreadline.   Is this
working as I explained?
======================================

Input: Spd(close),Length1(20), Length2(10),Length3(5),Length4(2);

Plot1(XAverage(XAverage(Close,Length1),Length2),"XAvg1";
Plot2(XAverage(XAverage(Close,Length3),Length4),"XAvg2";

IF CheckAlert Then Begin
    If Plot1 Crosses Above Plot2 or Plot1 Crosses Below Plot2

    Then Alert=True;
End;
================================================

I would also like to apply a stochastic to the spread line.

Thanks,

Don