My metatrader Experts and Indicators

pannet1

Well-Known Member
#1
Hi,

I am happy to provide you with the attached scalper expert that simply buys and sells when you delete the arrow.

Code:
//+------------------------------------------------------------------+
//|                                                          fti.mq4 |
//|                                        Copyright © 2017, pannet1 |
//|                                                       version 1  |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2017, [email protected]"

//+------------------------------------------------------------------+
//| this EA has parts of code from EAs trenor and training2          |
//| the good thing about this ea is that can be used for fti's dance |
//| https://www.forexfactory.com/showthread.php?t=57639. It can be   |
//| used for scalping that explains your strategy better. this  can  |
//| be used for trading manually in the strategy tester without      | 
//| having to burn your real money. that way you can practice the    |    
//| dance till heart content. you can also use it for playing trade  |    
//| game. buy by deleting green arrow and sell by deleting red       |    
//| you can change the lot size for buy and sell by changing the     |    
//| respective lots                                                  |    
//| THIS IS AN OPEN SOURCE EA MADE FOR THE INTEREST OF THE PUBLIC    |    
//| I ASSUME NO LIABLITY. WHEN YOU USE IT YOU AGREE TO USE IT AT     |    
//| YOUR OWN RISK                                                         |    
//+------------------------------------------------------------------+
//| expert initialization function                                   |
#include <stdlib.mqh>//for ErrorDescription

extern int space =10; // the space between the arrows and the highs and lows
extern double lot=0.1; // default lot size for buy and sell market orders
extern color BuyColor=Green; 
extern color SellColor=Red;  
int Ticket, err;
const double gap = space*Point;
int init()
  {
//----

   DrawLabels("buyLot", 1,  50, 250, lot, BuyColor ,0);
   DrawLabels("buy",    1, 100, 250, "Buy Lot", BuyColor ,0);
   
   DrawLabels("sellLot",3,  50, 250, lot, SellColor ,0);
   DrawLabels("sell",   3, 100, 250, "Sell Lot", SellColor,0);
   
   BuyArrow();  
   SellArrow();
   
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----
     ObjectDelete("up"); 
     ObjectDelete("down");
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {

//+------------------------------------------------------------------------------------+
//|                                 working with objects                               |   

 if(iBarShift(NULL,0,ObjectGet("up",OBJPROP_TIME1))>0
    ||ObjectGet("up",OBJPROP_PRICE1)!=High[1]+ gap )            
    { 
     ObjectMove("up",0, Time[1],High[1]+ gap );     
     if(ObjectFind("buyLot") != 0) {
     DrawLabels("buyLot", 1,  50, 250, lot, BuyColor ,0);
     } 
    } 
   
  if(iBarShift(NULL,0,ObjectGet("down",OBJPROP_TIME1))>0
     ||ObjectGet("down",OBJPROP_PRICE1)!=Low[1]- gap ) 
    {     
     ObjectMove("down",0, Time[1],Low[1]- gap);     
     
     if(ObjectFind("sellLot") != 0) {
     DrawLabels("sellLot", 3,  50, 250, lot, SellColor ,0);
     }
    }  
    
  if(ObjectFind("up") != 0) //if no objects                           
   {
     BuyOrder();     
     BuyArrow();
    }      
      
   if(ObjectFind("down") != 0) //if no objects                           
   {
     SellOrder();     
     SellArrow();
    }      
    
 
//|                                 working with objects                               |   
//+------------------------------------------------------------------------------------+


   return(0);
  }
//+------------------------------------------------------------------+

void BuyOrder() 
   {
   
      // find the label and get the lot from its description
      if(ObjectFind("buyLot")>-1)
      lot=StrToDouble(ObjectDescription("buyLot"));   
   
   
      Ticket=OrderSend(Symbol(),OP_BUY,lot,nd(Ask),3,
                        0,0,"",0,0,BuyColor);

      if(Ticket==-1)
        {
         err=GetLastError();
         Comment("Error of opening Buy ",err,": ",ErrorDescription(err));         
        }
       else
       return;

     }

void SellOrder() 
   {
      
      // find the label and get the lot from its description
      if(ObjectFind("sellLot")>-1)
      lot=StrToDouble(ObjectDescription("sellLot"));
      
   
      Ticket=OrderSend(Symbol(),OP_SELL,lot,nd(Bid),3,0,0,"",0,0,SellColor);

      if(Ticket==-1)
        {
         err=GetLastError();
         Comment("Error of opening Sell ",err,": ",ErrorDescription(err));        
        }
     }
//+------------------------------------------------------------------+
double nd(double in)
  {
   return(NormalizeDouble(in,Digits));
  }
//+------------------------------------------------------------------+

  void BuyArrow() {  
   ObjectCreate("up", OBJ_ARROW, 0, Time[1], High[1]+gap); //draw an up arrow
   ObjectSet("up", OBJPROP_STYLE, STYLE_DOT);
   ObjectSet("up", OBJPROP_ARROWCODE, SYMBOL_ARROWUP);
   // ObjectSet("up", OBJPROP_WIDTH, 5);
   ObjectSet("up", OBJPROP_COLOR, BuyColor);   
  } 
  
  void SellArrow() {
   ObjectCreate("down", OBJ_ARROW, 0, Time[1], Low[1]-gap); //draw a down arrow
   ObjectSet("down", OBJPROP_STYLE, STYLE_DOT);
   ObjectSet("down", OBJPROP_ARROWCODE, SYMBOL_ARROWDOWN);
   // ObjectSet("down", OBJPROP_WIDTH, 5);
   ObjectSet("down", OBJPROP_COLOR, SellColor);  
  }
   
   
  int DrawLabels(string name,int corn,int X,int Y,string Text,color Clr=0,int Win=0,int FSize=18)  {
   err=ObjectFind(name);
   if(err!=Win) {
      ObjectCreate(name,OBJ_LABEL,Win,0,0); 
     } else {
      return 0;
     }
   ObjectSet(name,OBJPROP_CORNER,corn);     
   ObjectSet(name,OBJPROP_XDISTANCE,X); 
   ObjectSet(name,OBJPROP_YDISTANCE,Y);
   ObjectSetText(name,Text,14,"Arial",Clr);      
  }
 

headstrong007

----- Full-Time ----- Day-Trader
#2
There are many free indicators available in internet for meta trader.
But very few people using MT4 and MT5 in india bcoz of not presence of good data providers...although rates are cheap but servers are outside and sometimes not so accurate data-problem. But overall we can trade with MetaTrader, if ignore small data problem few times.

************
We need a programming thread on Metatrader here like the popular thread on Amibroker started by happy..
may be u can make this one similar..
:thumb:

*************
I am adding few good data providers here, I know.. If some one know more with less data rate pls let us know..

http://www.finmas.in/mt4/
http://rtdatafeed.com/mt4.html
http://mt4realtimedata.com/

prices are very reasonable. No weekly option big disadvantages.
--------------
Add more. If anyone tested demo or using it..let us know
Please Add more..:)
If any one found MT5 better.

--------------------
Interest will automatically grow up only when, we find some trusted good data providers. Meta Trader is very easy and fast software for analysis.
 

pannet1

Well-Known Member
#3
There are many free indicators available in internet for meta trader.
But very few people using MT4 and MT5 in india bcoz of not presence of good data providers...although rates are cheap but servers are outside and sometimes not so accurate data-problem. But overall we can trade with MetaTrader, if ignore small data problem few times.

************
We need a programming thread on Metatrader here like the popular thread on Amibroker started by happy..
may be u can make this one similar..
:thumb:

*************
I am adding few good data providers here, I know.. If some one know more with less data rate pls let us know..

http://www.finmas.in/mt4/
http://rtdatafeed.com/mt4.html
http://mt4realtimedata.com/

prices are very reasonable. No weekly option big disadvantages.
--------------
Add more. If anyone tested demo or using it..let us know
Please Add more..:)
If any one found MT5 better.

--------------------
Interest will automatically grow up only when, we find some trusted good data providers. Meta Trader is very easy and fast software for analysis.
hi headstrong,

i was thinking till i read this post that we cannot trade on metatrader in NSE/BSE. now i am doubting that. Do you mean to say we can trade?
 

headstrong007

----- Full-Time ----- Day-Trader
#5
hi headstrong,

i was thinking till i read this post that we cannot trade on metatrader in NSE/BSE. now i am doubting that. Do you mean to say we can trade?
No, I never said we can trade with MT4... it is only for charting analysis untill NSE BSE give permission.:)

-----------
But MT4 is very good for analysis. Some providers like finmas has option to auto connect or auto trade/robo trade which can automatically connect Nest.
Although I don't test it. But is fully automatic probably.

I have used finmas as mt4 feed. Good enough for trading...much more data than global data feed. Most imp, we can back test on intraday data... big data..

I have used the demo of tradize server also from rtdatafeed. Very fast and good...But the problem with tradize is less data on longer time frame like H4, Daily. About 4-5 month intraday data that time.

Another provider like vcharting.com is offering a scanner with added price.
But a good programmer can build it and share.
Not used their feed..No idea.. If anyone using them can share experience..

For trading still I prefer Nest without charting.
 
#6
Hello,

I have just started using Metatrader 4 to chart NYMEX commodity. I came to know that there are few data feeds available for NSE/BSE?MCX. But I want to know whether the particular features available as like in Metastock.

For metastock I have EOD data which comes only daily OHLC. But I can view all FNO scripts by clicking next button. Not required to type the script name but keep clocking the next button, I can review 100+ charts in less than one hour.

Do MT4 has similar features ?

Please advise if anyone knows.
 

pannet1

Well-Known Member
#7
Hello,

I have just started using Metatrader 4 to chart NYMEX commodity. I came to know that there are few data feeds available for NSE/BSE?MCX. But I want to know whether the particular features available as like in Metastock.

For metastock I have EOD data which comes only daily OHLC. But I can view all FNO scripts by clicking next button. Not required to type the script name but keep clocking the next button, I can review 100+ charts in less than one hour.

Do MT4 has similar features ?

Please advise if anyone knows.

CTRL + M is the shortcut for Market Watch.

If the scripts are called symbols. To add new scripts to market watch.

CTRL + U is the shortcut for Symbols.

You can also bring symbols dialog by right clicking on the market watch.

Hope this helps.
 

C_R_Kumar

Active Member
#8
There are many free indicators available in internet for meta trader.
But very few people using MT4 and MT5 in india bcoz of not presence of good data providers
....
But overall we can trade with MetaTrader, if ignore small data problem few times.

************
We need a programming thread on Metatrader here like the popular thread on Amibroker started by happy..
may be u can make this one similar..
:thumb:

*************
I am adding few good data providers here, I know.. If some one know more with less data rate pls let us know..

http://www.finmas.in/mt4/
http://rtdatafeed.com/mt4.html
http://mt4realtimedata.com/

......

Meta Trader is very easy and fast software for analysis.
Sir,

Does anybody provide data which could be used simultaneously in Ami, NT7 & MT4

Is there any tutorial to properly set up MT4

Thanks
 

RockyRobust

Well-Known Member
#10
No, I never said we can trade with MT4... it is only for charting analysis untill NSE BSE give permission.:)

-----------
But MT4 is very good for analysis. Some providers like finmas has option to auto connect or auto trade/robo trade which can automatically connect Nest.
Although I don't test it. But is fully automatic probably.

I have used finmas as mt4 feed. Good enough for trading...much more data than global data feed. Most imp, we can back test on intraday data... big data..

I have used the demo of tradize server also from rtdatafeed. Very fast and good...But the problem with tradize is less data on longer time frame like H4, Daily. About 4-5 month intraday data that time.

Another provider like vcharting.com is offering a scanner with added price.
But a good programmer can build it and share.
Not used their feed..No idea.. If anyone using them can share experience..

For trading still I prefer Nest without charting.
Headstrong,

I have never used MT4 so just keen to know that do these service providers give backfill in Tick Format as it is absolutely necessary in the making of Tick Bars, Range Bars or Renko bars for that matter? TrueData is providing backfill in Tick Format for Ninja Trader. They do not provide data for MT4 I suppose.

Thanks.
 

Similar threads