Why, the expression A=Close [1] is not valid?????????? The result is always 1 !!!!!!!!!!!!!
Also here is always 1 extern int Bar; B=Close [Bar];
And here always 0 C=A-B ;, and here always zero int difference=Close [1] - Close [Bars]; Folks,hint, something is stupid,
Show me the full code with the prints. You are just messing up somewhere. And don't call variables in Russian letters - the stupidest programming tone.
I have a lot of problems with this indicator, but I'm not sure how to fix it. I have no idea what to do with this indicator, I will be very thankful for it. I myself am a complete zero in programming.
vlandex: There was an Expert Advisor like this somewhere - open a trade at random, if it closed in the red, then open the opposite one by 2 times increasing the lot. Where is it?
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Why, the expression A=Close [1] is not valid?????????? The result is always 1 !!!!!!!!!!!!!
Also here is always 1 extern int Bar; B=Close [Bar];
And here it is always 0 C=A-B ; , and here it is always zero int difference=Close [1] - Close [Bars]; People, tell me, I am confused,
Why, the expression A=Close [1] is inappropriate??????????
Why, the expression A=Close [1] is not valid?????????? The result is always 1 !!!!!!!!!!!!!
Also here is always 1 extern int Bar; B=Close [Bar];
And here always 0 C=A-B ;, and here always zero int difference=Close [1] - Close [Bars]; Folks,hint, something is stupid,
//+------------------------------------------------------------------+
//| Dimon's Bars.mq4
//| Copyright © 2010, MetaQuotes Software Corp.
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2010, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"
//+------------------------------------------------------------------+
//| expert initialisation function |
//+------------------------------------------------------------------+
extern double volume;
extern double volume,stoploss,takeprofit;
extern inttern bars;
int init()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert deinitialisation function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{ int A,B,C;
A=Close [1];B=Close [bars];
C=A-B ;
int difference=Close [1]-Close [Bars];
int slippage=3;
Comment("Close [B] ", B);
while(difference> slippage)
OrderSend ( Symbol(), OP_BUY, volume, Ask, slippage,Bid-stoploss*Point,
Bid+takeprofit*Point, NULL, 0, 0, Red) ;
while(0-difference>Point)
OrderSend (Symbol(), OP_SELL, volume, Bid, slippage,Ask+stoploss*Point,
Ask-takeprofit*Point, NULL, 0, 0, Black) ;
//----
return(0);
}
//+------------------------------------------------------------------+
I'm just training to better understand mql4. I use Comment to see what's going on inside the program in general.
Dimka-novitsek
Here, here's the right thing to correct, see for yourself.
I have a lot of problems with this indicator, but I'm not sure how to fix it. I have no idea what to do with this indicator, I will be very thankful for it. I myself am a complete zero in programming.
There was an Expert Advisor like this somewhere - open a trade at random, if it closed in the red, then open the opposite one by 2 times increasing the lot. Where is it?
I think I have one of those in my toys