Questions from Beginners MQL5 MT5 MetaTrader 5 - page 101

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
These messages appear, for example, when one function is declared inside another. See if there is anything like this in the code:
Well you give examples of those lines where errors occur, and a couple of top-bottom lines.
Well, give me some examples of those lines where errors occur, and a couple of lines from top to bottom.
I am an inexperienced beginner and I dock EAs, I don't know how well I do it, but they all work differently and differently from sources and I have failed with this one, though the code is very simple and this may be the problem )))) I want to get everything too easy
//--- if it is time to trade
if((mqldt.hour==TradeTime) && (cantrade))
{
//--- check condition to open short trade (sell)
if(Open[t1]>(Open[t2]+delta*_Point))
{
//---open Short position
OpenShort(lot,10, "EUR/USD 20 pips expert (Short)",1234);
//--- switch the flag (prohibit trade) to not open more positions until the next day
cantrade=false;
//--- exit
return;
}
//--- check condition for opening a long position (buy)
if((Open[t1]+delta*_Point)<Open[t2])
{
//---open long position
OpenLong(lot,10, "EUR/USD 20 pips expert (Long)",1234);
//--- switch the flag (prohibit trade) to not open more positions until the next day
cantrade=false;
//--- exit
return;
Here is where I wanted to add Expert OnTick function from Combo Righd at least some of it, but even some of it does not compile
bool Supervisor(double & Signal) {
double BasicSig=0;
if(!basicTradingSystem(BasicSig))return(false);
Signal=0;
if(pass==4){
if(!Perceptron(output1,sh11,sh12,sh13,sh14,sh15,w11,w12,w13,w14) ||
!Perceptron(output2,sh21,sh22,sh23,sh24,sh25,w21,w22,w23,w24) ||
!Perceptron(output3,sh31,sh32,sh33,sh34,sh35,w31,w32,w33,w34)
)return(false);
if(output3>0){
if(output2>0){
sl=sl3;
tp=tp3;
Signal=1;
return(true);
}
Well, look, it all works out the way I thought it would. You are trying to insert another function inside one function - this one:
Well, look, it all works out the way I thought it would. You are trying to insert another function inside one function - this one:
The question is not quite clear yet. In mql5, we open positions, not orders. Are you interested in the price of opening a position?
Yes, I am interested in the position, I will formulate the question differently, is it possible to make a decision to open a position based on the price, i.e. we request the price first, make a decision, execute.
Yes, I am interested in the position, I will formulate the question differently, is it possible to make a decision to open a position based on the price, i.e. we request the price first, make a decision, execute.