[ARQUIVO!] Qualquer pergunta de novato, para não desorganizar o fórum. Profissionais, não passem por aqui. Em nenhum lugar sem você - 4. - página 493

 
hoz:

É claro que entendo. Exceto que eu nunca vi a presença de uma ordem analisada desta maneira antes:

geralmente apenas sem ===verdadeiro... Eu gostei desse ponto. Embora seja interessante, não tenho visto este método em outros EAs. Eu entendo a lógica, mas ainda assim.

Uma e a mesma ação no código pode ser escrita de maneiras diferentes e todas serão executadas corretamente. A diferença pode ser vista ou na simplicidade de escrever o código ou em sua velocidade, ou em ambos juntos e pode-se dizer que o código foi escrito por um profissional.
 
Você pode me dizer como parar o especialista? Uma busca não produziu nada de significativo :((
 
fmillion:
Você pode me dizer a função de parar uma EA? A busca não deu nada claro :(((

Não há problema:

bool ОстановкаСоветника (bool Причина)
{if (Причина) return (true) else return (false);}

int start()
{
    if (ОстановкаСоветника (Причина)) return (0);
    //---- Код советника

}

e você também pode usar o botão "Advisors" no terminal para desativar um EA.

 

Olá

Você poderia me dizer, por favor

Quando eu passo pela função OrderSelect, as ordens são ordenadas pelo número da ordem, não pelo bilhete.

Por qual parâmetro estas ordens são ordenadas?

Notei que eles são classificados por tempo de abertura da ordem, ou seja, a última ordem é a última em termos de tempo de abertura, seja no mercado ou pendente

é sempre assim nesta função ou é diferente?

ou seja, é sempre possível obter um bilhete da última ordem aberta/colocada desta forma ?

 
enquanto(!IsTradeAllowed()) Sleep(500);
RefreshRates();
if(Cmd == 0) PR = Lance; caso contrário PR = Pergunte;
int tic=OrderSend(Symbol(),Cmd,Lot,PR,Slippage,0,",Magic,0,CLR_NONE);
if(tic<0){
Print("Order open error: ",GetLastError()));
Print("Pair=",Symbol(),"...Command=",Cmd,"...Lot=",Lot,"...Price=",DoubleToStr(PR,Digits));

}

Slippage = 5 pontos

Erro 129 )) ..... onde diabos está ? o que está errado ?

 
fmillion:
enquanto(!IsTradeAllowed()) Sleep(500);
RefreshRates();
if(Cmd == 0) PR = Lance; caso contrário PR = Pergunte;
int tic=OrderSend(Symbol(),Cmd,Lot,PR,Slippage,0,",Magic,0,CLR_NONE);
if(tic<0){
Print("Order open error: ",GetLastError()));
Print("Pair=",Symbol(),"...Command=",Cmd,"...Lot=",Lot,"...Price=",DoubleToStr(PR,Digits));

}

Slippage = 5 pontos

Erro 129 )) ..... onde diabos está ? o que está errado ?

Experimente assim:

if(Cmd == 0) PR =Ask; ou PR =Bid;

Acho que isto ajudará.

 

Aqui está o roteiro:

//+------------------------------------------------------------------+
//|                                Brooky_FibIt_Extension_Script.mq4 |
//|                        Copyright 2012, www.Brooky_Indicators.com |
//|                                        www.Brooky_Indicators.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2012, www.Brooky_Indicators.com"
#property link      "www.Brooky_Indicators.com"
#property show_confirm  
#property show_inputs
//+---------------------
//| script program start function                                    |
//+------------------------------------------------------------------+

extern int       FibOnChartNum =1;

extern color     Fib_Cbar_Color = Red;
extern int       Fib_Cbar_Size=1;
extern int       Fib_Cbar_Style=2;

extern color     Fib_Level_Color = Gray;
extern int       Fib_Level_Size=1;
extern int       Fib_Level_Style=2;

extern double     Fib_Level_1 = -0.117;
extern double     Fib_Level_2 = 0;
extern double     Fib_Level_3 = 1;
extern double     Fib_Level_4 = 1.618;
extern double     Fib_Level_5 = 2;
extern double     Fib_Level_6 = 2.382;
extern double     Fib_Level_7 = 3;

string Xtra_txtFib_Level_1  = "(SL) ";
string Xtra_txtFib_Level_2  = "";
string Xtra_txtFib_Level_3  = "";
string Xtra_txtFib_Level_4  = "(TP1)";
string Xtra_txtFib_Level_5  = "(TP2)";
string Xtra_txtFib_Level_6  = "Re Entry Break ";
string Xtra_txtFib_Level_7  = "";


string txtFib_Level_1  = "";
string txtFib_Level_2  = "";
string txtFib_Level_3  = "";
string txtFib_Level_4  = "";
string txtFib_Level_5  = "";
string txtFib_Level_6  = "";
string txtFib_Level_7  = "";


string FibPrice = " @ %$";
string FibName = "";


int start()
  {
//----
      txtFib_Level_1 = StringConcatenate(Xtra_txtFib_Level_1,DoubleToStr(Fib_Level_1,3),FibPrice);
      txtFib_Level_2 = StringConcatenate(Xtra_txtFib_Level_2,DoubleToStr(Fib_Level_2,3),FibPrice);
      txtFib_Level_3 = StringConcatenate(Xtra_txtFib_Level_3,DoubleToStr(Fib_Level_3,3),FibPrice);
      txtFib_Level_4 = StringConcatenate(Xtra_txtFib_Level_4,DoubleToStr(Fib_Level_4,3),FibPrice);
      txtFib_Level_5 = StringConcatenate(Xtra_txtFib_Level_5,DoubleToStr(Fib_Level_5,3),FibPrice);
      txtFib_Level_6 = StringConcatenate(Xtra_txtFib_Level_6,DoubleToStr(Fib_Level_6,3),FibPrice);
      txtFib_Level_7 = StringConcatenate(Xtra_txtFib_Level_7,DoubleToStr(Fib_Level_7,3),FibPrice);
      
      
      
      FibName = "Brooky_Fib_"+FibOnChartNum;
      ObjectDelete(FibName);
      
      ObjectCreate(FibName,OBJ_FIBO,0,Time[9],High[24],Time[1],Low[1]);
      
      ObjectSet(FibName, OBJPROP_COLOR,Fib_Cbar_Color);
      ObjectSet(FibName, OBJPROP_WIDTH ,Fib_Cbar_Size);
      ObjectSet(FibName, OBJPROP_STYLE ,Fib_Cbar_Style);
      
      ObjectSet(FibName, OBJPROP_RAY,True);
       
      ObjectSet(FibName, OBJPROP_LEVELSTYLE,Fib_Level_Style);
      ObjectSet(FibName, OBJPROP_LEVELCOLOR,Fib_Level_Color);      
      ObjectSet(FibName, OBJPROP_LEVELWIDTH,Fib_Level_Size);  
       
          
      ObjectSet(FibName, OBJPROP_FIBOLEVELS,7);
      ObjectSet(FibName, OBJPROP_FIRSTLEVEL+0,Fib_Level_1);
      ObjectSet(FibName, OBJPROP_FIRSTLEVEL+1,Fib_Level_2);
      ObjectSet(FibName, OBJPROP_FIRSTLEVEL+2,Fib_Level_3);
      ObjectSet(FibName, OBJPROP_FIRSTLEVEL+3,Fib_Level_4);
      ObjectSet(FibName, OBJPROP_FIRSTLEVEL+4,Fib_Level_5);
      ObjectSet(FibName, OBJPROP_FIRSTLEVEL+5,Fib_Level_6);
      ObjectSet(FibName, OBJPROP_FIRSTLEVEL+6,Fib_Level_7);
      

     
      ObjectSetFiboDescription(FibName,0,txtFib_Level_1);
      ObjectSetFiboDescription(FibName,1,txtFib_Level_2);
      ObjectSetFiboDescription(FibName,2,txtFib_Level_3);
      ObjectSetFiboDescription(FibName,3,txtFib_Level_4);
      ObjectSetFiboDescription(FibName,4,txtFib_Level_5);
      ObjectSetFiboDescription(FibName,5,txtFib_Level_6);      
      ObjectSetFiboDescription(FibName,6,txtFib_Level_7);
//----
   return(0);
  }
//+------------------------------------------------------------------+

Há um artifício como este:

string FibPrice = " @ %$"

A questão que se coloca, o que isso significa, sequer?

É apenas um conjunto de caracteres ou faz sentido?

 
RaYDeR.tr:

Olá

Você poderia me dizer, por favor

Quando eu passo pela função OrderSelect, as ordens são ordenadas pelo número da ordem, não pelo bilhete.

Por qual parâmetro estas ordens são ordenadas?

Notei que eles são ordenados pelo tempo de abertura da ordem, ou seja, a última ordem é a última em termos de tempo de abertura, seja no mercado ou pendente.

é sempre assim nesta função ou é diferente?

ou seja, é sempre possível obter um bilhete da última ordem aberta/colocada desta forma ?

Infelizmente, o outro caminho também acontece. Eu já fiz isso antes. Portanto, é melhor procurar a última ordem na lista por tempo máximo aberto.
 
hoz:

Aqui está o roteiro:

Há um artifício como este:

A questão que se coloca, o que isso significa, sequer?

É apenas um conjunto de caracteres ou faz sentido?

Você o executa e vê. Um "conjunto" bastante útil.
 
Zhunko:
Você o executa e vê. Um "conjunto" bastante útil.

Executando-o. Na verdade, tenho-o em um gráfico. Pergunto-me por que o autor atirou estes símbolos...

Razão: