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

Re: [amibroker] Sell signal ema gradient =0



PureBytes Links

Trading Reference Links

Title: Normal.dot Template
Hello,
 
If you looked a the bottom of editor window you will see the following error message
 
Sell = LinRegSlope((EMA( Close, 3 )) = 0
 
Error 31. Syntax error, expecting ')' or ','
 
Clearly the error message says that AmiBroker expects closing parenthesis or comma.
And it is exactly the case. Your formula actually misses BOTH (parenthesis AND comma),
because there are TREE opening parentheses but only two closing and there is a comma
missing and second parameter of LinRegSlope missing. You are using also assignment instead of less or equal <= operator.
 
Correct formula would be:
 
Sell = LinRegSlope( ( EMA( Close, 3 ) ), 2 ) <= 0;
 
or simpler:
 
Sell = LinRegSlope( EMA( Close, 3 ), 2 ) <= 0;
 

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
Sent: Thursday, February 10, 2005 11:44 AM
Subject: [amibroker] Sell signal ema gradient =0

I want to generate a sell signal when the gradient of the 3 day EMA is less than or equal to 0. I have tried but Sell = LinRegSlope((EMA( Close, 3 )) = 0; but get an error. What is wrong with this?



Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html





Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html



Yahoo! Groups Sponsor
ADVERTISEMENT


Yahoo! Groups Links