Auftrag beendet
Ausführungszeit 2 Tage
Bewertung des Kunden
Excelente resolvió mi problema en muy poco tiempo. espero trabajar con el de nuevo.
Spezifikation
quiero convertir un programa y necesito asesoria para la conversion y aprender.
quiero mantener el mismo formato tanto como sea posible .
son varias funciones a convertir dejo ejemlo de una funcion.
bool Buy(int MagicIndex, double Lots, int StopLossMethod, double StopLossPoints, int TakeProfitMethod, double TakeProfitPoints, int Slippage, int MaxOpenTrades, int MaxFrequencyMins, string TradeComment) { static double pipSize = 0; if(pipSize == 0) pipSize = Point * (1 + 9 * (Digits == 3 || Digits == 5)); double sl = 0, tp = 0; double stopLossPoints = 0, takeProfitPoints = 0; int numberOfOpenTrades = 0; for(int i=OrdersTotal()-1;i>=0;i--){ if(!OrderSelect(i, SELECT_BY_POS)) continue; if(OrderMagicNumber() != __STRATEGY_MAGIC + MagicIndex || OrderSymbol() != Symbol()) continue; numberOfOpenTrades ++; } if(MaxOpenTrades > 0 && numberOfOpenTrades >= MaxOpenTrades) return(false); if(MaxFrequencyMins > 0) { int recentSeconds = MaxFrequencyMins * 60; for(int i=OrdersTotal()-1;i>=0;i--){ if(!OrderSelect(i, SELECT_BY_POS)) continue; if(OrderMagicNumber() != __STRATEGY_MAGIC + MagicIndex || OrderSymbol() != Symbol()) continue; if(TimeCurrent() - OrderOpenTime() < recentSeconds) return(false); } int hstTotal=OrdersHistoryTotal(); for(int i=hstTotal-1;i>=0;i--) { if(!OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)) continue; if(OrderMagicNumber() != __STRATEGY_MAGIC + MagicIndex || OrderSymbol() != Symbol()) continue; if(TimeCurrent() - OrderOpenTime() < recentSeconds) return(false); break; } } if(Lots < MarketInfo(Symbol(),MODE_MINLOT)) return(false); if(AccountFreeMarginCheck(Symbol(), OP_SELL,Lots) <= 0) { Print("Buy error: insufficient capital"); return(false); } if (StopLossPoints > 0) { if(StopLossMethod == 0) { sl = NormalizeDouble(Ask - StopLossPoints * Point, Digits); stopLossPoints = StopLossPoints; } else if (StopLossMethod == 1) { sl = NormalizeDouble(Ask - StopLossPoints * pipSize, Digits); stopLossPoints = StopLossPoints * (1 + 9 * (Digits == 3 || Digits == 5)); } else { sl = StopLossPoints; stopLossPoints = (Ask - sl)/Point; } } if (TakeProfitPoints > 0) { if(TakeProfitMethod == 0) { tp = NormalizeDouble(Ask + TakeProfitPoints * Point, Digits); takeProfitPoints = TakeProfitPoints; } else if (TakeProfitMethod == 1) { tp = NormalizeDouble(Ask + TakeProfitPoints * pipSize, Digits); takeProfitPoints = TakeProfitPoints * (1 + 9 * (Digits == 3 || Digits == 5)); } else { tp = TakeProfitPoints; takeProfitPoints = (tp - Ask)/Point; } } double stopLevel = MarketInfo(Symbol(),MODE_STOPLEVEL) + MarketInfo(Symbol(),MODE_SPREAD); if( (sl > 0 && stopLossPoints <= stopLevel) || (tp > 0 && takeProfitPoints <= stopLevel) ) { Print("Cannot Buy: Stop loss and take profit must be at least " + DoubleToStr(MarketInfo(Symbol(),MODE_STOPLEVEL) + MarketInfo(Symbol(),MODE_SPREAD),0) + " points away from the current price"); return (false); } RefreshRates(); int result = OrderSend(Symbol(), OP_BUY, Lots, Ask, Slippage, sl, tp, " " + "(" + WindowExpertName() + ") " + TradeComment, __STRATEGY_MAGIC + MagicIndex); if (result == -1){ Print("Failed to Buy: " + IntegerToString(GetLastError())); Sleep(__SLEEP_AFTER_EXECUTION_FAIL); return(false); } return(true); }
Bewerbungen
1
Bewertung
Projekte
477
40%
Schlichtung
105
40%
/
24%
Frist nicht eingehalten
81
17%
Beschäftigt
Veröffentlicht: 2 Beispiele
2
Bewertung
Projekte
117
47%
Schlichtung
7
14%
/
29%
Frist nicht eingehalten
11
9%
Frei
Ähnliche Aufträge
Descripción del proyecto Busco un desarrollador con experiencia real en entornos de brokers para implementar una lógica en cTrader que permita monitorizar el volumen (lotaje) operado por clientes con cuentas tipo cent y clasificar su comportamiento para una futura gestión A-Book / B-Book. Requisitos principales: • Desarrollo en cTrader (cAlgo / C# o Open API) • Monitorización del volumen (lotaje) por cuenta en
Encargar tarea
1000+ USD
Sort (cost=8.73..8.73 rows=1 width=723) Sort Key: m.created_lt -> Nested Loop (cost=2.00..8.72 rows=1 width=723) -> Nested Loop (cost=1.30..5.76 rows=1 width=693) -> Index Scan using messages_created_at on messages m (cost=0.59..2.83 rows=1 width=668) Index Cond: ((created_at > (EXTRACT(epoch FROM to_timestamp('2025-11-29 00:00:00'::text, 'YYYY-MM-DD HH24:MI:SS'::text)))::bigint) AND
Projektdetails
Budget
40+ USD