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

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
pro! there is a problem with the line on the angle.
I built aTRENDBYANGLE using coordinates.
- I need an angle.
help says that the line created by the program - the angle of ZERO is ok.
I ran the same code again at the same coordinates without touching the line - it appears the correct number of degrees, not zero. why, how can I do it right the first time?
or i gave one coordinate - i ask for angle - it says 0. then i give another one - it says angle of the previous coordinates. nonsense
I moved this comment to the beginning because no one has answered, but I really need it =/
Is it possible to implement this:if I press any key, one part of the indicator code is turned on (responsible for creating an object with a mouse click), then if an event occurs (the second part of the code, the event may be, creating the same object for example), then the first part of the code is disabled (and if not do this, the object is created by each click), and also runs when you press the key, and so on around the circle)
You can. Add OnChartEvent block. In it, keep track of the necessary presses, measurements and describe the reaction to them, according to your idea.
I can't implement disabling part of the code for the period before the keystroke =/ There is an easier way, but there is one problem:i needs toreturn its value to the beginning of the first if statement when the key is pressed.
This code will only execute if the mouse is clicked, with 3 lines of code checking for a keystroke event. And these 3 lines of code are executed in a few milliseconds, and even if id during the current call OnChartEvent is able to change, the chance that during the time, execution of 3 lines of code, the key will be pressed = 0%. Obviously, it's pointless to check id, inside a block that is triggered at a certain id value, and wait there for a different value. First, check the key press, in a separate block, save in a variable the number of the key or just the fact of pressing the desired key. And with this variable, enable or disable the piece of code located in the block for mouse click.
Thank you very much!) This is the line I was looking for if (id==CHARTEVENT_CLICK && key == 'D'), could not connect two events, this did not work if (id==CHARTEVENT_CLICK & id==CHARTEVENT_KEYDOWN) Thanks a lot again)
Hello, I have a function that calculates the average size of a candle from the last n candles. sometimes it outputs the following values: "5e-05.0". i don't need them, to my shame i don't know how much they are and how to cut them off. NormalizeDouble() does not help. please tell me how to calculate such numbers programmatically to cut them off
Hello, I have a function that calculates the average size of a candle from the last n candles. sometimes it outputs the following values: "5e-05.0". i don't need them, to my shame i don't know quantitatively how many and how to cut them off. NormalizeDouble() does not help. please tell me how to calculate such numbers programmatically to cut them off
What to cut off, then:
Such small candles, 5 pips, only at low latitude, in a 5-digit account, on low timeframes may occur. If you do not deal with scalping, but the average is sometimes so small for n candles, then the implementation of the function should be suspicious.