Skip to main content

OHLC indicator for Amibroker (AFL)

godisbogus about 16 years ago Amibroker (AFL)

  • Rating:
    4 / 5 (Votes 3)
  • Tags:
    amibroker, intraday

This indicator should be used only for intraday trading. It is very simple. As soon as the price crosses 0.5% on upper side from previous close just buy. And if the price crosses 0.5% on the down side from previous close initiate short.

You cannot view the code for the following reasons:
  • You must be a member.

4 comments

almost 9 years ago

Add “n” before Low, High & PCL

-----------------------------
"\Low :" +WriteVal(Daylow);
"\High :" +WriteVal(Dayhigh);
"\PCL :" +WriteVal(Dayc);
----------------------------

Replace above lines with below lines:

--------------------------------------
"\nLow :" +WriteVal(Daylow);
"\nHigh :" +WriteVal(Dayhigh);
"\nPCL :" +WriteVal(Dayc);
-------------------------------------
about 5 years ago

i am getting below error

Error 701. Missing buy/sell variable assignments.
The formula that you are trying to backtest does not contain proper Buy and Sell rules. Buy and Sell rules should be written as assignments as shown below:

Buy = Cross( Close, MA );
Sell = Cross( MA, Close ) );

For more details see Tutorial: Backtesting your trading ideas

Leave Comment

Please login here to leave a comment.