DislikedDear fxdaytrader please can you add an alert to the indicator attached below {file}Ignored
pls. try
Attached File(s)
PM me with coding requests and I'll probably put you on my ignore list
I will code your pivot EAs for no charge 28 replies
I will code your scalping EAs for no charge 163 replies
Oanda MT4 - Indicators and EAs not showing 2 replies
EAs and indicators relating to moutaki... 22 replies
InterbankFX has loaded its MT4 platform with custom EAs, indicators and scripts 1 reply
DislikedDear fxdaytrader please can you add an alert to the indicator attached below {file}Ignored
DislikedHallo, I am not a coder. After one month study a martingale system I succeed to change it to a trend following system with limited number of open positions, it is working fine. Following modifications will boost the system. Can you or anybody insert a code here that will close all open positions short/long, profit/loss at the starting of a new trend (right place for opening new positions and closing opened position)Ignored
if (!ExistPositions()){
if ((diClose0<diMA1)){
CloseTrades(Symbol(),MAGICNUMBER,OP_BUY);
OpenSell();
return(0);
}
if ((diClose2>diMA3)){
CloseTrades(Symbol(),MAGICNUMBER,OP_SELL);
OpenBuy();
return(0);
} void CloseTrades(string symbol,int magicnumber,int type) {
bool FilterBySymbol=true;
bool FilterByMagicNumber=true;
bool result;
for (int cnt=OrdersTotal()-1; cnt>=0; cnt--) {
if (!OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES)) continue;
if (FilterBySymbol && OrderSymbol()!=symbol) continue;
if (FilterByMagicNumber && OrderMagicNumber()!=magicnumber) continue;
{
RefreshRates();
if (OrderType()==OP_BUY && type==OP_BUY) result = OrderClose(OrderTicket(),OrderLots(),MarketInfo(OrderSymbol(),MODE_BID),99999,CLR_NONE);
if (OrderType()==OP_SELL && type==OP_SELL) result = OrderClose(OrderTicket(),OrderLots(),MarketInfo(OrderSymbol(),MODE_ASK),99999,CLR_NONE);
}
}
} DislikedTHIS THE CODE CLOSE IN PROFIT , I WANT CLOSS IN LOSS , MEANS IF THE CERTAIN LOSS IS OCCUR IT CLOSE ALL THE TRADEIgnored
extern color ColorUp = CLR_NONE; extern color ColorDown = CLR_NONE;