Download the Installation File From
https://drive.google.com/open?id=0B-AWKNHhYByLT1pBam9adEREUVk
Install the File as Administrator...
Pre-Install Close AmiBroker and  Close any Open PDF File
Post-Install Read the AmiBridge_Help.pdf file Located in C:\Users\Public\Documents
Present Scenario...
To Place Order from Amibroker to Pi using PiBridge..
One has to code complex AFL formula to avoid multiple Order Firing for a single Signal..
Else Many Orders will get Generated For a Single Signal.
Using The DLL
No Need of Complex code...
Just the below code will do the Job.
For Buy Order
Place the below code after your Buy Condition
if (LastValue(Buy))
{Order = CreateStaticObject("AmiBridge.Pi");
Order.PlaceOrder(Name(),LastValue(C),"BUY");}
For Sell Order
Place the below code after your Sell Condition
if (LastValue(Sell))
{Order = CreateStaticObject("AmiBridge.Pi");
Order.PlaceOrder(Name(),LastValue(C),"SELL");}
For Short Order
Place the below code after your Short Condition
if (LastValue(Short))
{Order = CreateStaticObject("AmiBridge.Pi");
Order.PlaceOrder(Name(),LastValue(C),"SHORT");}
For Cover Order
Place the below code after your Cover Condition
if (LastValue(Cover))
{Order = CreateStaticObject("AmiBridge.Pi");
Order.PlaceOrder(Name(),LastValue(C),"COVER");}
Other Functions
To Test PiBridge Connection and Order Placement
TestOrder=ParamTrigger("To Test PiBridge Connection","Press Here");
if (TestOrder)
{Order = CreateStaticObject("AmiBridge.Pi");
Order.TestOrder();}
To See the Symbol Details for a Ticker
SymbolDetails=ParamTrigger("To Check Symbol Details","Press Here");
if (SymbolDetails)
{Order = CreateStaticObject("AmiBridge.Pi");
Order.SymbolDetails(Name());}
To Retrieve all Symbol Details from SymbolMapper.txt File
GetSymbol=ParamTrigger("To Retreive All Symbols","Press Here");
if (GetSymbol)
{Order = CreateStaticObject("AmiBridge.Pi");
Order.GetSymbol();}
To Setup Messaging System
msgsetup=ParamTrigger("Message Setup","Press Here");
if (msgsetup)
{Order = CreateStaticObject("AmiBridge.Pi");
Order.msgsetup();}
*********************************************************************************************************************
SymbolMapper.txt File is available in the Folder C:\Users\Public\Documents
Open The text File and enter the Symbol details as per the Format.One Line Per Ticker
Enter Symbol details without space in-between
1. First Word will be Your Ticker Name as it is in AmiBroker followed by Comma.
2. Second Word Exchange followed by Comma: Supported; NSE, NFO, MCX
3. Third Word will be Trade Symbol as it is in Pi followed by Comma.Ex:- AXISBANK-EQ, NIFTY15AUGFUT
4. Fourth Word will be Symbol as it is in Pi followed by Comma. Ex:- AXISBANK, NIFTY
5. Fifth Word will be Qty followed by Comma. If Equity then No of Shares to Buy/Sell..If Futures, No of Lots (Not Lot Size)
6. Sixth Word will be Order Type followed by Comma; L or MKT
7. Seventh Word will be Product Type followed by Comma; MIS , NRML ..
8. Eighth Word will be Zerodha Client Id AB0123
Complete Example:
NIFTY-I,NFO,NIFTY15AUGFUT,NIFTY,5,MKT,MIS,DC3014
ACC,NSE,ACC-EQ,ACC,5,MKT,MIS,DC3014
SILVERM,MCX,SILVERM15AUGFUT,SILVERM,5,L,MIS,AB3014
*********************************************************************************************************************
Salient Features of This Dll.
# No Need of Complex Coding in AFL
# Only One order Per Signal
# When Signal is triggered in Amibroker..It will place order in Pi with Symbol Details Provided and a PopUp Window will alert Order Trigger.Popup will auto close after 5 Sec
# If Symbol Details not found for a Ticker..Popup will be shown to alert u that symbol Details not available..Popup will Auto close after 10 sec
# Multiple Symbol Supported
# Sound Alerts
If U want to change the default alert sound…download the desired .wav file and rename it as Alert.wav and Place it C:\Users\Public\Documents folder (Donot use Long Playing sound)
Requirements:
User Must Have Installed Amibroker
Must have enabled PiBridge
Installed PiBridge
Trading System AFL
-------------------------------------------------------------------------------------------------------------------------------------------------------
{Note…It still uses PiBridge to Place Order in Pi
It acts as an intermediary Between PiBridge and Amibroker..Thereby Restricts Multiple Order.
Generated orders will be in Alerts Ă Generated Alerts Window (if Live Semi Automatic Options is Selected in Pi User settings)
It is not Meant For Fully Automatic Trading.
User has to Confirm the Order in Pi}
Whenever U Upgrade Pi and PiBridge..U must Re-Install This exe File to work Properly
Do Not Use Normal PiBridge Code in Your AFL else You will Get error