Help for MQL4

 

Hi Guys ,

 

I am not sure if here is the right place to ask this question or not . Sorry if I am in wrong topic .

 

I am completely beginner in MQL4 programming . Just have to 2 quick questions.

 

1- If I have a script or expert ... and if I need to run this 24 hours , can I quit meta trader and shutdown my machine or I have to keep open my MT4 24 hours ?

 

2- I need a simple script which opens a buy position with current price and 4 buy pending orders below the open position(current price). The pending orders should be created with 100  pip difference from the open trade AND if one of each pending orders  OR the current open position hit the "Take Profit"  it automatically close all other pending orders AND open a new buy position and new set of 4 pending orders again with the same condition .

 

I am sure it's very simple script but as I am beginner I'm very confused how to run it ? As a script or Expert Advisor

 

Could somebody please help me about this ? It's really a great help  that caused bad problem for me .

 

Thanks so much for your help in advance.

 
alex_lion:

Hi Guys ,

 

I am not sure if here is the right place to ask this question or not . Sorry if I am in wrong topic .

 

I am completely beginner in MQL4 programming . Just have to 2 quick questions.

 

1- If I have a script or expert ... and if I need to run this 24 hours , can I quit meta trader and shutdown my machine or I have to keep open my MT4 24 hours ?

 

2- I need a simple script which opens a buy position with current price and 4 buy pending orders below the open position(current price). The pending orders should be created with 100  pip difference from the open trade AND if one of each pending orders  OR the current open position hit the "Take Profit"  it automatically close all other pending orders AND open a new buy position and new set of 4 pending orders again with the same condition .

 

I am sure it's very simple script but as I am beginner I'm very confused how to run it ? As a script or Expert Advisor

 

Could somebody please help me about this ? It's really a great help  that caused bad problem for me .

 

Thanks so much for your help in advance.


1. If you want it run 24 hours, you need an Expert Advisor (EA), and you can not shutdown your PC. If you can afford it, you can rent a VPS or better yet a dedicated server - Google that. Install and run your MT4 with your EA in VPS/Dedi. VPS/Dedi have better connection to internet.

2.  That should be EA too. With a little modification (adding init() and deinit()), a script can be an EA if you move it from scripts folder to Experts folder. You may find it in code base (https://www.mql5.com/en/code), or you can create it by learning mql4 (https://book.mql4.com//), or have someone created for you for a fee (https://www.mql5.com/en/job)