[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 231

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
I am copying it correctly into the indicator folder7
There is the following situation:
I have shown a piece of code where there is a misunderstanding. All variables are declared global. In theIsObjectFound() function I get the values of the first and second price point of the object, the name, and the price value of the object on the current bar. If the object is found it should exit the function in true mode , otherwise infalse .
The function continues to execute the start function. What is this?
Never be greedy with debug output if something works wrong and try to check for more errors. Example of a working script:
Never be greedy with debug output if something works wrong and try to check for more errors. Example of a working script:
Igor, thanks for the valuable comment. You are right! I haven't worked with objects before, now I'm getting the hang of it. I've been thinking about which side to approach it from.
You have misunderstood. I don't want to change the value of my balance on the terminal, although it would indeed be nice:)
I need to change my lot size depending on the result of a previous trade (profit or loss). And how to prescribe change of deposit (incurred a loss or gained a profit) I don't know.
The trade result can be controlled in 2 ways (maybe there are others, I like them):
1) To remember the previous value of the deposit and compare it with the current one (AccountBalance()). But this method will need to involve the global variables of the terminal for the variable not to lose its value at reboot of the EA or terminal (or write it into a file);
2) And you can check the result of a previous trade from the history (look for the function in Kim's thread).
I am copying it correctly to the indicator folder7
The correct folder is experts/indicators. Just in case, check its presence in the folder after writing.
If it is there, it will definitely appear after compiling any code in the editor.
GaNDarM
(функцию поищите в ветке у Кима).
There are 2 ways to control trade result (there may be others, these ones suit me):
1) To remember the previous value of the deposit and compare it with the current one (AccountBalance()). But this method must involve global variables of the terminal for the variable not to lose its value when restarting the EA or the terminal (or write it in a file);
2) And you can check the result of a previous trade from the history (look for the function in Kim's thread).
Thank you, I will search
Why are the variables assigned zero in INIT()? What is the error or how to assign the buy and sell prices to variables outside of the start() function? I tried putting RefreshRates(); in front of them, but no change :(
Greetings!
Explain how to programmatically get the value of the number of bars from last week's low to the beginning of the current week.