[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 330

 
borilunad:
Answer, please, who knows, is it necessary to keep the proxy server on or not?

is it in the settings? I keep it on when I need to cut the connection to the server and know I am offline.
 
FAQ:


1) You must understand exactly what "touched" means.

2) Remember that you can know the position of the indicator (as well as any line on the chart) only at the opening of the candle, what happens inside the candle you can learn only by descending down the TF (to a smaller), and also only by time (opening price).

3) You can not identify the "touch" - you can only understand that at one point, one line was below the other, and the next one was higher (ie, crossing).

Once you realise that, everything will be fine.


Well, in my code, I have a fixation of the moment, when the indicator value is more than the indicator level and less than(the indicator level + allowable deviation, a kind of a gap). Here:

if (GetRSI(0) > i_RSIToUpLimit)
      if (GetRSI(0) < (i_RSIToUpLimit + 0.1))
         return (SIGNAL_BUY);                  // Запускаем функцию открытия покупки

I took0.1 just to check. But the openings do not occur at that moment.

Judging by your words, you need to compare the value on some bar which is lower than the indicator level with the value on the zero bar above (level + gap) and nothing else?

But if we find the crossing of the indicator value on the previous bar and the value on the current bar (through the specified level), then for the current bar the value, and consequently, the price can fly very far and, consequently, this is not an option at all. How then to clearly spell out the condition I wrote about? Here is a screenshot to explain the situation:

 
alsu:

is it in the settings or something? I keep it on when I need to cut the connection to the server and know I'm offline.
Oh, thank you! I'm glad I didn't check it! Didn't know what it was, that's why I asked.
 
hoz:


Well, I have in my code fixation of the moment, when the indicator value is higher than the indicator level and less than(the indicator level + allowable deviation, a certain gap). Here:

0.1 I took at a guess. But the openings occur at the wrong moment.

Judging by your words, the value on some bar below the level of the indicator should be compared to the value on the zero bar above (level + gap) and not otherwise?

But if we find the crossing of the indicator value on the previous bar and the value on the current bar (through the specified level), then for the current bar the value, and consequently, the price can fly very far and, consequently, this is not an option at all. How then to clearly spell out the condition I wrote about? Here is a screenshot explaining the situation:

Victor, then do it on the same TF, but on 1-minute! At that.

if(iRSI(NULL,1,14,PRICE_CLOSE,1) < 0 && iRSI(NULL,1,14,PRICE_CLOSE,0) > 0) 

Then it will be on every tick!

 

Afternoon.

Is it necessary to check the distance between the current price and the take profit for the stop loss distance when setting a limit?

 
Stells:

Afternoon.

When setting a Limit, should the distance between the current price and the Take Profit be checked against the Stop Leap distance?


It should be checked on the stop loss:

  1. The distance between the current price and the opening price of the limiter.
  2. The distance between the opening price of the Limit and the Take Profit of the Limit.
 
PapaYozh:

Yes, in my haste, I was wrong.

I didn't notice that you have 2 cycles one after the other.

Usually in an indicator one cycle is used, and consequently it is used for calculation and comparison. And if everything is realized in one cycle, it is of course, whether the array element [i+1] is calculated or not yet :)


Can you explain, with examples and comments, how to turn two loops into one
 
borilunad:

Victor, then do it on the same TF, but on the 1-minute! At that, on the

if(iRSI(NULL,1,14,PRICE_CLOSE,1) < 0 && iRSI(NULL,1,14,PRICE_CLOSE,0) > 0) 

Then it will be on every tick!


Boris, so you have the value stretching from the 1M TF. And it's not compared to the level, but to zero. I do not understand why it will take the value at every tick. Maybe, it's not too difficult, but I've never worked with indicators before, and it doesn't seem to be logical.

If values are taken at every tick, then how can I compare them with a level, so that the EA will follow this level at every tick?

In my case, to buy on M5 from the level I wrote so:

   if (iRSI(NULL,1,14,PRICE_CLOSE,1) > i_RSIToUpLimit)
      if (iRSI(NULL,1,14,PRICE_CLOSE,0) < (i_RSIToUpLimit))
         return (SIGNAL_BUY);

Herei_RSIToUpLimit is the level of the RSI indicator. I understand that the period for M1 must be multiplied by 5 to use the level on M5, right? Then the period will not be 14, but 70.

 

Hello
There is such a good Revers script. When rearranging an order, how do I keep the comment of the old order and add my own to it?

 
Elektronik:

Hello
There is such a good script Revers. How do I keep the comment of the old order and add my own comment to it when rearranging an order?


If it is thisRevers:https://www.mql5.com/ru/code/8820

then at a glance you can try this as in the attached file. The changes are accompanied by the comment "// Modify for Elektronik".

Files:
revers.mq4  5 kb
Reason: