Disliked{quote} hi i have run the indicator on my simulator and it does not repaint, what time frame you wanne trade with?Ignored
Imparo ancora
I will code your pivot EAs for no charge 24 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
Disliked{quote} hi i have run the indicator on my simulator and it does not repaint, what time frame you wanne trade with?Ignored
Dislikedhttp://fxcodebase.com/code/viewtopic.php?f=38&t=21227 .. You see how the cci indicator (the top picture on that site) is in the form of a candlestick in the indicator window below, while the chart is on top. Like that. Thats what meant. Have you seen a MACD version like that.Ignored
DislikedHi to all, I've tried to code with molanis this system http://www.myforexdot.org.uk/MomentumTrading.html and I've backtested it on gbpusd d1 from 01/2000 to 11/2013 but the ea doesen't open positions and I didn't get any peculiar error message. Could someone help me? tnx {file} {file} {file} {file} {file}Ignored
// most brokers do not support sending the trade and set sl/tp at the same time, so you // have to first send the trade and after that set sl/tp. // usage: replace every OrderSend(-command with OrderSend2Stage( bool OrderSend2Stage(string symbol,int type,double lots,double price,int slippage,double sl,double tp,string ocomment,int magic,datetime expiry,color col) { while (IsTradeContextBusy()) Sleep(100); bool result=true; RefreshRates(); int ticket=OrderSend(symbol,type,lots,price,slippage,sl,tp,ocomment,magic,expiry,col); if (!OrderSelect(ticket, SELECT_BY_TICKET)) return(false); if (sl!=0||tp!=0) result = OrderModify(OrderTicket(),OrderOpenPrice(),sl,tp,OrderExpiration(),CLR_NONE); return(result); }
void BrokerDigitAdjust(string symbol) { Multiplier = 1; if (MarketInfo(symbol,MODE_DIGITS) == 3 || MarketInfo(symbol,MODE_DIGITS) == 5) Multiplier = 10; if (MarketInfo(symbol,MODE_DIGITS) == 6) Multiplier = 100; if (MarketInfo(symbol,MODE_DIGITS) == 7) Multiplier = 1000; pips2dbl = Multiplier*MarketInfo(symbol,MODE_POINT); }
int Multiplier; double pips2dbl;
BrokerDigitAdjust(Symbol());
void LastOrderData(string symbol,int magicnumber,int type) { for (int cnt=OrdersHistoryTotal()-1; cnt>=0; cnt--) { if (!OrderSelect(cnt,SELECT_BY_POS,MODE_HISTORY)) continue; if (OrderSymbol()!=symbol) continue; if (OrderMagicNumber()!=magicnumber) continue; if (OrderType()!=type) continue; { lastordertp=OrderTakeProfit(); lastordersl=OrderStopLoss(); return; } } }
Dislikedassuming you declared the doubles lastordertp and lastordersl already you could call the following function, I think this works: void LastOrderData(string symbol,int magicnumber,int type) { for (int cnt=OrdersHistoryTotal()-1; cnt>=0; cnt--) { if (!OrderSelect(cnt,SELECT_BY_POS,MODE_HISTORY)) continue; if (OrderSymbol()!=symbol) continue; if (OrderMagicNumber()!=magicnumber) continue; if (OrderType()!=type) continue; { lastordertp=OrderTakeProfit(); lastordersl=OrderStopLoss(); } } } btw, google helps: http://www.google.de/#q=get+last+closed+trade+%2B+mql4...Ignored
Disliked{quote} ok, I just changed if from CCI to MACD (Main), see attached pls. {file}Ignored
int Trailing() { int i; err=GetLastError(); // BreakEven if (ExtBreakeven>0 && k>0) for (i=1;i<=k;i++) { if (OrderN[i*2-1] > 0) if(OrderSelect(OrderN[i*2-1], SELECT_BY_TICKET)==true) { if ((ask-OrderOpenPrice())>NormalizeDouble(ExtBreakeven * precision, digit + 1) && OrderOpenPrice()>OrderStopLoss()) { OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice(),OrderTakeProfit(),0,0); // return(0); } err=GetLastError(); if (err>1) { Print("Ошибка модификации СЛ в без убыток! OrderN[k]=",OrderN[i*2-1]," Error=",err); } } if (OrderN[i*2] > 0) if(OrderSelect(OrderN[i*2], SELECT_BY_TICKET)==true) { if ((OrderOpenPrice()-bid)>NormalizeDouble(ExtBreakeven * precision, digit + 1) && OrderOpenPrice()<OrderStopLoss()) { OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice(),OrderTakeProfit(),0,0); // return(0); } err=GetLastError(); if (err>1) { Print("Ошибка модификации СЛ в без убыток! OrderN[k]=",OrderN[i*2]," Error=",err); } } } // Trailing if (ExtTrailingStop>0 && k>0) for (i=1;i<=k;i++) { if (OrderN[i*2-1] > 0) if(OrderSelect(OrderN[i*2-1], SELECT_BY_TICKET)==true) { if ((ask-OrderOpenPrice())>NormalizeDouble(ExtTrailingStop * precision, digit + 1) && OrderStopLoss()<(ask-NormalizeDouble(ExtTrailingStop * precision, digit + 1))) { OrderModify(OrderTicket(),OrderOpenPrice(),(ask-NormalizeDouble(ExtTrailingStop * precision, digit + 1)),OrderTakeProfit(),0,0); // return(0); } err=GetLastError(); if (err>1) { Print("Ошибка модификации СЛ во время1 трейлинга! OrderN[k]=",OrderN[i*2-1]," Error=",err); } } else { Print("Неудалось выделить ордер во время трейлинга ",OrderN[i*2-1]); } if (OrderN[i*2] > 0) if(OrderSelect(OrderN[i*2], SELECT_BY_TICKET)==true) { if ((OrderOpenPrice()-bid)>NormalizeDouble(ExtTrailingStop * precision, digit + 1) && OrderStopLoss()>(bid+NormalizeDouble(ExtTrailingStop * precision, digit + 1))) { OrderModify(OrderTicket(),OrderOpenPrice(),bid+NormalizeDouble(ExtTrailingStop * precision, digit + 1),OrderTakeProfit(),0,0); // return(0); } err=GetLastError(); if (err>1) { Print("Ошибка модификации СЛ во время2 трейлинга! OrderN[k]=",OrderN[i*2]," Error=",err); } } else { Print("Неудалось выделить ордер во время трейлинга ",OrderN[i*2]); } } return(0); }
Disliked{quote} Thank You fxdaytrader. I will give that a try hopefully this weekend. Looks good though so I'm sure I can get that to work. I did try google, thats usually my first search if I dont have a book about it I just didn't search with the right key words I think. Again your help is much appreciated.Ignored
return;
Dislikedsee attached, I think this looks good although I do not know if I done it alright, ... And, hey, I did not program the indicator, what I did is just replacing the indicator-call by another (cci by stoch) ... As can be read in the sourcecode, the author is http://fxcodebase.com/code/viewtopic.php?f=38&t=21227 {file}Ignored
QuoteDislikedI will not spend more time with that because I do not like that generator-based expert advisors