Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1958

 
Keith Watford #:

I requested that you post your code, I didn't ask for you to post code that will not compile. You had not mentioned anything about getting compilation errors.

OK, my misunderstanding.  Apologies!!

 
Tom Berwick #:

Is there a step by step guide for setting up a Signal Follow purchase?  I've got to say there is very little current info or videos that is readily available to guide that journey.  The one "detailed" video for starting the subscription is a link to a 6-yr old Youtube video.  Very disappointing.

TCB

There is a newest thread here :

https://www.mql5.com/en/forum/189731

How to Subscribe to a MT4 Signal (new instructions, after 1065 version upgrade) - How to subscribe to a MΤ4 signal on MT4 platform
How to Subscribe to a MT4 Signal (new instructions, after 1065 version upgrade) - How to subscribe to a MΤ4 signal on MT4 platform
  • 2017.04.10
  • www.mql5.com
In the   deviation/slippage   field, select an option and click   ok   in the   options   window to close it. Go to the   search area   of your mt4 platform, on the upper right corner (where the magnifying glass is), type in the name of the signal you want to subscribe and click   enter
 

Hello,

- RE: FXPT_BuySellUnlimitedOrders

what should I change in the codding in order to make it work on my MT4?

-Please help... Thanks!


//+------------------------------------------------------------------+

//|                                   FXPT_BuySellUnlimitedOrders.mq4|

//|                                         Developed by fxprotrader |

//|                                     http://www.fxpro-trader.com" |

//+------------------------------------------------------------------+

#property copyright "Copyright © 2011, fxprotrader"

#property link      "http://www.fxpro-trader.com"

//-------- HISTORY----------------

// v0.1 Initial release(013012)

//--------------------------------

//coded for Price

//http://www.forexfactory.com/showthread.php?p=5335422#post5335422

 

#property show_inputs

 

extern string   TopComment1="Check Symbol and Order type";

extern string   TopComment2="Must select Buy or Sell";

extern bool buyorder  = FALSE;

extern bool sellorder = FALSE;

extern int NumberOfOrders = 5;

extern double Lots     = 0.10;

 extern int   StopLoss =   40;

 extern int   TakeProfit=  10;

 extern int   TPFactor  =  10;

 extern int MagicNumber = 999;

 extern string   MyComment="";

 string TradeComment="FXPT_BuySell ";

int Slippage=2;



 double Poin;



//+------------------------------------------------------------------+

//| Custom initialization function                                   |

//+------------------------------------------------------------------+

int init(){



   if (Point == 0.00001) Poin = 0.0001;

   else {

      if (Point == 0.001) Poin = 0.01;

      else Poin = Point;

   }

   return(0);

}

//+------------------------------------------------------------------+

//| script program start function                                    |

//+------------------------------------------------------------------+

int start(){



double BP,SP,TP,SL,HashLn;

int ticket;

int c,x,err;

int NumberOfTries=5;





//BUY

 if(buyorder == TRUE){  

 

for(x=0;x<NumberOfOrders;x++){

TakeProfit+=TPFactor;

for(c=0;c<NumberOfTries;c++){

RefreshRates();

  SL=Ask-(StopLoss*Poin);

TP=Ask+(TakeProfit*Poin);

 ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,0,0,TradeComment+DoubleToStr(StopLoss,0)+"/"+DoubleToStr(TakeProfit,0)+" "+Period(),MagicNumber,0,Blue);

   err=GetLastError();



if(ticket>0){

if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)){

   OrderModify(ticket,OrderOpenPrice(),SL,TP,0,Blue); 

}

}

 if(err==0){break;}

else{

    Print("Errors opening BUY order err:"+err);

     if(err==4 || err==137 ||err==146 || err==136){

     Sleep(100);continue;//Busy errors

     }

     else{break;}//normal error

     

}



}//for error/NumberOfTries

}



 return(ticket); 



}



//sell

else if(sellorder == TRUE){ 



for(x=0;x<NumberOfOrders;x++){

TakeProfit+=TPFactor;

for(c=0;c<NumberOfTries;c++){

RefreshRates();

  SL=Bid+(StopLoss*Poin);

TP=Bid-(TakeProfit*Poin);

 ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippage,0,0,TradeComment+DoubleToStr(StopLoss,0)+"/"+DoubleToStr(TakeProfit,0)+" "+Period(),MagicNumber,0,Red);



   err=GetLastError();

if(ticket>0){

 if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)){

    OrderModify(ticket,OrderOpenPrice(),SL,TP,0,Red); 

}

}

   if(err==0){break;}

else{

    Print("Errors opening SELL order err:"+err);

     if(err==4 || err==137 ||err==146 || err==136){

     Sleep(100);continue;//Busy errors

     }

     else{break;}//normal error     

}

}//for error/NumberOfTries

}



return(ticket); 

}

// } 

}
 
Artyom Trishkin:

In this thread I want to begin to help those who really want to understand and learn programming in the new MQL4 and want to easily switch to MQL5 - the languages are very similar.

This blog will be a good place to discuss tasks, algorithms of their solution and any other questions concerning MT programming one way or another.

I hope that other experienced members of our forum will join us and this thread will be interesting to all.

Hello, I am new to MT4 programming. I just started to learn Forex trading in August 2022 and I would like to codes to make my trading more efficient. Is there an active forum I can join for help with the coding instructions. I have had experience coding in Dbase many years ago.
 

Can someone help me please. I opened a Meta Trader 4 account with some bloke from overseas. I was very green with this type of trading but wanted to learn.  When I wasn't willing to dump half my savings into this account and trust him with it, he left me high and dry. I've been tyring to contact him for over 12 months but no reply or help. I was trading on my own for a while and made a profit. I want to transfer the funds into my new MQL5 account but there's nowhere on the MQL4 page that will allow me to withdraw funds. I've tried the chat thing on this site, but the robot doesn't understand. Who can I call about this issue?

Thanks, Warren 

 
Warren Taylor #: Can someone help me please. I opened a Meta Trader 4 account with some bloke from overseas. I was very green with this type of trading but wanted to learn.  When I wasn't willing to dump half my savings into this account and trust him with it, he left me high and dry. I've been tyring to contact him for over 12 months but no reply or help. I was trading on my own for a while and made a profit. I want to transfer the funds into my new MQL5 account but there's nowhere on the MQL4 page that will allow me to withdraw funds. I've tried the chat thing on this site, but the robot doesn't understand. Who can I call about this issue? Thanks, Warren 

You fell for a scam! That was a fake broker. MetaQuotes is software company, not a broker.

No one here is going to be able to help you. You should address the issue with the authorities or a lawyer.

Tips to avoid being scammed …
Tips to avoid being scammed …
  • 2022.06.07
  • www.mql5.com
Be it by fake agents, brokers, signals, or EAs, there is one weapon to beat them all — knowledge...
 
hello, I have a problem, a few days ago my master opened an order for 2 layers CADJPY, I can still copy the 2 layers, after a while my master returned to open an order, 1 layer CADJPY, 2 layers XAUUSD, but why was master's last order I'm not logged in to my account? my account balance is much higher than my master
Please help
 
Muhalafta #:
hello, I have a problem, a few days ago my master opened an order for 2 layers CADJPY, 

What are layers?

 

why do my pages keep coming up in Russian?

I am new here and want to set up an MT5/MQL5 environment.  the you tube videos only are playing audio so cannot watch them

 

Does any one know of an EMA histogram indicator like I have in the picture? One that I can adjust the EMA's to my prefered numbers?

The picture is CCI, but I am wanting EMA looking exactly like the CCI's are showing.

I am not a coder, so I have very little knowledge on how to make it hte way I am wanting.


As you can tell, I would like to have one color for price going up, another for price going down, and the third color on a stalling of price.

Thank you.

Files:
Capture6.PNG  27 kb
Reason: