EA help needed .!!

 

i am using EA, and i want to use bolinger band as follows, if the upper limit of bolinger band is reached, then sell orders with profit of 10 pips should be placed continously again and again till it reaches the lower limit,

likewise from lower limit to upper limit, buy orders should be placed with profit of 10 pips continously again and again . thanks in advance.

 
No one is gonna do it for you. Learn to code here. Or pay someone.
 
No Slaves here, learn to code or pay someone. We're not going to code it FOR you. We are willing to HELP you.
 

I didnt ask anyone to create an EA for me....i was just asking how to implement the above in loop....i dunno which loop might be good for it...."for" or "while" ??....i used a while loop, but it keeps on placing order on the same place as that is wat a while loop does, but to use a for loop, i might need a value to increment on...i dunno what values to assign to the increment variable....

 
while and for loops are the same thing implemented in slightly different ways . . .
 
kmnatarajan:

Ya thats ok dude... i want to place sell order with 10 pips profit when this condition becomes true (iBands(NULL, PERIOD_H1,20,2,0,PRICE_CLOSE,MODE_UPPER,0)

iBands returns a double not a bool . . it cannot "become true" . . . https://docs.mql4.com/indicators/iBands
 

hi dude....thanks...i think i forgot to mention it fully.....its updated again...pls see it now...

Ya thats ok dude... i want to place sell order with 10 pips profit when this condition becomes true (iBands(NULL, PERIOD_H1,20,2,0,PRICE_CLOSE,MODE_UPPER,0)>Bid,and when the sell order closes, another sell order

with 10 pips profit, likewise i wanna place orders till this condition (iBands(NULL, PERIOD_H1,20,2,0,PRICE_CLOSE,MODE_LOWER,0)<Ask is reached .. i just wanna know which loop to use and hw to use it, pls can you post the code snippet alone??

 
Hi,


i got a wonderfull and powerfull dorex indicator i would like to make an EA with it, it is a arrow indicator

this are conditions:


Open Buy order If indicator is turn red to blue color.

Open Sell order if indicator turn blue to red color .

Close Buy before open the sell order.
close Sell before open the Buy order.


money managment:
takeprofit :adjustable
stop loss : adjustable
no trailing stop
maxslipage :3
order numbers :Could you make EA can make more than one orders (expamle :2,3,4....) each opened get same lotsize ( example : if EA opens 3 Buy orders with same lotsize,,Lotsize : Lot/ordernumbers)

lot adjustable )
, i join indicator code :
 
Ok ... thats it .. U need to quit. Don't hijack other people's thread. Go learn how to code and help yourself. I suggest you delete your posts and don't spam us anymore.
 
kmnatarajan:

hi dude....thanks...i think i forgot to mention it fully.....its updated again...pls see it now...

Ya thats ok dude... i want to place sell order with 10 pips profit when this condition becomes true (iBands(NULL, PERIOD_H1,20,2,0,PRICE_CLOSE,MODE_UPPER,0)>Bid,and when the sell order closes, another sell order

with 10 pips profit, likewise i wanna place orders till this condition (iBands(NULL, PERIOD_H1,20,2,0,PRICE_CLOSE,MODE_LOWER,0)<Ask is reached .. i just wanna know which loop to use and hw to use it, pls can you post the code snippet alone??

What do you need a loop for ? are you setting a SL or not ?

If you explain in detail, step by step, what you are trying to achieve you will have the basis for some pseudo code, taking that to mql4 code should be pretty easy afterwards . .

 

void TechnicalAnalysis5()
{
FROM (iBands(NULL, PERIOD_H1,20,2,0,PRICE_CLOSE,MODE_LOWER,0) > Ask) TO (iBands(NULL, PERIOD_H1,20,2,0,PRICE_CLOSE,MODE_UPPER,0) < Bid)
{
BuyOrder(); //this should continue till the above condition fails.

}
}

void BuyOrder()
{
int ticket = -1;
ticket = OrderSend(Symbol(), OP_BUY, 0.01, Ask, 4, 0, 10, "My Expert", 1, 0, Blue);
if (ticket > -1)
{
if (true)
{
OrderSelect(ticket, SELECT_BY_TICKET);
bool ret = OrderModify(OrderTicket(), OrderOpenPrice(), SL, TP, 0, Blue);
if (ret == false)
Print("OrderModify() error - ", ErrorDescription(GetLastError()));
}

}
else
{
Print("OrderSend() error - ", ErrorDescription(GetLastError()));
}
}

here, instead of FROM and TO, what should i use??... for loop as well as while loop doesnt work in this condition, can u tell me a suitable loop for it?

Reason: