[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 906

 
belck:

I started to try it and this is the result:

It gives an error:


Almost all functions need to pass three parameters. Symbol, Magik, and type of operation
 
belck:

you have :ticket=OrderSend(Symbol(),OP_BUY,Lots,Bid,3,Ask-stoploss*Point,Bid+TakeProfit*Point, "macd sample",16384,0,Green);

we need: ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Bid-stoploss*Point,Ask+TakeProfit*Point, "macd sample",16384,0,Green);

and change here: ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,Ask+stoploss*Point,Bid-TakeProfit*Point, "macd sample",16384,0,Red);

It's correct:

ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Ask-stoploss*Point,Ask+TakeProfit*Point, "macd sample",16384,0,Green);

ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,Bid+stoploss*Point,Bid-TakeProfit*Point, "macd sample",16384,0,Red);
 

Has anyone already encountered a situation where the tester only runs on one or two timeframes and gives an error on the others:

2010.10.12 10:02:29 TestGenerator: write file error

In the archive of quotes, everything is OK.

It turns out that I can only test on H1, for reasons I don't understand.

Is there any way to correct this error?

 
Hello, help who can, I am learning to write, I tried to write an Expert Advisor by the tutorial, but the compiler gives out an error, please explain what's wrong.
Files:
trendline.mq4  3 kb
 
sumotori:
Hello, Could you please help, I am learning to write, I've tried to write an EA using the tutorial, but the compiler gives me a error, please explain what's wrong.


you have a link to the file at the very beginning #include <MyLib.mqh>

The compiler does not find this file in the include directory, apparently this file contains three undefined procedures required to work, search for the file and paste it where needed, it should work...

if it's not the error, at least tell me what the error is...

 
OlegTs:


you have a link to the file in the very beginning #include <MyLib.mqh>

The compiler does not find this file in the include directory, apparently this file contains three undefined procedures required to work, search for the file and paste it where needed, it should work...

if that's not what's wrong, at least tell me what's wrong...

Thank you. I forgot to point out what I was swearing at, namely #include <MyLib.mqh>, thanks again.
 
belck:

Has anyone already encountered a situation where the tester only runs on one or two timeframes and gives an error on the others:

2010.10.12 10:02:29 TestGenerator: write file error

In the archive of quotes, everything is OK.

It turns out that I can only test on H1, for reasons I don't understand.

Is there any way to correct this error?


https://forum.mql4.com/ru/13434
 
доброго вечера !я новичек в роботах и ниче непонимаю в програмировании прошу помогите!торгую Avalanche_v1.2.mq4 заработал 400%за неделю правда немного помогаю и контролирую советник  депо увеличилось но ордера  остались теже как самому в зависимости от размера депо настроить размер ордеров!вот советник где что нужно менять?


 заранее всем благодарен за помощ что потратили на меня время вслучае чего кому удобнее можете кидать помощь в асю386598633
 

The script just shows if the candle meets a certain condition.

//+------------------------------------------------------------------+
//| script program start function |
//+------------------------------------------------------------------+
bool CandleQualifier(double High[1],double Low[1],double Open[1],double Close[1]) // Here compiler writes High - parameter definition expected
{
double MidPoint=0;
MidPoint = (High[1]-Low[1])/2;
if (Open[1]< MidPoint && Close[1]<MidPoint)
return(true);
else
return(false);
}

int start()
{
bool CQ= true;
CQ = CandleQualifier();
if (CQ=true)
{
Comment("the candle qualifies!)
}
else
{
Comment("the candle does not qualify!");
}
return(0);
}
//+------------------------------------------------------------------+

 
denamix:

The script just shows if the candle meets a certain condition.

//+------------------------------------------------------------------+
//| script program start function |
//+------------------------------------------------------------------+
bool CandleQualifier(double High[1],double Low[1],double Open[1],double Close[1]) // Here compiler writes High - parameter definition expected
{
double MidPoint=0;
MidPoint = (High[1]-Low[1])/2;
if (Open[1]< MidPoint && Close[1]<MidPoint)
return(true);
else
return(false);
}

int start()
{
bool CQ= true;
CQ = CandleQualifier();
if (CQ=true)
{
Comment("the candle qualifies!)
}
else
{
Comment("the candle does not qualify!");
}
return(0);
}
//+------------------------------------------------------------------+

I think you should read this: https://book.mql4.com/ru/basics/functions
Reason: