| New signals service! | |
|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Help needed for a Newbie
Hello !
I am currently learning MQl4, but I have a problem. I want to code an EA that do a trade at a given time. Here is the code I made : #property copyright "Copyright © 2007, MetaQuotes Software Corp." #property link "http://www.metaquotes.net" extern datetime temps = D'01.01.2007 00:00'; int init() { return(0); } int deinit() { return(0); } int start() { while (TimeCurrent()-temps<0) { } OrderSend(...); Print("order launched"); return(0); } The problem is : The EA is waiting the time to send the order, but after the time is come, I have plenty of orders that are launched, and it doesn't stop to send orders. If someone can help me to understand what the problem is, it would be kind of you, because I do not understand and I don't know other ways to code this EA. Thanks. |
|
|||
|
Depth,Deviation,Backstep?
Hello,
Can someone explain how are the indicator parameters with a confused face next to them used? SUPRESMultiFrame.mq4 | //| | //| RD | //+------------------------------------------------------------------+ #property copyright "RD" #property link "marynarz15@wp.pl" #property indicator_chart_window #define MaxObject 1000 //---- indicator parameters extern int TimeFrame=5; extern int BarsMax=89; ![]() extern int ExtDepth=13; ![]() extern int ExtDeviation=1; ![]() extern int ExtBackstep=5; ![]() Thanks Last edited by capamando; 12-19-2007 at 01:22 AM. |
|
|||
|
how to set stop loss and take profit when opening an order whose type is Market execu
Hello there
I have a problem setting the stoploss and takeprofit of some equities when I am opening orders. For some equities, when I try to open a new order, the dialog shows: Symbol:... Volume:... Stop Loss:... Comment:... Type: "Market Execution" and for other equities in the field Type it puts "Instant Execution" instead. My problem comes when I try to open a new order whose field type contains "MarketExecution". In these cases, I cannot set the stoploss or the takeprofit at the time of opening the order because when I try, the dialog shows the message: "Invalid S/L or T/P". For example, I try open buy with an equity whose Bid-Ask is 1.9800-1.9803 and try to put 1 as stop loss and 3 as takeprofit. Then I get the message: "Invalid S/L or T/P". Therefore, I have to wait until the order is opened and then set the stoploss and takeprofit to the values I want but that seems really risky to me. I would prefer not to open any order without stoploss. However, if the field type of the dialog of new order shows "Instant Execution" then when I try to set the stop loss and take profit, there is no problem at all and the order is opened with stop loss and take profit. Would please anybody tell me what is happening here? I would appreciate if anybody could tell me how to open this kind of Market Execution orders with a stop loss and take profit without having to wait to put them until the order has been opened. I look forward for your replies very soon. Thanks in advance |
|
|||
|
Market Execution US Instant Execution
Hello there
Does anybody know any way to know from the inside of an expert advisor whether the order type for an equity is MarketExecution or InstantExecution? It is just because MarketExecution orders do not let put stop loss at the time of opening them. Otherwise an error message "Invalid S/L or T/P" is thrown in case you try to put the stop loss at the time of opening the Market Execution order. Look forward your replies. Thks in advance |
|
|||
|
how to add coordinate line into seperate window?
hi,
there is a seperate window limited between 0 and 100, i want add a doted-coordinate line at 50, how to make? ----------- i'v already know :-) Last edited by inssuc; 12-27-2007 at 10:40 PM. |
|
|||
|
IndicatorCounted can be used to multipairs ?
Hi,
I just learn MT4 programming. I read alot many EA source code using counted_bars=IndicatorCounted(); I already read the documentation, there is no parameter in function IndicatorCounted, is very totally different like other function. The problem is How to deal with currency pairs which are different than the current chart currency (The chart that hosts the expert advisor)? For example, how to make an expert advisor that can get the GBPUSD's totals bar or USDCHF while the expert advisor is hosted on EURUSD chart ? It's simple for another function like iMa, iRSI, etc, that have symbol parameter, but IndicatorCounted ?? Any tricks or solution for IndicatorCounted() function for multipairs ?? Many thanks Hans |
|
||||
|
Quote:
__________________
De gustibus non est disputandum. |
![]() |
| Bookmarks |
| Tags |
| automated close order, close, eas, forex, learn mql4, learn mql4 video, mql4 learning, OrderCloseBy, profit, reach, secure profit function, T101_v1.11_orest_IBFXm.mq4, learning mql4 |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Learning Cycles For New Traders | Dan7974 | General Discussion | 350 | 01-18-2008 07:04 PM |
| Learning to code for autotrading | GoatT | Metatrader Programming | 8 | 01-10-2007 09:55 PM |
| Self learning expert | mrtools | Expert Advisors - Metatrader 4 | 32 | 10-22-2006 06:29 PM |