Hi, hope someone could help me.. i'm trying to learn how amibroker work.
I would like to make a simple trading system, that Buy (or Alert) when price is near some moving avarage.
So i write something like:
MaxDistance=0.5;
myavarage = 200;
dist = (( Close / EMA(Close,myavarage ) )*100)-100;
Buy = iif(dist<MaxDist, 1,Buy);
// Another avarage
myavarage = 100;
dist = (( Close / EMA(Close,myavarage ) )*100)-100;
Buy = iif(dist<MaxDist, 1,Buy);
But it seems not work...
Someone expert with Amibroker can help me ?
Thank you and regards!
I would like to make a simple trading system, that Buy (or Alert) when price is near some moving avarage.
So i write something like:
MaxDistance=0.5;
myavarage = 200;
dist = (( Close / EMA(Close,myavarage ) )*100)-100;
Buy = iif(dist<MaxDist, 1,Buy);
// Another avarage
myavarage = 100;
dist = (( Close / EMA(Close,myavarage ) )*100)-100;
Buy = iif(dist<MaxDist, 1,Buy);
But it seems not work...
Someone expert with Amibroker can help me ?
Thank you and regards!