How to fire order once signal gets generated by amibroker analysis window

HI,

I’ve just opened an account with Zerodha after 7 long years of sharing profit or extending losses to my old Broker. I’ve been trying to automate my strategy since long time Zerodha has given power to me with its PI & PI bridge. Thanks to Zerodha & Team.

I’ve been using an AFL which generates buy/sell signals. Can you pls help me what needs to be done after installing pi bridge to punch orders to PI. I’ve mentioned below my queries in detail.

–>Should I need to have individual symbol opened as charts for order to get punched from Ami to PI?

–> Can I use automatic analysis window to generate buy/sell alerts & punch orders to PI?

–> What are the modifications needed to my AFL to punch order?

–>I’ve backtested 15 symbols with my AFL so should I need to have 15 different AFL or can 1 AFL add the scrip name & punch order according to the signals generated.

–> Most importantly, I’m purely trading intraday so I would like use Bracket order/Cover order feature for my trading can I punch order directly as BO/CO from PI bridge?

–> If the above option is possible, once sell/cover order fires for a open position should we just confirm the trade or should we go to admin positions & close the trade?

–> As per my AFL Trailing SL keeps updating so is there a feature to modify the same once I’m in a open position or should I need to modify manually?

Thanks in advance.

Regard,

Manjunath SJ

Hi Manju..

Welcome to TradingQnA.

Answer for Your Last Three Points....

Currently PiBridge doesn't support BO/CO order Placement...

Modification of  Order is also Not available at Present...

But There is  a upgrade to PiBridge very soon which have Order Modification and Cancelation..

Answer for Your Rest of the Points..

I Assume that u have coded your strategy in a single AFL...

To apply your AFL and generate signal on multiple Symbol...There are two Options..

Option I

Open a blank Chart for each symbol..and Drag and Drop your AFL on each chart and Modify the PiBridge code for each symbol like Exchange, Trade Symbol Qty...etc..

Tile Vertically /  horizontally all the Chart..So That all Chart are visible and all chart will update simultaneously..

Any signal Generated on Any Symbol....will get fired to Pi through Pi Bridge...

Option II

Add the Desired symbols to a watch list (any number of symbols)

Send your AFL to automatic Analysis window

and make Necessary settings in Backtester Settings..

(Most Important Positions - Long and Short  Periodicity - Your Chart Interval/Time Frame)

Set Auto Repeat Interval to 1s and Tick AR

Apply  Filter to Scan

Now Press Scan...

It will scan all the symbols in the watch list u filtered with your AFL every second...

Any signal generated on any symbol will get reflected in Pi..

No need to Open Chart for Each symbol....U can keep open single chart also...

But....you have to code in your AFL in such a way that in should dynamically get symbol details for each ticker...So many Example AFL's are available in this forum for retreiving symbol details from text file...

If U have problem in coding..then download the dll from the below link...Which can be used along with PiBridge...It doesn't need complex code in  AFL to get Symbol Details and easy to use...It supports Multiple Symbol...

Please Go Through the below link...U 'll get a clear Idea..

http://tradingqna.com/12703/amibroker-bridge

http://tradingqna.com/13682/what-is-ami-broker-what-is-pi-bridge-how-they-help-us-to-trade

http://tradingqna.com/19400/afl-pi-bridge-code-error

http://zerodha.com/z-connect/tradezerodha/pi-bridge/pi-bridge-for-amibroker