Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 110
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
Where in this function do you read the StopLoss of the last closed? There's nothing there.
Go to sleep, everyone! It's always better in the morning! It's 1:00 in the morning! Good night! And Artyom has already slept in!
I've been doing what you're doing for five days now, and I've already started thinking at night. Good night.
Hello. Why in the predefined variable "Point", are zeros not defined in the strategy tester log, at the end, round numbers?
Пример:
static double lBUY;
lBUY=100*Point; //Так-же можно написать 10,20,180 или 520.
if(lBUY==0.01)
{
Alert("НУЛИ НЕ ПИШУТСЯ В КОНЦЕ Point ",lBUY);
}
I'm a Siberian, yeah. Near Krasnoyarsk.
Sibiryak, so, almost, zamlYak)).
But I've been doing what you're doing for five days and I've already started thinking at night.
It's easier to say who doesn't think at night, if it's the other way around. I have the same situation. Besides, nobody bothers me at night at all. By the way, I read once that, like, the brain thinks better at night. It's like scientists found out...
Hello. Why in the predefined variable "Point", are zeros not defined in the strategy tester log, at the end, round numbers?
Пример:
static double lBUY;
lBUY=100*Point; //Так-же можно написать 10,20,180 или 520.
if(lBUY==0.01)
{
Alert("НУЛИ НЕ ПИШУТСЯ В КОНЦЕ Point ",lBUY);
}
And what does Alert actually output?
DoubleToStr(number,digit) is for you
Thank you very much! I needed it to compare candle characteristics (more, less, etc.) I screwed it on - it works. Only can not understand how it compares the data type string? Or double to string does not translate number to string? :-D
PS. It doesn't work in indicator - only in script... When I call High[i] - only 4 decimal places will appear.
I'm writing:
Alert ("doubletostr High = ", DoubleToStr(High[1],5));
if (DoubleToStr(High[2],5)>(DoubleToStr(High[3],5))
{
Alert ("More");
}
if (DoubleToStr(High[2],5)<(DoubleToStr(High[3],5))
{
Alert ("Smaller");
}
Works, it writes the result with five digits, over/under counts. The problem is that in the indicator the string array doesn't show up on the chart. Therefore...
...writing:
Alert ("Normalized Double High = ", NormalizeDouble(High[1],5));
Doesn't work - the result is > 1,1234
I do not understand the developers - why did they have to complicate things so much? Why if it shows so many digits on the chart, it won't scratch the called function with five digits? Maybe there is a simple solution?
I'm struggling with a function that should return True if the last market position was closed at a profit, and False if it was not closed at a loss. If this function returns True, then all positions (both pending and market ones) are closed.
Here's what came out:
Artyom above suggested where I had a bug. I rewrote it for me. It's not the final variant yet, but... it's already quite clear. After I ran the Expert Advisor, I noticed at once that remaining positions were not closed and are not being closed at all. I started digging out what was the reason. I have recommended a couple of functions and realized that it is in this block:
The comment is triggered all the time exactly:
I commented it out, drove on. Noticed that this comment:
Never triggers at all, even when there is a closed position last. What could be wrong?
My thoughts, although I may be wrong... Maybe you need to put this block
put it in the for loop as well? Otherwise, who knows in what direction the overflow will go. The j variable will contain the index number of the position and it's not explicitly specified in which direction the search will go.
I'm struggling with a function that should return True if the last market position was closed at a profit, and False if it was not closed at a loss. If this function returns True, then all positions (both pending and market ones) are closed.
Here's what came out:
Artyom above suggested where I had a bug. I rewrote it for me. It's not the final variant yet, but... it's already quite clear. After I ran the Expert Advisor, I noticed at once that remaining positions were not closed and are not being closed at all. I started digging out what was the reason. I recommended a couple of functions and realized that the reason is in this block:
The comment is triggered all the time exactly:
I commented it out, drove on. Noticed that this comment:
Never triggers at all, even when there is a closed position last. What could be wrong?
My thoughts, although I may be wrong... Maybe you need to put this block
put it in the for loop as well? Otherwise, who knows in what direction the overflow will go. The j variable will contain the index number of the position and it's not explicitly specified in which direction the search will go.