[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 715
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
This is how it works for me. A position is closed by TP, while to set a new pending order we need TP+n*Point value. And here we get a discrepancy: OrderTakeProfit () gives me four digits (I see it in Alert) and my brokerage company wants five. I have tried many things, but it seems there is more to come. If you have any idea, please give me some ideas. Thanks in advance!
This is how it works for me. The position is closed by TP, while a new pending order needs the value of TP+n*Point to be set. Here we get a discrepancy: OrderTakeProfit () gives me four digits (I see it in Alert) and my brokerage company wants five. I have tried many things, but it seems there is more to come. If you have any idea, please give me some ideas. Thanks in advance!
Converts a numeric value to a text string containing the character representation of the number in the specified precision format.
This should help for preverification.
It's just that both Alert() and Print() output values to 4 digits. So your problem is different.
I can't understand why in this form
It says that the variable has already been defined. I think it gets 0 again in the repetition? And they are in different pieces of code, the first in if, the second in else...
I can't understand why in this form
It says that the variable has already been defined, so why does it get 0 again in the repetition? And they are in different pieces of code, the first in if, the second in else...
So why define the same variable twice
Why define the same variable twice
To reread
I.e., if the condition is one, read, if another... shit. Got it. But it's a specific case, I don't need this fragment in else.
I don't know how to null the a variable so that it can be used in another code fragment. If the condition is one, we call one indicator and if another one - another... ...because there's not enough variables...
To reread
I.e., if the condition is one, read, if another... shit. Got it. But it's a specific case, I don't need this fragment in else.
I don't know how to null the a variable so that it can be used in another code fragment. If the condition is one, we call one indicator and if another one - another... ...because there's not enough variables...
Nah, we've got to figure it out somehow. There just doesn't seem to be enough code. I was only talking about one thing. Declare a variable and use (with pre-initialization) are different things. One and the same variable can carry very different functional values, the main thing is not to mix up what and where.
Let me try to elaborate. There is an indicator, without buffers. It takes values of another indicator in 4 arrays. I'm trying to attach
If there is a new bar, all arrays are recalculated. If there is no new bar, only the 0-th one. But we recalculate all the same, i.e. we call both if and else.Let me try to elaborate. There is an indicator, without buffers. It takes values of another indicator in 4 arrays. I'm trying to attach it.
If there is a new bar, we recalculate all arrays. If there is no bar, we recalculate only the 0-th. But we recalculate all the same, i.e. we call both if and else.I prefer a different approach
Although, it's a matter of taste. But at least I can explain each line
I prefer a different approach
It's a matter of taste, though. But at least I can explain every line
Let's put it like this. Then if limit = 0, if we write array 0, 1, 2, else - array 0. And a variable error.
Or should we write an array of 1, 2, else - array 0?
Either way, - I can't use the a variable 2 times, that's the problem. I only use it 2 times, though, in if and else. It's not even in shared variables at the top of the code.
Let it be like this. Then if limit = 0, if we write array 0, 1, 2, else - array 0. And a variable error.
Or if we write array 1, 2, else - array 0?
Either way, - I can't use the a variable 2 times, that's the problem. I only use it 2 times, though, in if and else. It's not even in shared variables at the top of the code.
Give me the whole code. You can send it to me in person. I'll try to help.