[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 93

 
Roll:
Purpose of the question? Personal opinion: whatever norms, rules, and public opinion may exist on any issue for the code algorithm (code users), the subjective opinion of the author (s) of this code is of primary importance, regardless of "correctness".
The purpose of the question - what are the most significant candlestick patterns, say, for a trend reversal or continuation of a trend?
 
first_may:
The purpose of the question is what are the most significant candlestick patterns, say for a trend reversal or for a continuation of a trend?

Need a list of literature?
 
Roll:

Need a list of literature?

Literature that will indicate the most important patterns? Isn't the book Morris G. Japanese Candlesticks good for that?
 

Good afternoon, could you advise me what to add to the code from the Expert Advisor so that the information displayed in the square would not be distorted (for example by the graph or other lines), that is, it would be in the foreground and would not shine through. Thanks in advance.

ObjectCreate("Flag-1", OBJ_LABEL, 0, 0, 0);
ObjectSetText("Flag-1", "g", 154, "Webdings");
ObjectSet("Flag-1", OBJPROP_CORNER, 0);
ObjectSet("Flag-1", OBJPROP_XDISTANCE, 6);
ObjectSet("Flag-1", OBJPROP_YDISTANCE, 4);
ObjectSet("Flag-1", OBJPROP_COLOR, DimGray);
ObjectSet("Flag-1", OBJPROP_BACK, false);

 
sergeev:

Testing strategies. MT4. MQL4



1
1billionbaks 16.08.2011 13:26

Hello.

I am interested in this question. How do I download and test EAs and indicators on a large timescale?


True - only on demo and on different currency pairs! The strategy tester gives completely unthinkable results.
 
bercut0077:

Good afternoon, could you advise me what to add to the code from the Expert Advisor so that the information displayed in the square would not be distorted (for example by the graph or other lines), that is, it would be in the foreground and would not shine through. Thanks in advance.

ObjectCreate("Flag-1", OBJ_LABEL, 0, 0, 0);
ObjectSetText("Flag-1", "g", 154, "Webdings");
ObjectSet("Flag-1", OBJPROP_CORNER, 0);
ObjectSet("Flag-1", OBJPROP_XDISTANCE, 6);
ObjectSet("Flag-1", OBJPROP_YDISTANCE, 4);
ObjectSet("Flag-1", OBJPROP_COLOR, DimGray);
ObjectSet("Flag-1", OBJPROP_BACK, false);


If it works, write how you did it
 

Good day. Help PLEASE TESTER CANNOT START: For example working advisor 1.6 ilan and 18, I open orders is trading but slowly goes into deficit, I want to test, I set m5 currency pair euro-dollar set parameters and press start green bar slowly moving forward. I do not see any results, I see a blank chart, but I wrote error 131 Please advise me, I have just started to learn. I am working with forex4, thank you very much Igor. I do not know how to set a stop loss.

 

Good afternoon!!! I must be getting dumb again. I've gone back to deleting all orders. I do not remember exactly what I was doing there a month ago and I have created a new EA from pieces.

In short, the EA does not delete orders. In fact, the forex loop does not fall out.

//----  


 // Alert ("ОсталосььOrdersTotal()", OrdersTotal());
    j=-1;
 for ( i=0; i<OrdersHistoryTotal(); i++) {
      if (OrderSelect(i, SELECT_BY_POS, MODE_HISTORY)) {
         if (OrderSymbol()!=Symbol())     continue;
         if (OrderType()>1)               continue;
         if (OrderMagicNumber()==1000 || OrderMagicNumber()==2000) {
            if (wremjapomnim<OrderCloseTime()) {
                wremjapomnim=OrderCloseTime();
                j=i;
               }
            }
         }
      }
   if (OrderSelect(j, SELECT_BY_POS, MODE_HISTORY)) {
      if (NormalizeDouble(OrderClosePrice()-OrderTakeProfit(), Digits)<0.5*Point) {
         Alert("Позиция с тикетом #",OrderTicket()," закрыта по TakeProfit, закрываем остальные прозиции и удаляем отложенные ордера");
         // Здесь код для закрытия всех открытых позиций (тоже в цикле)
         for ( i=0; i<OrdersTotal(); i++) {Alert ("Здесь код для закрытия всех открытых позиций (тоже в цикле)",i);
           OrderSelect(i, SELECT_BY_POS );
              if (  OrderType( )==OP_BUY && OrderType( )==OP_SELL ){
                          OrderClose( OrderTicket( ), OrderLots( ), OrderClosePrice( ) , 0, CLR_NONE);
   Alert ("OrderClose-vse-2",  GetLastError( ) ); C=0;A=1; }} 
         // Здесь код для удаления всех отложенных ордеров (также в цикле)
         for ( i=0; i<OrdersTotal(); i++) {Alert("Здесь код для удаления всех отложенных ордеров (также в цикле)",i);    
         OrderSelect(i, SELECT_BY_POS );
           if (  OrderType( )==OP_BUYSTOP && OrderType( )==OP_SELLSTOP ){ 
            OrderDelete(OrderTicket( )) ; Alert ("OrderDelete-vse-2",  GetLastError( ) ); }}    CloseAll();
         }
      }
//----


   return(0);
  }
//+------------------------------------------------------------------+


//+ -----------------------------------------------------------------+

      
//+------------------------------------------------------        



//+------------------------------------------------------------------+
// Закрываем все ордера                                              |
//+------------------------------------------------------------------+
void CloseAll()
{
 int ticket, i;
 while(OrdersTotal()>0) {
  for(i=OrdersTotal()-1;i>=0;i--){
   OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
    if(OrderType()<2){
     if(OrderType()==OP_BUY) {
        RefreshRates();
        ticket=OrderClose(OrderTicket(),OrderLots(),Bid,3,0);
        if(!ticket) Print(" Ошибка! ",GetLastError()); 
        Sleep(1000); }
     if(OrderType()==OP_SELL) {
        RefreshRates();
        ticket=OrderClose(OrderTicket(),OrderLots(),Ask,3,0);
        if(!ticket) Print(" Ошибка! ",GetLastError()); 
        Sleep(1000); }
    }    
  }
 }   
}
//+ -----------------------------------------------------------------+
Everything is logged fine before the fore cycle, the log never gets an entry...
Alert ("Здесь код для закрытия всех открытых позиций (тоже в цикле)",i);
And the cycle where...
for ( i=0; i<OrdersTotal(); i++) {Alert("Здесь код для удаления всех отложенных ордеров (также в цикле)",i);

The function won't delete anything either... Help!!!!Please! I've been staring at the form for 40 minutes...

Where the hell am I?

 
is it possible to download an indicator for zolliot waves
 

2Dimka-novitsek

by void CloseAll()

ticket=OrderClose

Ticket is of integer type, OrderClose is boolean. It is better not to do so.

while the loop is infinite, and the attempt is made to delete only market orders, if there is one pending, then this music will be eternal.

As for the rest

The first form searches for the last closed order by ticket and symbol.

for ( i=0; i<OrdersTotal(); i++)

it's better to search for a close in the reverse order; I don't think we need to explain the reason.

if ( OrderType( )==OP_BUY && OrderType( )==OP_SELL )

The order may be both BUY and SELL but I would rather have it ||

(OrderSelect(j, SELECT_BY_POS, MODE_HISTORY))

I would put j before this line; it would simplify things and also think about the condition

if (NormalizeDouble(OrderClosePrice()-OrderTakeProfit(), Digits)<0.5*Point)

I recommend to clarify who the point is and why it is multiplied by 0.5?