Rajandran R Founder of Marketcalls and Co-Founder Algomojo. Full-Time Derivative Trader. Expert in Designing Trading Systems (Amibroker, Ninjatrader, Metatrader, Python, Pinescript). Trading the markets since 2006. Mentoring Traders on Trading System Designing, Market Profile, Orderflow and Trade Automation.

How to Send Orders from Metatrader 4 Expert Advisor to Algomojo Trading Account

1 min read

This tutorial helps you to convert your Metatrader 4 expert advisor to send automated orders to the Algomojo Platform. Currently, Algomojo supported brokers are Aliceblue, Enrich, Tradejini, Zebu are the partner brokers.

This Video tutorial is divided into two parts

1)Installing the Algmojo Multi Platform – Multi Broker Bridge
2)Configuring the Sample MT4 Expert advisor to send automated orders to Algomojo connected brokers (Aliceblue, Tradejini, Zebu, Enrich)

Installing the Algmojo Multi Platform – Multi Broker Bridge

Configuring the Sample MT4 Expert Advisor

MT4 Algomojo Modules to Send Automated Orders

//Algomojo Autotrading Modules

input string user_apikey = "xxxxxxxxxxxxxxxxxxxxxx"; //Enter your API key here
input string api_secretkey = "xxxxxxxxxxxxxxxxxxxxxx"; //Enter your API secret key here
input string s_prdt_ali = "BO:BO||CNC:CNC||CO:CO||MIS:MIS||NRML:NRML";
input string Tsym = "NIFTY20NOVFUT"; //Symbol Name
input string exch = "NFO"; //Exchange
input string Ret = "DAY"; //Retention
input string prctyp = "MKT"; // Pricetype
input string Pcode = "MIS"; // Product Code
input int qty = 150; // Quantity
input string AMO = "NO"; //AMO Order
input string stgy_name = "Metatrader Strategy"; // Strategy Name
input string broker = "ab"; //Broker Short code ab - aliceblue, tj- tradejini, zb - zebu , en - enrich
input string ver = "1.0"; //API Version

string response;
string api_data;

#import "AMMT4BRIDGE.dll"
     string AMDispatcher(string api_key, string api_secret, string api_name, string api_data, string br_code, string version);
#import

Algomojo Buy (Double the quantity) to reverse your position

//Algomojo Place Buy Order


api_data ="{\"stgy_name\":\""+stgy_name+"\",\"s_prdt_ali\":\""+s_prdt_ali+"\",\"Tsym\":\""+Tsym+"\",\"exch\":\""+exch+"\",\"Ttranstype\":\""+"B"+"\",\"Ret\":\""+Ret+"\",\"prctyp\":\""+prctyp+"\",\"qty\":\""+qty*2+"\",\"discqty\":\""+"0"+"\",\"MktPro\":\""+"NA"+"\",\"Price\":\""+"0"+"\",\"TrigPrice\":\""+"0"+"\",\"Pcode\":\""+Pcode+"\",\"AMO\":\""+AMO+"\"}";
         
      response=AMDispatcher(user_apikey, api_secretkey,"PlaceOrder",api_data,broker,ver);
      Print("api : " ,api_data);
      Print("Algomojo Buy Order response : " ,response);

Algomojo Sell (Double the quantity) to reverse your position

//Algomojo Place Sell Order


api_data ="{\"stgy_name\":\""+stgy_name+"\",\"s_prdt_ali\":\""+s_prdt_ali+"\",\"Tsym\":\""+Tsym+"\",\"exch\":\""+exch+"\",\"Ttranstype\":\""+"S"+"\",\"Ret\":\""+Ret+"\",\"prctyp\":\""+prctyp+"\",\"qty\":\""+qty*2+"\",\"discqty\":\""+"0"+"\",\"MktPro\":\""+"NA"+"\",\"Price\":\""+"0"+"\",\"TrigPrice\":\""+"0"+"\",\"Pcode\":\""+Pcode+"\",\"AMO\":\""+AMO+"\"}";
         
      response=AMDispatcher(user_apikey, api_secretkey,"PlaceOrder",api_data,broker,ver);
      Print("api : " ,api_data);
      Print("Algomojo Sell Order response : " ,response);
Rajandran R Founder of Marketcalls and Co-Founder Algomojo. Full-Time Derivative Trader. Expert in Designing Trading Systems (Amibroker, Ninjatrader, Metatrader, Python, Pinescript). Trading the markets since 2006. Mentoring Traders on Trading System Designing, Market Profile, Orderflow and Trade Automation.

Amibroker Execution Module – Hedged Index Futures for Directional…

In the last tutorial, we learn the importance of Hedging Futures Position with OTM Options for Reduced Margin. This tutorial focus on how to...
Rajandran R
14 min read

Multi Legged Options Execution – Amibroker Module – Button…

This tutorial provides you a basic framework for sending multi-legged options module and how to exit the multi-legged option module using a simple button...
Rajandran R
8 min read

Sending Option Orders and Exiting Option Orders in Algomojo…

This tutorial helps you to understand the options trading module and the requirements to set up and send and exit option orders from Amibroker...
Rajandran R
5 min read

Leave a Reply

Get Notifications, Alerts on Market Updates, Trading Tools, Automation & More