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.

AllinOneAlerts – Amibroker Alerts Module for Algomojo Users

AllinOneAlerts is one of the most important and most requested modules is to bring all sorts of alerts with few lines of coding efforts....
Rajandran R
58 sec read

Algomojo Platform Now Open to Angel Broking Users

We are proud to provide our Algomojo access to Angel Broking users. Now users of Angel Broking can enjoy Free API-based algotrading access. Free...
Rajandran R
4 min read

Algomojo Trading Platform Fee Reduced for Existing Brokers Clients

Algomojo strives to bring low-cost Algo trading services with a better user experience. We are always looking for new ways to improve our services and...
Rajandran R
50 sec read

Leave a Reply

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