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

 
alsu:

...with parents)))

If with parents, it all depends on the criteria for luck, which is usually as different as people themselves! There is no such thing as a uniform measure! United Russians need one thing, and different people need another! And there will be no agreement here!
 
borilunad:

If with parents, it all depends on the criteria for luck, which is usually as different as the people themselves! There's no way to do it with one measure! United Russians want one thing, and different Russians want another! And there will be no agreement here!

Then - give another one!!!

PS Here I have taught my daughter freedom of thought. And the wife is now dissatisfied. Allegedly child (8 years) against her. Although she was a strong initiator))))

 
alsu:

Then - give me another one!!!

PS I've been teaching my daughter freedom of thought. And now my wife is not happy. Allegedly child (8 years) against her. Although she herself was a strong initiator))))



I am in favour of a different other and against a single one, much less a ruling one! And your family could do with pluralism! It may come in handy soon. Truth can be born in arguments that respect and listen to each other! Otherwise, the world will end up in the hands of the United Russia!
 
borilunad:

I am in favour of a different other and against a single one, much less a ruling one! And your family could do with pluralism! It may come in handy soon. Truth can be born in arguments that respect and listen to each other! Otherwise, the world will end up with the United Russia!

I'm all for it. My child is strict, but only on domestic issues, such as NO dirt on the desktop after the party, etc.. Otherwise - pluralism, yes. I can tell you, it's not an easy business, sometimes the kinder just drives me crazy)). About politics she does not know, but knows (sees for herself) that "our city is overgrown with shit", and about the "zombie TV" yet. That's enough for now))

 
alsu:

I'm all for it. I keep the kid strict, but only on domestic issues, like NO dirt on the desk after the birthday party, etc. Otherwise, pluralism, yes. I can tell you, it's not an easy business, sometimes the kinder just drives me crazy)). About politics she does not know, but knows (sees for herself) that "our city is overgrown with shit", and about the "zombie TV" yet. That's enough for now))


You're a fool yourself.
 
alsu:

I'm all for it. I keep my child strictly, but only about domestic issues, such as NO dirt on the desktop after the birthday party, etc.. Otherwise, pluralism, yes. I can tell you, it's not an easy business, sometimes the kinder just drives me crazy)). About politics she does not know, but knows (sees for herself) that "our city is overgrown with shit", and about the "zombie TV" yet. That's enough for now))


I agree, order must be taught! Without order, democracy will turn into anarchy. But you still have to fight for democracy! Dictators nowadays only talk about democracy, they care about their ratings, but in practice you know, they are all a bit plush. I am afraid that you cannot do without your "Maidan" either!

And I threw that 'zombie TV' away a long time ago. It's already shit everywhere, advertising, gossip, scandals, healthy sports have been turned into a crippling business, in general, degradation is total. What I want to watch is on the Internet and it's more pleasant to listen to the radio.

 

Hello. When the Expert Advisor works on an off line chart, the indicator value is not updated by a timer. The chart is Renko, obtained using

Expert Advisor RenkoLiveChart_v3.2. The value calculated during the first run remains unchanged. Any tips on how to deal with it.

#property copyright "Copyright 2014, Demal"
#property link      ""
#property version   "1.00"
#property strict

extern int ParamTimer=1;
extern string ind1="------- Slope Direction Line 1 -------";
extern int MA_Period1=13;
extern int MA_Method1=3;
extern int MA_Price1=0;

//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- create timer
   EventSetTimer(ParamTimer);
      
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//--- destroy timer
   EventKillTimer();
      
  }
//+------------------------------------------------------------------+
//| Timer function                                                   |
//+------------------------------------------------------------------+
void OnTimer()
  {
//---
double MA1up=iCustom(Symbol(),0,"Slope Direction Line",MA_Period1,MA_Method1,MA_Price1,0,0);
double MA1dn=iCustom(Symbol(),0,"Slope Direction Line",MA_Period1,MA_Method1,MA_Price1,1,0);
Print(" MA1up=",MA1up," MA1dn=",MA1dn);   
return;
  }
 
Looks like a solution to the problem is expected in the next build. Only, when is it expected?
 
And again I had to ask for help (I've been struggling with this question for many months, and many programmers have tried to help, so the question is not new), so the indicator is multi-currency, works on all pairs specified in the window _market overview_, shows the amount of motion in points, all pairs that move in the direction of the previous movement are added, those against - are reduced. all works like clockwork strictly by this algorithm, calculation cycle a week. is set at smaller TF. history is displayed and fixed. I am saying all this to make it clear that the indicator works as it should. But for all his calculations and shows he takes the closing bar (0 - current, +1 - previous, +2 - before the previous one), and I need to take the closing of the weekly bar (0 - current, +1 - previous, +2 - before the previous one). For those who don't understand, it is a weekly bar close, and not a weekly bar size close (in seconds, minutes, hours, days). The indicator will be set on a shorter timeframe than the weekly one. Two more indicators I have created I can explain each line
MQL Code:
#property indicator_separate_window#property indicator_buffers 1#property indicator_color1 Lime//--- buffersdouble ExtMapBuffer1[];int TotalSymbols;string SymbolName[1];// -------------------------------------------------------------------int init() { SetIndexStyle(0, DRAW_HISTOGRAM); SetIndexBuffer(0, ExtMapBuffer1); int hFile = FileOpenHistory("symbols.sel", FILE_BIN|FILE_READ); TotalSymbols =(FileSize(hFile) - 4) / 128; ArrayResize(SymbolName, TotalSymbols); for(int i = 0; i < TotalSymbols; i++) { FileSeek(hFile, 4 + i * 128, SEEK_SET); SymbolName[i] = FileReadString(hFile, 12); } FileClose(hFile);

   return(0); }// -------------------------------------------------------------------int deinit() { return(0); }// -------------------------------------------------------------------int start() { int StartBar = Bars - IndicatorCounted() - 1; for(int i = StartBar; i >= 0; i--) { if(TimeDayOfWeek(Time[i]) < TimeDayOfWeek(Time[i+1])) ExtMapBuffer1[i] = 0; else ExtMapBuffer1[i] = ExtMapBuffer1[i+1]; for(int j = 0; j < TotalSymbols; j++) { int BarShift = iBarShift(SymbolName[j], 0, Time[i], true)
	    	 
           if(iClose(Sym bolName[j], 0, BarShift) > iClose(SymbolName[j], 0, BarShift+1)&&iClose(SymbolName[j], 0, BarShift+1) >= iClose(SymbolName[j], 0, BarShift+2)) ExtMapBuffer1[i] +=(iClose(SymbolName[j], 0, BarShift) - iClose(SymbolName[j], 0, BarShift+1)) / MarketInfo(SymbolName[j], MODE_POINT)
           if(iClose(Sym bolName[j], 0, BarShift) < iClose(SymbolName[j], 0, BarShift+1)&&iClose(SymbolName[j], 0, BarShift+1) < iClose(Sym bolName[j], 0, BarShift+2)) ExtMapBuffer1[i] +=(iClose(SymbolName[j], 0, BarShift+1) - iClose(SymbolName[j], 0, BarShift)) / MarketInfo(SymbolName[j], MODE_POINT);
           if(iClose(Sym bolName[j], 0, BarShift) > iClose(SymbolName[j], 0, BarShift+1)&&iClose(SymbolName[j], 0, BarShift+1) < iClose(Sym bolName[j], 0, BarShift+2)) ExtMapBuffer1[i] +=(iClose(SymbolName[j], 0, BarShift+1) - iClose(SymbolName[j], 0, BarShift)) / MarketInfo(SymbolName[j], MODE_POINT);
           if(iClose(Sym bolName[j], 0, BarShift) < iClose(SymbolName[j], 0, BarShift+1)&&iClose(SymbolName[j], 0, BarShift+1) >= iClose(SymbolName[j], 0, BarShift+2)) ExtMapBuffer1[i] +=(iClose(SymbolName[j], 0, BarShift) - iClose(SymbolName[j], 0, BarShift+1) / MarketInfo(SymbolName[j], MODE_POINT); } } return(0); }// -------------------------------------------------------------------
waiting for help
 

Please advise how to implement this function in an EA.

Suppose an EA is running, it has opened several orders (both Buy and Sell).

We need each of the open orders to be closed It has to open them in exactly 4 bars. After it has been opened, it should be closed irrespective of the result of the trade or timeframe.

Thank you.