Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 621

 
Leo59:

Thanks!!!!!!!!!!!!

If you don't think it's impertinent.....:))) tell me how to run the Tester properly. The way I'm trying, it's not working.

Self-optimisation decided to do it! ? cool... that's a cool topic.

there are 2 ways i like the 1

1) start the optimization from the Expert Advisor on the same terminal

2) configure a separate terminal or terminals - start them and then read the results of optimization


you seem to be trying the 2nd method - it is more cumbersome.


Replace it first.

ShellExecuteA  на ShellExecuteW
 
YuraZ:

Self-optimisation decided to do it! ? cool... that's a cool topic.

there are 2 ways i like the 1

1) start the optimization from the Expert Advisor on the same terminal

2) configure a separate terminal or terminals - start them and then read the results of optimization


you seem to be trying the 2nd method - it is more cumbersome.


firstly you need to replace it with.



Thanks!!!!!!!!
You, are right :)) The bottom line is self-optimisation.


1) start optimization from the Expert Advisor on the same terminal

I do it on the basis of the current virtual trade results

2) Configure a separate terminal or terminals - start them and then read the optimization results at the end

I was digging in XEON's auto_optimization in autumn. TestCommander is a commercial black box. Decided to do it myself to somehow implement the functionality that doesn't work in variant 1).

 
pu6ka:

Throw this indicator on M1, as new bars appear, the alligator lines on the left "get wiped out". Do you need this?



Solved the problem.

#property copyright "forexman77@list.ru"
#property link      "forexman77@list.ru"
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 Green
#property indicator_color2 Red
//--- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
extern int p  =10;
double val_plus[];
double val_minus[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,ExtMapBuffer1);
   SetIndexStyle(1,DRAW_LINE);
   SetIndexBuffer(1,ExtMapBuffer2);
   IndicatorDigits(Digits+1);
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
    int counted_bars=IndicatorCounted(),                      
    limit;
    double
    indicator_plus,indicator_minus;
   if(counted_bars>0)
      counted_bars--;
   limit=Bars-counted_bars;
   for(int i=0;i<limit;i++)
   { 
     indicator_plus=0;
     indicator_minus=0;
     ArrayInitialize(val_plus,0);
     ArrayInitialize(val_minus,0);
   for(int k=p;k>=0;k--)
     {
     ArrayResize(val_plus,p);
     ArrayResize(val_minus,p);
     if(iMA(NULL,PERIOD_CURRENT,21,0,MODE_EMA,PRICE_CLOSE,i+k)>iMA(NULL,PERIOD_CURRENT,21,0,MODE_EMA,PRICE_CLOSE,i+k+1))val_plus[k]=1;
     if(iMA(NULL,PERIOD_CURRENT,21,0,MODE_EMA,PRICE_CLOSE,i+k+1)>iMA(NULL,PERIOD_CURRENT,21,0,MODE_EMA,PRICE_CLOSE,i+k))val_minus[k]=1;

     if (val_plus[k] > 0){indicator_plus=indicator_plus+val_plus[k];}
     if (val_minus[k] > 0){indicator_minus=indicator_minus+val_minus[k];}
     }
          ExtMapBuffer1[i]=indicator_plus;
          ExtMapBuffer2[i]=indicator_minus;
   }

   return(0);
  }
 
Can anyone write simple script code that copies a file from one place to another?

Or, which will run the Tester in a different terminal?

Well, I can't yet. Can you?

 
Leo59:
Write a simple code script, which copies a file from one place to another, can anyone?

Or, who will run the Tester in a different terminal?

Here, I still can not. And you?


And I can't, because I don't have to! What's needed, I'm learning to do myself, so I don't have to change my logic!

Especially since I did it myself, if you need to tweak something, no problem!

Learn from the basics "match", with hints-gifts will not learn and in the end more time will be wasted for nothing!

Good luck! :)

 
borilunad:


And I can not, because it is not yet necessary! What is needed, I am accustomed to doing myself, so as not to change my logic!

All the more reason to do it yourself, if you need to tweak anything, no problem!

Learn the basics, you won't learn with hints-gifts and you'll end up wasting more time in the long run!

Good luck! :)

You're right, "don't eat someone else's loaf".

The city of Barcelona is amazing! The tram tracks alone, laid out amongst green lawns, are worth it! But women there in Spain are short-necked and stout-headed, not like our women in St. Petersburg.
:)) What kind of nonsense you can't write when you're really hungover. I'm talking about me.

It's all good, and good luck to you too, as well as to everyone else!

 
Leo59:

You're right, you shouldn't stare at someone else's loaf.

It's an amazing city, Barcelona. Tramway alone, laid out among green lawns, what it's worth! But women there in Spain are short-skinned and stout-headed, not like our women in St. Petersburg.
:)) What kind of nonsense you can't write when you're really hungover. That's me.

It's all good, and good luck to you too, as well as to everyone else!


I'm not talking about a "loaf", but about a more productive method of learning, so that "it doesn't hurt painfully for the wasted years"!

Well, to each his own! :(

 
artmedia70:

Maybe try it this way:

Entered a symbol and a magik in the variables to be passed. You don't have a check on them.




Thank you! I'll try it on Monday. Although, the question is still not clear to me. If I want to close any order, why do I get an error? By the way, I will have to try the same code in the old tester. The new tester has a lot of minor changes. I am not always sure what the result will be.
 
001:


Thank you! I'll try it on Monday. Although, the question still remains unclear to me. If I want to close any order, why do I get an error? By the way, I will have to try the same code in the old tester. The new tester has a lot of minor changes. I am not always sure what the result will be.

I can't remember now... If you want to close all the Sell, you don't need to return from the function. I messed up there in my sleep. That's how you do it to close all of them:

//+------------------------------------------------------------------+
void  CheckForLongetivityClose_Sell(int symbol, int magic) {
   if(DayOfWeek()==0 || DayOfWeek()==6) return;
   for(int i=OrdersTotal()-1; i>=0; i--) {
      if(OrderSelect(i,SELECT_BY_POS)) {
         if(OrderMagicNumber()!=magic) continue;
         if(OrderSymbol()!=symbol)     continue;
         if(OrderType()!=OP_SELL)      continue;
         datetime openTime_S= OrderOpenTime();
         int timeDistance_S = TimeCurrent()-openTime_S;
         if(timeDistance_S>60*BarrierMinute_S) {
            bool  res= OrderClose(OrderTicket(),OrderLots(),Ask,3,clrRed);
            }
         }
      }
}
//+------------------------------------------------------------------+

In general, of course, instead of this line

bool  res= OrderClose(OrderTicket(),OrderLots(),Ask,3,clrRed);

You have to call a normal function to close positions that has return code processing by the server.

 

Can anyone suggest, install the plugin GetTickerHistory in MT-4, runs, but the download does not go, on Windows 7 x64, is it possible to download the external indexes in another way.

Thanks in advance.
Reason: