Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.
From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.
Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
Elite Section
Get access to private discussions, specialized support, indicators and trading systems reported every week.
Advanced Elite Section
For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
I wondered if anyone could tell me how to time fix an object (such as an arrow) so when I change the chart TF the arrow would remain at the original time. Similar to drawing a vertical line and then changing chart TF. Thanks.
I have a strange problem over here. I am running an EA (using one custom indicator). Sometimes it happens that the EA stops working (although the smiley is still there, but output on the chart for example is not printed any more). This happens without any warning and is very unpredictable.
Last time it occured I found the following in the EA log which shows that at 03:08:06 the EA was removed because the chart was closed (uninit reason 4). Thing is, I was sleeping at this time, definitely not thinking about closing charts. Since I publish the account to an FTP site every 5 mins and the last update was around 3AM I decided that this must be related. Unfortunately I do not have any clue on how to approach the problem.
What would be the code to modify an order ( adjust the take profit of it ) after X amount of minutes has passed since the order has opened ? Thanks in advance to anyone who responds to this.
first you have to select the order using OrderSelect function,
then check the the order open time and compare it with time current,
you can change the Stop Loss and Take Profit
hello i am new to the programming world. i just read through the tutorial put out by Codersguru its a very nice tutorial. i also have the MetaQuotes Language 4 manual a 162 page pdf manual that apears to be a better reference manual for after a get a better grasp of the concepts. i am still having some trouble with understanding the basics. are there any recomended reading that goes more indepth than the standard mt4 reference manual. i need a bit more background description for how to use such things as OrderOpen() OrderSend() OrderSelect() OrderTicket() OrderTicket()
i have a general goal for an EA i want to program. but i want to better learn the language so i am starting my learning experience in a series of small steps
the first step i completed. i created this code to print my name on the chart lol i know, sound simple but... "you have to learn to crawl before you can walk"
the next step i want to learn is how to program my ea to identify open orders
can i use the OrderTicket() (or do i have to use a magic number to identify a trade and where does the magicnumber show up on the mt4 platform) somehow in the code to allow my next ea to
print on the chart
first: my name (i did that allready)
second: below my name (not to replace the first chart comment)
the ticket number (or other identifying number) of the order
and to be able to store and recall this identifyer for the next step in
my learning process.
Study the OrderSelect() function. Get to know it well, it is important.
bool OrderSelect( int index, int select, int pool=MODE_TRADES)
The function selects an order for further processing. It returns TRUE if the function succeeds. It returns FALSE if the function fails. To get the error information, one has to call the GetLastError() function.
The pool parameter is ignored if the order is selected by the ticket number. The ticket number is a unique order identifier. To find out from what list the order has been selected, its close time must be analyzed. If the order close time equals to 0, the order is open or pending and taken from the terminal open positions list. One can distinguish an open position from a pending order by the order type. If the order close time does not equal to 0, the order is a closed order or a deleted pending order and was selected from the terminal history. They also differ from each other by their order types.
Parameters:
index - Order index or order ticket depending on the second parameter.
select - Selecting flags. It can be any of the following values:
SELECT_BY_POS - index in the order pool,
SELECT_BY_TICKET - index is order ticket.
pool - Optional order pool index. Used when the selected parameter is SELECT_BY_POS. It can be any of the following values:
MODE_TRADES (default)- order selected from trading pool(opened and pending orders),
MODE_HISTORY - order selected from history pool (closed and canceled order).
Sample:
if(OrderSelect(12470, SELECT_BY_TICKET)==true)
{
Print("order #12470 open price is ", OrderOpenPrice());
Print("order #12470 close price is ", OrderClosePrice());
}
else
Print("OrderSelect returned the error of ",GetLastError());
thanks for your answer and the book! its new to me so i will dig in to it and learn some more. i will then post the next version of my ea or anouther question if i hit a road block.