'Close all'/'Open' tools - page 37

Sergey Golubev
Moderator
114907
Sergey Golubev  

Hi jpdus,

The scripts to enter are on this page https://www.mql5.com/en/forum/173000

I am using it like that:

I am renamed the scripts and the settings according to what I need.

For example, I need to open buy for EURUSD by 0.1 lot size with take profit 80 and stop loss 100 with magic number 12.

So, I opened this script in MetaEditor, place in the settings (inside MetaEditor)

Order_Type = 1; // 0- Current Price; 1 - SELLSTOP; 2 - SELLLIMIT

Lots = 0.1;

Price = 0;

Distance = 0; // Distance from current price in pips for pending orders

TakeProfit = 80; // TakeProfit in pips

StopLoss = 100; // StopLoss in pips

Slippage = 3;

Comments ="SELL";

Magic = 12;

PointRatio = 10;

than renamed as AllBuyOrders_5d_EURUSD80100_01 and "Save as" and than compile.

So, I have may be 10 scripts which I need all the time for pending orders, buy or sell orders with all the settings.

As to exit so it should be some scripts as well. Search the thread - I think you will find it.

Sergey Golubev
Moderator
114907
Sergey Golubev  

PointRatio = 10 for 5 digit broker (price as 1.32456 for example) and PointRatio = 1 for 4 digit broker (price as 1.3245 for example).

cmalbranc
24
cmalbranc  
toddanderson:
Could someone please mod. the attached scripts so you can enter a buystop,sellstop at a specific price you want

hello i know script for send pending order...but only with a distance in pips from market price, maybe you can use it.

cedric

jpdus
4
jpdus  

manual entering Vs auto conditionnal and partial exiting

Hi NewDigital

Thanks for your response and for relocating my post in the appropriated thread.

I have in my library such quick order preset scripts with the closeallafterprofitreached working EA.

You gave the syntax solution for entrying, but it is pretty much harder to exit, partially in this case.

My problem is to find the profit manager EA which will considerate and close all trades associated with a specific magic number and ONLY THOSE,

and if possible,

with limit price (calculated in real time by the EA for each position concerned) or trailing stop orders, instead of a general market ones.

in other words :

close all trades made with the magic number edited (and leave absolutely active the others not concerned or identified with different MN),

after the profit generated by these MN positions (and not all others like in the classic ea of that type) has reached the amount predefined by user.

profit protected by an array of limit or trailing stop orders, calibrated and generated for this sub group goal.

I tried to adapt various close managers, in vain for now.

Multiple EAs working in parallel with possible resources collisions, seem to add difficulty and bugs...

jamesfrance
37
jamesfrance  

Can someone alter this EA please

Hi

I Was wondering if someone could please alter this close all orders EA to include the following options.or if you have one that already does this please post.

Add a trailing stop

Add a time Filter (maybe need a GMT +- setting for different brokers)

Thanks in advance

JForex78
57
JForex78  

Position tracker.

Hi,

I am looking for an indicator that can automatically register new positions, and send alerts/ emails when position is closed?

I have something but it will not automatically register new positions, it has to be restarted.

Thanks,

JForex.

wall03
86
wall03  

Have you an expert advisor taht revers martingale orders open from another ea ?

2088868202
7
2088868202  

Close trade EA

Hi all,

I am looking for an EA in MT4 that will close half of my position size when my TP1 was hit, move SL to BE and close all when TP2 was hit.

Any idea?

Thanks a lot.

kamehame
7
kamehame  

hi all

anyone have script to closed all in one pair not all open?

thanks

pking25
242
pking25  

Question about scripts

Hi,

I use three scripts in my trading, one to open longs, one to open shorts, & one to close trades.

My question is this: is it possible to add alerts to scripts?

Thanks everyone.

I forgot, I also use a TP &SL script - which is what I would like the alerts for