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

 
venn:
hello,

is there a script or ea available which will close all open positions if one of the trade hit sl/tp ?

thanks..

anyone? help needed....

 

e-closebytime

The "e-closebytime" EA does not work properly in that it keeps on taking trades after the 1st trade closes out at a profit. It immediately then opens more trades using the original parameters.

I'm looking for a simple EA that takes one trade per day with defined SL and TP with slippage and retry...that's it.

Can anyone help..?

 

Can an EA manage a trade?

I know that EAs use Magic Numbers to identify which trades are theirs.

How do I manually add a magic number to a trade?

 
Ronald Raygun:
I know that EAs use Magic Numbers to identify which trades are theirs. How do I manually add a magic number to a trade?

It is not possible, but what you can do is to add an extern bool to allow the EA to take care of the manual trades too (which have 0 as MagicNumber).

Then you should modify your EA like this: (just to show you the logic)

replace

if(OrderMagicNumber() == Magic ...[/PHP]

by[PHP]extern bool ManageManualTrades = true;

if(OrderMagicNumber() == Magic || (ManageManualTrades && OrderMagicNumber() == 0)
 

Looking for Autoclose order based on equity.

Hi

i am looking for a script (not an ea) to close all trade + pending orders + stop EA running if equity reached a certain value

this value is defined in Usd or in % of yesterday last registered equity value

********************

exemple yesterday: balance 16000 usd / equity : 13000 usd

If script get equity value : 11 000 usd

when this amount is reached script will :

- close all open trades

- delete pending trade

- stop ea's running

*********************

This is what i am looking for.

Please advise and assist.

TQ

 

e-bytime EA

Can anyone please assist me in fixing this EA. If you specify the "buy" time as 00:00 then the EA opens trades immendiately and continues to do so. If you specify "buy time" as 23:59, then it works fine. It seems that the "buy time" must be specified later then the current time of the MT4 platform.

I trade on the Daily chart and just need one trade a day at GMT 00:00.

Thanks in advance.!

Files:
 

EA to close all orders on specific pair

Hi.I need an EA that close all orders on specific pairs whit parameters to set eqity loss and profit.But what is the most important is to close them in order of size of trdes and first should close biggest lot sizes(both - and +).

I want to use it on hedge systems.I think this could be the most useful EA if it would be made.

Thanks

 

EA or tool needed

Hello altogether

i' m looking for a Advisor or a tool with only one function:

Open a long or a short order at open price new day ( it's midnight by me and i like to sleep ). No rules. I say what's doing ( short or long )

Somebody know a EA or tool with this function?

Thanks

 

Is there an EA that close all the orders when the equity increase or decrease certain $ ?

Thank you

wolfe:
Here you go, I made this. Hope it helps. In the external parameter enter a number as a dollar amount for Take_Profit and Stop_Loss. This EA will execute according to the TOTAL VALUE of all open orders, it also deletes any pending orders.

example:

Take_Profit=200

Stop_Loss=-200
 

closing all open orders

Hello everyone

I'm trying to create my first EA using Meta Editor.

I need in a certain point of execution to close all the open orders of a certain type. for example when my EA places a sell order it should close all the buy orders that are open.

I wrote something like the following

total=OrdersTotal();

for(int i=total-1; i>=0; i--) {

OrderSelect(i, SELECT_BY_POS, MODE_TRADES);

if(OrderType()== OP_BUY) {

OrderClose(OrderTicket(),OrderLots(),Bid,3,Violet);

}

}

but it didn't do the job since it sometimes close the newest order only, but not all the opened order.

can anyone help me please ?

Reason: