Question, I'm new to this

 

Hi guys,

Does my EA work only if my MT4 platform is OPEN and connected to the internet?

What if I lose connection or my laptop battery runs out? is there any way to put my EA on a chart and let it run without consumming electricity? I want to go automated while staying green :)

 
newea:

Hi guys,

Does my EA work only if my MT4 platform is OPEN and connected to the internet?

What if I lose connection or my laptop battery runs out? is there any way to put my EA on a chart and let it run without consumming electricity? I want to go automated while staying green :)

Your EA will only work if the MT4 platform is open and connected to the internet. You can use a vpsto run your EA 24/5 for a fee. Not sure how green they are but that is the only way to have your ea running all the time while being able to turn off your computer when you need to.

I recommend http://www.forexvps.com

 

One solution would be to pay a hosting service to host the platform and EA for you.


CB

 

hmm. thanks guys. I wonder the following now.. what if my EA opens a trade and then I shut off my computer. What happens to the exit strategy?

I'm thinking probably if the exit condition is complex and dynamic then probably it won't be taken into account.. but if it's as simple as Stop Loss = 50 pips, then probably it will?

Or maybe the logic here is it won't.. because when my EA executes a trade it does not put a Stop Loss associated to the trade on my MT4, but yet it's a simple stop loss.. So I guess the EA needs to be running in order for a simple stop loss to take effect ?

 
newea:

hmm. thanks guys. I wonder the following now.. what if my EA opens a trade and then I shut off my computer. What happens to the exit strategy?

I'm thinking probably if the exit condition is complex and dynamic then probably it won't be taken into account.. but if it's as simple as Stop Loss = 50 pips, then probably it will?

Or maybe the logic here is it won't.. because when my EA executes a trade it does not put a Stop Loss associated to the trade on my MT4, but yet it's a simple stop loss.. So I guess the EA needs to be running in order for a simple stop loss to take effect ?

You can have the EA set a stoploss on the order it creates.

Its one of the parameters in the OrderSend() function. You will need to calculate this stoploss price based upon the current price plus or minus the relative number of pips you require.

In this case, the PC/Platform/EA can be turned off and the stoploss will be executed by the broker.

Some brokers do not allow the stoploss to be set in the initial order creation. In this case, you will need to use the OrderSelect() and OrderModify() functions in your EA, subsequently to creating the order.


CB

 

Open the Trade Window.

What you see there, Orders, Positions, Stops and Limits, are what you have registered in the trade server. They do not depend on your PC to be operating for them to be executed.

If you don't see it there it won't happen without further action from the PC.

Reason: