Ask! - page 132

 
tcl:
I'm really new in mql4, and trying to make an EA.

but, there is something bother me...

at the end of my testing, in the TYPE column said that the position "CLOSE AT STOP", what this mean?? is it a problem??

No problem, it just means the backtester has closed out any open orders that may exist, so that any open profits/losses are included in the final account-balance results...

 
tcl:
I'm really new in mql4, and trying to make an EA.

but, there is something bother me...

at the end of my testing, in the TYPE column said that the position "CLOSE AT STOP", what this mean?? is it a problem??

When the test is finished, the tester have to close the opened order where it is.

FerruFx

 
FerruFx:
When the test is finished, the tester have to close the opened order where it is. FerruFx
omelette:
No problem, it just means the backtester has closed out any open orders that may exist, so that any open profits/losses are included in the final account-balance results...

wow... hi FerruFx and omelette, thanks for yours quickly reply

 

Thanks omelette

omelette:
Assuming you know the ticket number of the open order, just use the EA to detect when the order closes - OrderCloseTime() function will return a non-zero value when this occurs - then send the email as normal...

Thank You. Now I see what experience means.

 
bakhul:
Please someone help me to make EA basic from this indicator.The order for buy or sell are in the next opencandle after the cycleidentifier was confirmed.Thank`s

this indicator just a 'filter' for buy/sell, needed more conformation on another indicator to buy/sell... can i know ur system? if u explain a little bit about ur system, maybe someone in here could help u make an ea..

 

Hello,

I am looking for a function to download a file from an FTP server.

Can someone help me?

In this forum, I found the mtftp-library. But it seems not to work, because it crashes most of the time. I have created a little ea that does nothing but download a file from an FTP server and save it to the local hard disc.

Just a few seconds later I get a message and have to restart MetaTrader.

Thanks in advance!

 

EA Manages Order Execution

I need some functions to duplicate the StopBuy and StopSell functions of MT4. The problem I have with the MT4 functions is that if I enter a Stop Buy or Sell with an execution price that is not at least 10 pips away from the market, it rejects the order. On short time frames, most of my Stop Buy / Sell orders are only 3 - 7 pips away from the market.

I would like a function that can:

1. Manage a group of pending stop orders (no more than 16).

2. That will issue a market order when the market price reaches the desired execution price.

3. Allow for changes to pending orders before they are executed.

4. Allow for deletion of pending orders before they are executed.

5. Automatically deletes the executed order from the group making a new order slot available.

It would be really wonderful if it could also I find a function that manages the Take Profit and Stop Loss much for the same way (allow, update, delete etc.). The main reason is the same - the desired execution price is often less than 10 pips from the market and MT4 or my Broker rejects the changes.

I am willing to pay to have this developed if it doesn't exist and think it would be a great addition to the whole group here.

Many thanks.

Dave

 

Scan Trades and Close Trades

hi All,

There are some question that I need an answer for building an EA:

1. Only open 1 BUY and 1 SELL position in the same day

2. Close all opened trade at spesific time in the same day, example: close all at 21.00 (broker time) in the same day.

thanks before...

 
tcl:
hi All,

There are some question that I need an answer for building an EA:

1. Only open 1 BUY and 1 SELL position in the same day

2. Close all opened trade at spesific time in the same day, example: close all at 21.00 (broker time) in the same day.

thanks before...

Before opening a buy/sell order use the OrderSelect() function with MODE_HISTORY to check history orders. You can loop through them using OrdersHistoryTotal(). Loop in reverse order as most likely the order you're looking for will be towards the end of the history so no need to start at the beginning.

For your second issue just check the time using TimeCurrent() and close when it's your specified hour.

Take a look at the help file if you get stuck. It's ALL there for you, you just have to look.

Lux

 

How do you write a dll??

I would like my ea program protection to link itself to only 1 computer, and only to that computer. Is that possible?? If so, how do I write it??

Dave

Reason: