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

 
artmedia70:

There's no way he's using it. I'm still waiting for it to come to him...


He's not needed there. And you shouldn't have sent him to Kim.
 
Vinin:

Doesn't he need to be there. And you shouldn't have sent him to Kim.
I don't get it... It had a Kim function originally. I just made a similar one, but without the frills. I didn't send him anywhere...
 
st.martius:
I want to write an EA on candlestick analysis, when compiling (Open[ bar+1]<Close[ bar+1] writes an error on bar. So how do I specify to analyze the previous bar? Or is this correct?


if( Open[1] < Close[1] )
 
If you mean magik, yes, you do. The function checks for closing on stop. It opens positions with magic number 123, but checks for closing on stop with magic number 0. That's why the function always returns false.
 
r772ra:

if( Open[1] < Close[1] )
What if the previous one is in the variable bar ? Nah... to telepaths... unequivocally. My chakras close after 8:48pm
 

Hello all. Can you please tell me what the problem may be, I've started to test the Expert Advisor by preloading the quotes archive and it's not correct with interruptions:

Quotes

I press update it becomes normal, but when you turn on the test are these errors:

Errors

If you do not update the test is normal but with wrong quotes. I tried to put other quotes the same thing, I do not understand what's wrong. Please advise me if I know what may be the problem. I have no idea what is wrong.

 
Vinin:

Doesn't he need it there. And you shouldn't have sent him to Kim.

It occurred to me to use the Kim function myself.

After all, it returns the flag to close the last position on the stop.

And then I got stuck with the fact that I still don't understand how to calculate and remember

The volume of the last order closed at stop.

And the more I'm prompted the more I'm confused how it can be done.

I would be grateful to you if you could point me in the right direction.

I would be even more grateful if you could codify my simple idea.

It costs you nothing as a professional.

If I do it with the help of contradictory hints, I may break my head.

Thank you.

 

Gentlemen professionals.... I am confused

TarasBY andartmedia70 say that my error is related to the value of the variable storing the magic number of the order


Vinin saysit's not about magic number but about wrong logic......... artmedia70 argues with him

.

If professionals do not have a consensus on my problem, what should I do as a beginner to solve my problem ?

 
solnce600:

Gentlemen professionals.... I'm confused.

TarasBY andartmedia70 say that my error is related to the value of the variable storing the magic number of the order


Vinin saysit's not about magic number but about wrong logic......... artmedia70 argues with him

.

If professionals do not have a consensus on my problem, what should I do as a newbie to solve my problem ?


Definitely with faulty logic. For a start, translate the highlighted fragment of your post into Russian.

Then remove sequences of conditional operators from your code. Well, then you'll get to the magician and life will get better.

 
Vinin:

We should fix the logic completely.

I'm sorry, but I'm not sure what you mean by my logic when you say it needs fixing.

What's illogical about my idea

- if the order is closed at stop

-The next after this order to open an order with a volume equal to the volume of the last order which closed at the stop multiplied by 2(3,4...)

- if the order is closed for a reason other than a stop.

the next order to open a regular volume, for example 0.1 lot.

Reason: