Can somebody tell me how transform this to my first ea? I know that the problem is in the form, and coding but I don't know what. Please help me in compiling this. Asking for any prompts:)
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.
int start() {
double ABUY=0;}
}
if ( ABUY== 2 ) {
if ( ASELL>0 ) {
OrderDelete(OrderMagicNumber()== 2 );
OrderDelete(OrderMagicNumber()== 6 );
OrderSend(Symbol(),OP_SELLSTOP,0.2,Bid-30*point,4,Ask-62*point,Ask-2*point,"HA SELL",6,expiration,Green);
}
else if ( BBUY== 0 ) && ( BSELL== 0 ) {
OrderDelete(OrderMagicNumber()== 7 );
OrderDelete(OrderMagicNumber()== 8 );
OrderSend(Symbol(),OP_BUYSTOP,0.1,Ask+6*point,4,Bid-52*point,Bid+20*point,"B BUY",3,expiration,Blue);
OrderSend(Symbol(),OP_SELLSTOP,0.1,Bid-8*point,4,Ask+50*point,Ask-22*point,"B SELL",4,expiration,Green);
}
}
else if ( ASELL == 2 ) {
if ( ABUY>0 ) {
OrderDelete(OrderMagicNumber()== 1 );
OrderDelete(OrderMagicNumber()== 5 );
OrderSend(Symbol(),OP_BUYSTOP,0.1,Ask+28*point,4,Bid+60*point,Bid,"HA BUY",5,expiration,Blue);
}
else if ( BBUY== 0 ) && ( BSELL== 0 ) {
OrderDelete(OrderMagicNumber()== 7 );
OrderDelete(OrderMagicNumber()== 8 );
OrderSend(Symbol(),OP_BUYSTOP,0.1,Ask+6*point,4,Bid-52*point,Bid+20*point,"B BUY",3,expiration,Blue);
OrderSend(Symbol(),OP_SELLSTOP,0.1,Bid-8*point,4,Ask+50*point,Ask-22*point,"B SELL",4,expiration,Green);
}
}
//-----------------
return (0);
}