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

 
solnce600:

I would be very grateful if you could explain "on your fingers" in relation to my example.

Where my logic is faulty. I don't understand what we're talking about.

Thank you.



First, place the curly braces to highlight the blocks. Otherwise there is a condition, then a series of operators. You think they are only executed when the condition is met, the first function is yes. And the others always do.
 
ALXIMIKS:
And why touch the order history? Look at the balance - where it goes in that direction and change the lot.
You mean the history in the function body

isCloseLastPosByStop()

 
solnce600:
You mean the history in the body of the function

isCloseLastPosByStop()




I've already understood the fallacy of my thoughts. To be more exact, they are limited.
 
Vinin:

First, place the curly braces to highlight the blocks. Otherwise there is a condition, then a series of operators. You think they are only executed when the condition is met, the first function is yes. And the others always do.
Do I understand correctly that these tips refer to the body of the program, but not to the body of the isCloseLastPosByStop function?
 
solnce600:
Am I correct in assuming that this advice applies to the body of the program, but not to the body of the isCloseLastPosByStop function?


Exactly right. To the start() function
 
ALXIMIKS:

I have already realised the fallacy of my thinking. More precisely, their limitations.
It is good to know that I have like-minded people.
 
Vinin:

Quite right. To the start() function.

Thank you for your help. I will go get some oxygen, and then I will decipher your advice.

Maybe you can give me some more specific advice, or fix one fragment of my code.

Then it will stick in my brain and I won't make the same mistakes again.

Thank you.

 

You have been told that it is wrong to compare types of doubles.

&&(Bid==Price) //WHERE the price equals the opening price of the next candle.


We should somehow change the history search in the future, otherwise you will have 1000 orders and we will have to search every time ?

 

Question: What is the last closed order in the order history when OrderSelect is selected?

1) Zero "0";

2) The last "OrderHystoryTotal -1 "

3) Random

4) Depends on when the order was opened (which is closer to 1 or 2 then?)

 
solnce600:

Thanks for your help. I'll go get some oxygen, and then I'll decipher your advice.

Maybe you can give me some more specific advice, or fix one fragment of my code.

Then it will stick in my brain and I will not make the same mistakes.

Thank you. (chuckles)



To fix any part, you have to write a ToR, are you ready for that?