Setup Ecode Pro

Dear all Traders,

I create this post with purpose for my clients to use eCodePro.

eCodePro is a library that help trader automated trading by them-self, help trader easy create robot trading with any strategies.

Full versionhttps://www.mql5.com/en/market/product/116793

Trial version: let download file attachment named “E Code Pro.ex5” in  this link https://drive.google.com/drive/folders/1Lz4KwviTJD8vMPnuscWokVDI1D-qflBd?usp=drive_link

STEP 1 – INSTALL E CODE PRO (eCodePro)

1. Download ‘E Code Pro.ex5’

Let download eCodePro.ex5 directly from mql5.com by click on link above. After that you will see a folder named “Market” like the picture bellow

Image

2. Download eCodeHeader.mqh

Let download eCodeHeader.mqh by click on link of attachment file. After that move that file to Market folder, make sure you can see 2 file in like picture bellow

Image

3. Create your-own robot

Create your own robot directly from folder Market, then add #include like picture bellow

Image

Note. You add code as row 10th, the code exactly:

#include            “.//eCodeHeader.mqh”

4. Attach E Code Pro on any Chart

Attach “E Code Pro.ex5” to any Chart, you will see the message like picture below, that meaning you have successful install eCodePro into your Termnial

Image

5. Attach your-own robot to new Chart

After you finish step 4, let attach your-own robot to new chart.

From now you can use eCodePro Library in your code.

STEP 2. PRACTICE USE ECODEPRO BY VIDEOS (Update soon)

Files:

EXAMPLE 1 – SIMPLEST EA USE RSI VALUE

Buy condition: total buy < 3 && RSI value > 50

Sell condition: total sell < 3 && RSI value < 50

Before we start coding, let think what we need?

1. We need to counting Positions and Orders. Use eCode.count._getData() to counting

2. We need to get data of RSI. Use eCodeIndicators to help get them

3. We need to trade functions. Use eCode.trade to entry any order we want

Full video step by step here

#property copyright "eCodePro"
#property link      "https://www.mql5.com/en/market/product/92908"
#property version   "1.00"
#property description ""
#include ".//eCodeHeader.mqh"    //Very important, need header file run with code
//====================================================================================================================
//====================================================================================================================
input uint ipSlPoint = 200;      //SL Points
input uint ipTpPoint = 200;      //TP Points
input double ipVolFix = 0.01;    //Volume trade

input bool ipShowButtons = false;   //Show Quick buttons
input ulong ipMagic = 0;            //Magic
//====================================================================================================================
//====================================================================================================================
int OnInit() {
   EventSetTimer(1);
   eCode._check(_Symbol);     //Check symbol before trade, result will be shown at 'Experts' tab in MT5
   return(INIT_SUCCEEDED);
}
//====================================================================================================================
//====================================================================================================================
void OnDeinit(const int reason) {
   eCode.draw.deleteObjects();      //Delete all buttons before you remove EA from chart
   EventKillTimer();
}
//====================================================================================================================
//====================================================================================================================
void OnTick() {
   
}
//====================================================================================================================
//====================================================================================================================
void OnTimer() {
   eCode.count._getData(_Symbol,ipMagic);    //Counting all Positions and Orders
   eCode.read._getData(_Symbol,ipMagic);
   eCode.info.sym._getData(_Symbol);   //Get data of symbol, ready for trade
   
   eCodeIndicators:: m_Osciallators:: m_relativeStrengthIndex indRSI;
   indRSI._getData(_Symbol,PERIOD_CURRENT,14,PRICE_CLOSE,21);
   bool buyCondition = eCode.count.buy < 3 && indRSI.rsi[0] > 50;
   bool selCondition = eCode.count.sel < 3 && indRSI.rsi[0] < 50;
   
   double volTrade = eCode.volCalculate.res(_Symbol,ipVolFix);
   
   if(buyCondition)
      eCode.trade._(_Symbol,ORDER_TYPE_BUY,0,volTrade,ipSlPoint,ipTpPoint,"RSI-Buy"+string(eCode.count.buy),ipMagic);
      
   if(selCondition)
      eCode.trade._(_Symbol,ORDER_TYPE_SELL,0,volTrade,ipSlPoint,ipTpPoint,"RSI-Sel"+string(eCode.count.sel),ipMagic);
}
//====================================================================================================================
//====================================================================================================================
void OnChartEvent(const int id,const long &lparam,const double &dparam,const string &sparam) {
   eCode.draw.quickControl(ipShowButtons,id,lparam,dparam,sparam,ipMagic);
   eCode.draw.quickEntry(ipShowButtons,id,lparam,dparam,sparam,ipMagic);
}
//====================================================================================================================
//====================================================================================================================

Leave a Comment

×

    GET FREE LICENSE
    Apply to use eCodePro library for create your own trading robot