[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 584

 
lottamer:


you won't believe it: i'm better at programming than anything else ! :))))))))))

so...can I stay here? :))) and continue to improve my skills ? :)))

...we have "rails" here, have a seat! if there's nothing else to do... :)))
 
lottamer:

sorry I don't understand...what does it meanto "turn on or off the "music" ?? in the code what does it look like ?

When "undecided about the sensations" it's to "touch, sniff, lick"...

... who says it will be easy?! ;)

 
rigonich:

It's easy to read and has examples for everything, but not everything you'd like to see. When I picked it up, I was also a dummie, but everything was clear to me.

lottamer:

I understand that I am "out of the loop"...I try to get into it...... but 1) if I was in the loop", I would not be asking questions here, and secondly, if you could explainin OTHERlanguage(not with formal quotes from the textbook that I have) , you would not be writing about Anderson's fairy tales here :)))))))


void,int,bool which are in a line before the function being initialized, indicate the type of variable, the value of which is returned by the function to the program for it to continue working with. void indicates that the function doesn't return any values (if the result of the function is, for example, to close or open orders, or change values of global variables that shouldn't be returned because they are "mixed").

As for theOTHERlanguage, there is an English version of the forum. If you don't use the names you like, they won't understand you.

 
lottamer:


you won't believe it: i'm better at programming than anything else ! :))))))))))

so...can I stay here? :))) and continue to improve my skills ? :)))


It would be interesting to know how you do 'everything else'?
 
lottamer:

I'm sorry, I don't understand...what does it meanto enable or not to enable "music" ??? in the code how does it look like?

Like this if (UseSound) PlaySound ("alert.wav"); break; Explanation UseSound is an external Boolean variable. If true -- play, false -- don't play.
 
Usual_Trader:


At a glance, what I see in the function of closing orders, you need to select the order by the ticketOrderSelect(Ticket, SELECT_BY_TICKET), the number of lots indicate not the variable Lts, because it is recalculated every time, but use OrderLots() And another thing, you keep working on the 0 bar, respectively, the criteria on one bar may disappear, your orders may not open where you would like. Replace bar 0 with 1 and 1 with 2 in the indicator parameters



Thanks a lot for the reply), but the criteria does not work as I would like it to do (not all crossings of stochastics show orders ( ) and I would like to open orders on 0 bar, but I guess I need an additional condition: after opening an order on the current bar I have to do nothing till the bar closes, but I have no idea how to do that (may be using time series arrays???) Please advise.
Attached files:
qccltotmvrgqnuccd.mq4(13.66 KB)
 

What does this saying mean in plain language?

"This function returns the opening price of the nearest position"

 
Equilibrium:
Usual_Trader:


At a glance, what I see in the function of closing orders, you need to select the order by the ticketOrderSelect(Ticket, SELECT_BY_TICKET), the number of lots indicate not the variable Lts, because it is recalculated every time, but use OrderLots() And another thing, you keep working on the 0 bar, respectively, the criteria on one bar may disappear, your orders may not open where you would like. Replace bar 0 with 1 and 1 with 2 in the indicator parameters



Thanks a lot for the answer), but the criteria again does not work as it should, on the screenshot you can see it (not all stochastic crossings work orders( ), and I would still like to work on 0 bar, but for this as I understand you need an additional condition: after opening an order on the current bar, do nothing until the bar closes, but how to implement this I do not know (maybe through time series arrays???) Can you please tell me
Attached files:
qccltotmvrgqnuccd.mq4(13.66 KB)

Declare a variable of datetime type, assign it the valueTime[0], after opening an order, then if it is not equal toTime[0, you can open the next order, if it is equal to -- Exit start. As for the criteria, I haven't looked at the code, but it seems that if it is a stochastic, it should trigger at crossing at overbought/oversold levels (usually >80 and <20%). For clarity, set the levels of 20 and 80 % in the stochastic settings.
 
qwanya:

What does this saying mean in plain language?

"This function returns the opening price of the nearest position"


It depends on which function. Either the last one opened, or the opening price which is closest to the current price. It just doesn't say which axis is closest, time or price. If this function is used in a mouse-operated trade management software, it is definitely on price.
 
rigonich:


This is not a function, but a way of comparing non-normalised numbers. they cannot be compared to each other, but the result of subtracting one from the other can be compared to zero.

And the test I have is this:


and this condition doesn't help...
Reason: