Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.
From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.
Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
Elite Section
Get access to private discussions, specialized support, indicators and trading systems reported every week.
Advanced Elite Section
For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
I am trying to modify one of the bollinger percent b indicators posted here. I want (firstly anyway) to add simply an option to smooth the data with a moving average and place the result in Buffer3. Could someone please show me where I am going wrong.
PHP Code:
if(counted_bars>=BBPeriod) i=Bars-counted_bars-1;
while(i>=0)
{ //(Last - Lower BB)/(Upper BB - Lower BB)
BLGBuffer[i]=((Close[i] - iBands(NULL,0,BBPeriod,StdDeviation,0,AppliedPrice,MODE_LOWER,i))/
(iBands(NULL,0,BBPeriod,StdDeviation,0,AppliedPrice,MODE_UPPER,i)-iBands(NULL,0,BBPeriod,StdDeviation,0,AppliedPrice,MODE_LOWER,i)))*100;
//m_level refers to the bollinger bands centre line. i.e. 21MA
mlevel[i]=iMA(NULL,0,BBPeriod,0,BollingerMAMethod,AppliedPrice,0);
Buffer3[i] = iMAOnArray(BLGBuffer, 0, SmoothingMAPeriod, 0, SmoothingMAMethod, i);
i--;
}
Is there a way to have the EA “read” whether account is mini or standard and whether micros can be traded?
__________________
Visit http://www.openthinkingsystems.com for EA signal distribution systems, MetaTrader and Collective2 integration and general custom development.
I am a beginner, learning coding, and need help.
When I try to modify Coders’ guru code to make 5 orders example, It will have to finish placing 5 orders before activating the trailing stop.
Do you know any code that will allow me to attach trailing stop to each new order which will activate immediately
before the next condition is being met and a new order is opened.
Even a completely different code is fine.
Coders’ guru code
total = OrdersTotal();
if(total < 5)
{
if(isCrossed == 1)
{
ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,Ask+ TakeProfit*Point,
"My EA",12345,0,Green);
if(ticket>0)
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES ))
Print("BUY order opened : ",OrderOpenPrice());
}
else Print("Error opening BUY order : ",GetLastError());
return(0);
}
if(isCrossed == 2)
{
ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,0,
Bid-TakeProfit*Point,"My EA",12345,0,Red);
if(ticket>0)
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES ))
Print("SELL order opened : ",OrderOpenPrice());
}
else Print("Error opening SELL order : ",GetLastError());
return(0);
}
return(0);
}
for(cnt=0;cnt<total;cnt++)
{
OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
if(OrderType()<=OP_SELL && OrderSymbol()==Symbol())
{
if(OrderType()==OP_BUY) // long position is opened
{
// should it be closed?
if(isCrossed == 2)
{
OrderClose(OrderTicket(),OrderLots(),Bid,3,Violet) ;
// close position
return(0); // exit
}
// check for trailing stop
if(TrailingStop>0)
{
if(Bid-OrderOpenPrice()>Point*TrailingStop)
{
if(OrderStopLoss()<Bid-Point*TrailingStop)
{
OrderModify(OrderTicket(),OrderOpenPrice(),Bid-
Point*TrailingStop,OrderTakeProfit(),0,Green);
return(0);
}
}
}
}
Hallo everyone,
I would like to ask for help from anybody who can make the EA out of the Waddah Attar Explosion attached.
Look forward to hearing the response.
Thank you.
-s-