Kod: Zaznacz cały
void send(int cmd,int i)
{
if (AccountBalance()<Balance) return;
double price;
double minimum = Stop+Slippage;
if (StopLoss <minimum) StopLoss =minimum;
if (TakeProfit<minimum) TakeProfit=minimum;
double sl;
double tp;
color kolor;
if (cmd==OP_BUY)
{
price=Ask;
sl = Bid-StopLoss *Point_;
tp = Bid+TakeProfit*Point_;
kolor=Blue;
}
if (cmd==OP_SELL)
{
price=Bid;
sl = Ask+StopLoss *Point_;
tp = Ask-TakeProfit*Point_;
kolor=Red;
}
RefreshRates();
if (GlobalVariableGet("send")!=0) return;
if (price!=Bid && price!=Ask) { Print("Invalid Price");return;}
Print("Send");
int sendtime = TimeLocal();
GlobalVariableSet("send",Send);
int ticket = OrderSend(Symbol(),cmd,lots(i),price,Slippage,sl,tp,"",Magic,0,kolor);
if (ticket>0)
{
GlobalVariableSet(Symbol(),1);
Sleep(1000);
RefreshRates();
}
if (GlobalVariableGet("send")==Send) GlobalVariableSet("send",0);
int error = GetLastError();
if (error!=146)Print("Czas "+(TimeLocal()-sendtime)+" "+Symbol());
if ((TimeLocal()-sendtime)>50) Alert("Dealing Desk !?!?!?");
if (ticket<0) Print("Open "+error);
}
wyslalem ta funkcje o jakis czas temu do Was i nadal nie otrzymalem odpowiedzi
bo z tej funkcji wynika to ze to nie moj expert skalda zlecenia po nie istniejacych kwotowaniach tylko Wy oferujecie nie istniejace kwotwania ponieważ ja wysyłam zlecenia po tym co oferujecie a nie po wyimaginowanych kwotowaniach ...
z poważaniem Pierz Andrzej