Hi,
I was taught that pointer is stored with address and series is an array.
So what is the address of this sentence below stored to Price pointer?
or the address itself is the price value here?
var *Price = series(price());
In the sentence below, Why it is not using "*Trend" instead of just "Trend"?
When I want to use the latest value of trend, don't I use (*Trend(0))?
if(valley(Trend))
I took those sentence from the script below.
Thanks in advance.
function run()
{
var *Price = series(price());
var *Trend = series(LowPass(Price,1000));
var *Signals = series(0);
Stop = 4*ATR(100);
if(valley(Trend)) {
if(Sum(Signals,4) == 0) // no signals in the last 4 bars?
enterLong();
Signals[0] = 1; // store the signal
} else if(peak(Trend)) {
if(Sum(Signals,4) == 0)
enterShort();
Signals[0] = 1;
} else
Signals[0] = 0;
}