Amibroker AFL- Profit & Stoploss Trigger for Strategy
This page shows you step-wise how to turn any good Amibroker AFL into an intraday trading strategy with profit and stoploss trigger.
How to Use Profit & Stoploss Trigger (AFL)
Step 1: Click here to download the AFL file. Save it on standard location like desktop for convenient use in future.
Step 2: Apply your AFL strategy on chart which you want to use for AFL trading. You can also download an AFL strategy from the following articles:
Step 3: Drag-Drop the intraday.afl on your strategy chart. Right-click on chart to open parameter window.
Parameters for Setting Profit & Stoploss Trigger
StopLoss: It applies a stoploss trigger for current trade. The trigger is calculated from the closing price of signal generation candle. Example: If supertrend generates buy signal at 7800, and you apply stoploss of 40, it will trigger the stoploss @ 7760. The SL is plotted as a thick line on chart. Leave it to 0 if you do not want to apply SL.
Profit Target: It applies the profit target similar to the stoploss trigger.
Intraday Mode (YES/NO): If you turn intraday mode on, it will apply trade entry and exit time conditions on exiting strategy.
Trade Entry From: Specify in HHMM format the time after which you want to start trading. Some traders do not trade in first 15 minutes after market open because market is very volatile at this time.
Trade Entry Upto: Specify in HHMM format the time after which you do not want to take a fresh trade. Example: Many traders do not want to create a new position in last one hour of market.
Trade Exit Time: Time at which Amibroker will generate exit signal for open positions.
Color of Signals: color of the trade signals which are plotted on chart. The AFL uses arrow for entry signals and star for exit signals.
Strengths and Limitations AFL
This intraday.afl can be applied to any strategy. It does changes the original signal generation logic of strategy, but simply over-rides it with additional conditions.
Some AFL strategies freely available on internet do not even have properly defined buy, sell, short and cover conditions. This intraday.afl does not works with such AFLs.
This AFL cannot continue a signal from previous day. In the example of SuperTrend, if ST continues in sell signal from yesterday, this AFL cannot plot fresh Sell signal at market open. For this purpose, the complete modification of original afl is required. Please share your coding requirement in comments section or avail personal consultancy.