[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 1046

 

It's strange if it's not, because there's a trend line in the centre of the channel...

I'll have to draw another one right on top of it)

 
eddy:

It's strange if it's not, because there's a trend line in the centre of the channel...

I'll have to draw another one right on top of it)

Not the line itself, but the top and bottom of the channel ?)
 
I don't need a top/bottom
 

how do I update the data before the Expert Advisor starts to work fully? I need to handle error 4066 (requested data is in update state).

I did it at the beginning of init:

RefreshRates();

Sleep(1000);

did not help.

Didn't find anything useful in search.

 

hello everyone. can you give me a hint, please? I need to take n shoulders of a spiral, and calculate how many bars in these shoulders. the algorithm is, i think. for example, take 2 days. From the beginning of the day, for example high, to the end of the second day, for example take low, it does not matter (or low and hight), and for each shoulder, for example take 3, count the sum. use the function of bar calculation. Right?) It does not work for me. Thanks

 

Hello. I have the following question:

My EA opens a long position if an upfractal is broken, which has formed above the muwinkle. How can I make it remember the bar where the fractal was formed?

 
TRAD3R8:

Hello. I have the following question:

I have an EA that opens a long position if an upfractal is broken and has formed above the muwinkle. How can I make it remember the bar at which this fractal was formed?

Remember the time of the bar:

int x=Time[];

then retrieve its current number by time

int bar=iBarShift(Symbol(),0,x,0);

 
beruk:

you remember the time of the bar:

int x=Time[];

then retrieve its current number by time:

int bar=iBarShift(Symbol(),0,x,0);

Thank you. I'll give it a try.
 

Good evening !

Can you please tell me what is wrong ? I often get a message - 130 "Wrong stops". I don't understand why. I've normalized the opening price.

ticketup=OrderSend(Symb, OP_BUYSTOP, Lot, NormalizeDouble(O1CII[A],Digits), 0, 0, 0, NULL,A,0,вверх); // Ордер вверх

I have put zeros instead of TP and SL to check. I have set conditions in case of different number of decimal places (before zeroing, stop loss is the first in the order, take profit is the second, i.e. the order of places is correct)

int init()
  {
   if(Digits==5 || Digits==3) PointX = Point * 10; // Корректировка Point под трёх- пятизнак
   if(Digits==4 || Digits==2) PointX = Point;
   return(0);
  }       

Checking the level of the minimum distance

int Min_Dist=MarketInfo(Symbol(),MODE_STOPLEVEL);                          // Мин. дистанция
           Alert("STOPLEVEL = ",Min_Dist);
Minimum distance = 4. Opening price for a long position is 7 pips up from the Bid, for a short position it is 4 pips down from the Bid. Spread = 3. Still I get an error. What is wrong?
 

How do I get the price values of the median line of a linear regression channel? with ObjectGetValueByShift will work?)