How to code? - page 82 1...757677787980818283848586878889...346 New comment alimjan 2008.04.10 18:35 #811 'void' - parameter definition expected! string OpenTrades(string mySymbol,double LotSize, double OpenPrice,int Type, double StopLoss, double TakeProfit, string ticketComment, void string MagicNum) { // bu funksiye birilgen melumatqa asasen mal alidu we zakaz numurini qayturidu. switch(Type) { case OP_BUY: if(OpenPrice > MarketInfo(mySymbol,MODE_ASK) return(EMPTY); case OP_BUYLIMIT: case OP_BUYSTOP: OrderSend(mySymbol,Type,LotSize,OpenPrice,0,OpenPrice-Point*StopLoss,OpenPrice+Point*TakeProfit,ticketComment,MagicNum); break; case OP_SELL: if(OpenPrice < MarketInfo(mySymbol,MODE_BID) return(EMPTY); case OP_SELLLIMIT: case OP_SELLSTOP: OrderSend(mySymbol,Type,LotSize,OpenPrice,0,OpenPrice+Point*StopLoss,OpenPrice-Point*TakeProfit,ticketComment,MagicNum); break; } compiler error on : 'void' - parameter definition expected! ????????? recipe for night scalper Help me please about MQL4 opposite order HELP!! Michel 2008.04.10 21:38 #812 alimjan: string OpenTrades(string mySymbol,double LotSize, double OpenPrice,int Type, double StopLoss, double TakeProfit, string ticketComment, voidstring MagicNum) ... compiler error on : 'void' - parameter definition expected! ????????? just delete "void". hopokuk 2008.04.12 01:05 #813 Trailing stop, initial stop void ModifyOrder(double buyTS, sellTS) { if (Bid - OrderOpenPrice() > buyTS * Point) if (OrderStopLoss() < Bid - buyTS * Point) OrderModify(OrderTicket(), OrderOpenPrice(), Bid - buyTS * Point, OrderTakeProfit(), 0); if (OrderOpenPrice() - Ask > sellTS * Point) if (OrderStopLoss() > Ask + sellTS * Point) OrderModify(OrderTicket(), OrderOpenPrice(), Ask + sellTS * Point, OrderTakeProfit(), 0); } If the Trailing Stop is 40, the initial stop will be zero (orderopenprice) I would like the initial stop to be 10 - help please? initial stop. need help MQL4 Learning [WARNING CLOSED!] Any newbie Kianoush Amini 2008.04.12 21:41 #814 Cross Overs DOES ANYONE KNOW HOW DO YOU WRITE WHEN TWO LINES CROSS OVER EACH OTHER LETS SAY SAY IF 10 EMA IS ABOVE 20 EMA CONDTION 1 IF THAT CONDITION 1 IS THERE ....THEN TAKE A LONG WHEN STOCASTICS D CROSSES ABOVE k FOR D ABOVE K WE CAN USE D > K WHAT DO YOU USE FOR D CROSS ABOVE k WHILE THE EMA CONDITION 1 IS IN PLACE? Automatically New Trade Order Questions from Beginners MQL4 Is it possible to matrixebiz 2008.04.13 13:41 #815 Fix warning in EA Hello, how do you fix this error in an EA? 'CloseHour' - expression on global scope not allowed Thanks syrndr 2008.04.14 01:48 #816 Passing arrays between functions Hi, I am trying to pass arrays between function calls in my EA. Here is the structure for my program. I have the following files. Helper.mq4 void writeLog(string[] orderLog) { orderLog[0] = "Text1"; orderLog[1] = "Text2"; orderLog[2] = "Text3"; } [/CODE] Helper.mqh void writeLog(string[] orderLog); EA.mq4 [CODE] #include string OrderLog[24] = {"","","","","","","","","","","","","","","","","","","","","","","",""}; int init() { writeLog(OrderLog); return(0); } When I run the above snippet of code, I get the following errors: ',' - left square parenthesis expected for array ',' - parameter expected ',' - incompatible types However, if I do not use libraries and place these functions into the EA.mq4 file itself, the code works. Does anyone know how to pass functions between functions in another library? Your help would be much appreciated. Passing arrays between functions special functions (small) bug: function signature ralphronnquist 2008.04.15 07:38 #817 syrndr:Hi, I am trying to pass arrays between function calls in my EA. ........ void writeLog(string & orderLog [] ) { orderLog[0] = "Text1"; orderLog[1] = "Text2"; orderLog[2] = "Text3"; } etrader58 2008.04.15 12:42 #818 sum of two indicators Can an experienced coder tell me how to draw the numerical sum of two indicators ? I mean modifying the codes of an indicators to add the value of another indicator to draw combination of two indicator values Thanks zamanib 2008.04.15 16:37 #819 buy and sell on the 100's Can some one please write and EA to buy/sell on the round number eg gbp/jpy 201.00 203.00 etc. with target 100 pips no increase in lots size and no martangle. Thank you all very much. I have manualy doing it and gain profit every week. every month. Raw Ideas Ivan`s trading style Gaining profit by Playing BigBe 2008.04.15 23:23 #820 Zamanib, What are all the details you look at to decide whether to buy or sell? Big Be 1...757677787980818283848586878889...346 New comment
'void' - parameter definition expected!
{
// bu funksiye birilgen melumatqa asasen mal alidu we zakaz numurini qayturidu.
switch(Type)
{
case OP_BUY: if(OpenPrice > MarketInfo(mySymbol,MODE_ASK) return(EMPTY);
case OP_BUYLIMIT:
case OP_BUYSTOP:
OrderSend(mySymbol,Type,LotSize,OpenPrice,0,OpenPrice-Point*StopLoss,OpenPrice+Point*TakeProfit,ticketComment,MagicNum);
break;
case OP_SELL: if(OpenPrice < MarketInfo(mySymbol,MODE_BID) return(EMPTY);
case OP_SELLLIMIT:
case OP_SELLSTOP:
OrderSend(mySymbol,Type,LotSize,OpenPrice,0,OpenPrice+Point*StopLoss,OpenPrice-Point*TakeProfit,ticketComment,MagicNum);
break;
}compiler error on : 'void' - parameter definition expected! ?????????
string ticketComment, voidstring MagicNum)
...just delete "void".
Trailing stop, initial stop
void ModifyOrder(double buyTS, sellTS) {
if (Bid - OrderOpenPrice() > buyTS * Point)
if (OrderStopLoss() < Bid - buyTS * Point) OrderModify(OrderTicket(), OrderOpenPrice(), Bid - buyTS * Point, OrderTakeProfit(), 0);
if (OrderOpenPrice() - Ask > sellTS * Point)
if (OrderStopLoss() > Ask + sellTS * Point) OrderModify(OrderTicket(), OrderOpenPrice(), Ask + sellTS * Point, OrderTakeProfit(), 0);
}
If the Trailing Stop is 40, the initial stop will be zero (orderopenprice)
I would like the initial stop to be 10 -
help please?
Cross Overs
DOES ANYONE KNOW HOW DO YOU WRITE WHEN TWO LINES CROSS OVER EACH OTHER
LETS SAY SAY IF 10 EMA IS ABOVE 20 EMA CONDTION 1
IF THAT CONDITION 1 IS THERE ....THEN TAKE A LONG WHEN STOCASTICS
D CROSSES ABOVE k
FOR D ABOVE K WE CAN USE D > K
WHAT DO YOU USE FOR D CROSS ABOVE k WHILE THE EMA CONDITION 1 IS IN PLACE?
Fix warning in EA
Hello, how do you fix this error in an EA?
'CloseHour' - expression on global scope not allowed
Thanks
Passing arrays between functions
Hi,
I am trying to pass arrays between function calls in my EA.
Here is the structure for my program.
I have the following files.
Helper.mq4
void writeLog(string[] orderLog)
{
orderLog[0] = "Text1";
orderLog[1] = "Text2";
orderLog[2] = "Text3";
}
[/CODE]
Helper.mqh
void writeLog(string[] orderLog);
EA.mq4
[CODE]
#include
string OrderLog[24] = {"","","","","","","","","","","","","","","","","","","","","","","",""};
int init()
{
writeLog(OrderLog);
return(0);
}
When I run the above snippet of code, I get the following errors:
',' - left square parenthesis expected for array
',' - parameter expected
',' - incompatible types
However, if I do not use libraries and place these functions into the EA.mq4 file itself, the code works.
Does anyone know how to pass functions between functions in another library?
Your help would be much appreciated.
Hi,
I am trying to pass arrays between function calls in my EA.
........
void writeLog(string & orderLog [] )
{
orderLog[0] = "Text1";
orderLog[1] = "Text2";
orderLog[2] = "Text3";
}
sum of two indicators
Can an experienced coder tell me how to draw the numerical sum of two indicators ?
I mean modifying the codes of an indicators to add the value of another indicator to draw combination of two indicator values
Thanks
buy and sell on the 100's
Can some one please write and EA to buy/sell on the round number eg gbp/jpy 201.00 203.00 etc. with target 100 pips no increase in lots size and no martangle. Thank you all very much. I have manualy doing it and gain profit every week. every month.
Zamanib,
What are all the details you look at to decide whether to buy or sell?
Big Be