[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 18
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
hello!
I'm writing a ToR and I don't know how to make the conditions when the price crosses the line,
I have no idea how to do it,
I have settled on this one:
1. if openis below and close is above the line, count as crossing from bottom to top2. if open above and close below the line, count as crossed from upside down
3. open and close above the line and high above, low below the line are considered as crossed from upside down
4. open and closebelow the line andhigh above, low below the line are considered as crossed from bottom to top
Thank you in advance!
Maybe it would be enough for you to analyse where the previous bar was - under the line or over the line and where the bar is analysed?
i.e. if(High[2] < Y_line && Low[2] < Y_line) // bar number 2 was under the line
but it is better to write such condition if(High[2] < Y_line) - we know that High[2] is always greater than Low[2]
SZZ: From your drawings it is hard to suggest how the price moved, it always starts from open and will form a high and low, in what sequence we can only find out using the lower TF, the close analysis in this situation is meaningless, because the older the TF, the greater the number of times the price updated high and low. Remember how the price forms a new bar online?
Can you delete what and where? So that you don't delete something you need
I see you haven't been helped... Let's try:
0. Close the terminal if it's open.
Look for the history file here: C:\Program Files\MT4\history\... (instead of MT4 - your broker's name)
2. Here you will most likely have several folders (demo and real account history), choose the account folder and look for the file "GBPUSD15.hst".
3. Delete it (or copy it to a separate place) and start the terminal.
Update history (F5)
Maybe it would be enough for you to analyse where the previous bar was - under the line or over the line and where the bar is analysed?
i.e. if(High[2] < Y_line && Low[2] < Y_line) // bar number 2 was under the line
but it is better to write such condition if(High[2] < Y_line) - we know that High[2] is always greater than Low[2]
SZZ: From your drawings it is hard to suggest how the price moved, it always starts from open and will form a high and low, in what sequence we can only find out using the lower TF, the close analysis in this situation is meaningless, because the older the TF, the greater the number of times the price updated high and low. Remember how the price forms a new bar online?
thank you!
is there anything else besides bars to analyze this situation
hello!
I'm writing a ToR and I don't know how to make the conditions when the price crosses the line,
I have no idea how to do it,
I have settled on this one:
1. if openis below and close is above the line, count as crossing from bottom to top2. open above and close below the line are considered as crossed from upside down
3. open and close above the line and high above, low below the line are considered as crossed from upside down
4. open and closebelow the line andhigh above, low below the line are considered as crossed from bottom to top
Thank you in advance!
Gentlemen pros. Question.
What happens to the data in the EA when reconnecting.
I.e. there is a variable declared at the beginning, say a=0, in the process of work it will be assigned value 4. and reconnect to the server will happen. what will happen to it with this a ?
Gentlemen pros. Question.
What happens to the data in the EA when reconnecting.
I.e. there is a variable declared at the beginning, say a=0, in the process of work it will be assigned value 4. and reconnect to the server will happen. what will happen to it with this a ?
Nothing will change with the variable a and its value, and if, for example, an order has been allocated, the allocation is cancelled.
i.e., the values of the variables are saved and the EA starts working after the start function? and not from the very beginning? until the log file shows that the EA is loaded?
Below is an outline of how I do it in my programs. What's wrong?