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

 
Any tips on how to make the clock adjustments more subtle? In Al.... for example does not use GMT, which creates some difficulties at some point. How to convert the time to a specific value ( -3) ?
 
Hello, dear programmers, I have a request: there is a file SignalLibrary.mq4 in the folder Experts/Libraries, which gives the advisor buy and sell signals, it originally contains signals for entry on the MA. Please help me to remake it so that the buy and sell signals were not on the MA, but on the indicator 3_Level_ZZ_Semafor and only when a yellow number 3 appears in the indicator. Thank you
Files:
 
attached indicator
Files:
 
Do you need it? :)) https://www.mql5.com/ru/forum/127749
granit77:

.... Just look in the tester's visual mode to see when the semaphore signals appear and how they change. The author, I think, warned that you can't use the signals head-on.

Integer:
It's an ordinary zigzag, only drawn with balls.
 
Roll:

What time - local or broker time? Where - in MT4 (Expert Advisor, indicator, script) or elsewhere? The shift (-3) - relative to what time and with what accuracy? Do they take into account the daylight saving time? Is there a "non-sophisticated" solution?


Alpari is based on Central European time (-2 hours) with Moscow.

Do a search - there must have been a similar topic.

 

The robot is set to: Take Profit = 50 pips

- What do you mean, will the net profit be 50 pips? - If yes, will it be a net profit for both Buy and Sell?

- Or is it the distance from the position opening level? - In this case net profit will be lower due to not taking spreads into account.

.

Not interested in private opinion (which is better or worse), but "standard".

I am not interested in private opinion (better or worse), but in "standard". Thank you!

 
chief2000:

The robot is set to: Take Profit = 50 pips

- What do you mean, will the net profit be 50 pips? - If yes, will it be a net profit for both Buy and Sell?

- Or is it the distance from the position opening level? - In this case net profit will be lower due to not taking spreads into account.

.

Not interested in private opinion (which is better or worse), but "standard".

I am not interested in private opinion (better or worse), but in "standard". Thank you!



"standard" - see the whole page, but especially the content and description of the OrderSend() function.
 
Roman.:

"standard" - see the whole page, but especially the content and description of the OrderSend() function.

In that example it's the same as in my past robots, although I'm not quite sure why this particular solution was chosen?

->

      if (Tip==0)                        // Будем открывать Buy
        {
         SL=Bid - StopLoss*  Point;      // StopLoss   (цена)
         TP=Bid + TakeProfit*Point;      // TakeProfit (цена)
         Ticket=OrderSend(Symbol(),0,Lots_New,Ask,2,SL,TP,"",MN);
        }
      if (Tip==1)                        // Будем открывать Sell
        {
         SL=Ask + StopLoss*  Point;      // StopLoss   (цена)
         TP=Ask - TakeProfit*Point;      // TakeProfit (цена)
         Ticket=OrderSend(Symbol(),1,Lots_New,Bid,2,SL,TP,"",MN);
        }

If we set TP = SL and have two buy trades, one of which is profitable and one is loss-making, the result will be a loss greater than the profit.

- Isn't it implied that when TP and SL are equal, we want them to fully compensate each other in the end?

Thank you!

 
chief2000:

- Isn't it implied that with TP and SL being equal, we want them to end up compensating each other completely?

Thank you!



No. It's called a priori drain at the expense of the spread. :-Р
 
WindSW:

How do I make them not reset?


output the variable declaration for the start function, for example

int n;/ if a variable is given a value in the code, it will remain that value until a new value is given

start

{

code....

}