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

 
hoz:

Why might there be no external parameters tab?
because there is a #property library in one of the files
remove it and it's external.
 
Yugin:

Hello! This is my first day of using Meta Trader 4 and I already have a lot of questions.

1) When I watched the training video on the global fots website, it tells me about the simplest trades. But it says that while I buy, stop loss should be lower than the left one and take profit higher. So, we predict what value the price will reach and the order will close on take profit. And if the value will fall, so as not to be in -, i.e. to lose money we limit its stop loss. Let's assume the following: Price 1.3552/1.3555, stop loss 1.3522, take profit 1.3612. Now the direct question: Is it possible to make a stop loss of 0.0000? After all, the probability is very low that the value will reach such a minimum and we can just wait till the value jumps and finally reaches our take profit and anyway find ourselves in the + side without any predictions. P.S. I apologise if this is a very silly question. Again, first day using it, but it seems to me like some kind of cheese in a mousetrap.

2) My second point of interest is that when the chart goes up we buy, when it goes down we sell. How do you make profit when the chart has 1.3500 and we set everything to sell and eventually wait for even lower values, say 1.3400? I just do not understand, it is the same as buying milk for 50 rubles to sell it for 40.

P.S. I thank you in advance. Do not judge severely)).

1) You can, if the stop loss = 0, it means there is no stop loss at all. But then there is a risk of losing the entire deposit at once, under unfortunate circumstances. And what will jump, jump and reach takeprofit - that's what granny said))). More likely uncle Kolya (margincall) will come and leave you without a starting deposit.

2) On the contrary. You sell milk for 50, wait, buy milk for 40. As a result, you have milk plus ten roubles in cash)

 
<br/ translate="no">

2)On the contrary. You sell the milk for 50, wait, buy the milk for 40. As a result, you have the milk plus ten roubles in cash)

This example may not be entirely clear. It's better like this. You borrow a carton of milk and sell it at the current price which is 50 roubles. And after a while, the milk got cheaper and you bought it for 40 roubles. You repaid the debt - the milk carton. You have 10 rubles left in your pocket.

ps. To my question, who knows the answer? - In mt there is a tool - a linear regression channel, by constructing and referring to it I can get the start and end dates and prices. How do I access the boundaries of this channel ?

I don't want to organize the calculation of the linear regression in my robot, when there is a tool available.

 
Desead:

This example may not be very clear. A better way is this. You borrowed a carton of milk and sold it at the current price, which is 50 roubles. After a while, the milk got cheaper and you bought it for 40 roubles. You repaid the debt - the milk carton. You have 10 rubles left in your pocket.

ps. To my question, who knows the answer? - In mt there is a tool - a linear regression channel, by constructing and referring to it I can get the start and end dates and prices. How do I access the boundaries of this channel ?

I just don't want to organize the calculation of the linear regression in the robot myself when there is a ready-made tool.


It might help, about linear regression....
 
sergeev:
because there is a #property library in one of the files
remove it and it's external.
Wow. Thank you. Here's one strange thing. Why is this attribute added when creating a header file if it doesn't come out needed?
 
hoz:
if it doesn't go out?
you need it if you don't want to see warnings about a missing start
 
sergeev:
you need it if you don't want to see warnings about a missing start


So header files are not compiled, unlike libraries, so there can't be any warnings. After all, the format is mqh. You can save it anyway.

Here's what I'm wondering.

 
hoz:


So header files are not compiled, unlike libraries, so there can't be any warnings. After all, the format is mqh. You can save it that way...

Here's what I'm wondering.


What does the file format have to do with it? The question is whether or not #property library is present, and it is definitely present in one of the included files.
 
Vinin:

What does the file format have to do with it? The question is whether or not #property library is present, and it is definitely present in one of the included files.

So I removed the #property library , but there was no warning, and the start function is not there either...
 

Hello.

There is a function NewBar(sy, TF). It looks if a new bar has opened. I need to get a signal on the hourly chart about the appearance of a new bar with a lag of 5 min. I want to get the signal at 0.05, 1.05, 2.05, ..........., 10.05, 11.05, etc.


How can this be done ? Maybe the function itself can be redesigned in some way ?

Reason: