You may face problems if, Amibroker settings are not correct or, Your AFL has errors. All these problems such as
Signal in Amibroker but no order placed
Order placed but no signal in Amibroker
Too Many Orders Placed From Amibroker
Wrong price sent in order
are due to only two problems: wrong amibroker settings, or wrong afl
Note that all Amibroker related issues are independent of APIBridge.
You can close APIBridge, and use only Amibroker to solve problems.
99% of AFLs available on internet have repainting signals. Many a times one may see that a buy / sell signal appears on the chart, and vanishes before the completion of the candle.
To check repainting, you need to bar-replay with minimum time interval. In this example, I have bar-replay with 1-min time interval but the chart time frame is 15-minute.
Also another problem is that signal does not appear on current candle, but appears after candle completion.
The solution to both these problems is to change parameter Trade Intrabar? Candle Completion.
Some badly programmed AFL show arrow on chart, but do not have buy-sell signal. See this AFL. It shows perfect arrows on bar-replay. But there is no order placed.
To find such bad AFLs we add the code from plotAllsignals.afl
Order placed but no signal in Amibroker -Problem with AFL
Use plotAllsignals.afl to find such bad AFLs.
Notice that after applying plotAllsignals.afl , the hidden signals are also visible. (apply on pane before original AFL)
Important: Preventing Strategy From Misfire
Note these very important features we have made to limit your losses, even when strategy misfires.
By specifying the max orders per minute and max trades per minute, you can avoid too many orders getting placed. Even if your strategy misfires.
In symbol settings we have MaxOpenPosition. It does not allow to create long/short position beyong specified quantity, even if the strategy misfires.
The MaxLoss attempts to squareoff your trade in Unrealized MTM goes below the specified value.
Wrong price sent in order -Wrong Settings in Amibroker
You should be very careful in sending Limit orders in Amibroker. Because very few AFLs are programmed to send the Limit order price.
We recommend you to take professional help from a programmer to fix problems in your AFL code. If AFL gives wrong price, you can still use it with market orders. Markets orders are sent to broker with 0 price always
Recent Discussion