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

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
Anyway, I need help with writing a function to close orders for my TS (point 3) and adapting existing code to the function.
See here. ;)
But there is a point. There, in any case, one change in the expression output will not solve the problem. After all, at the point where zeroing occurs, the opening and closing prices have to be "swapped out".
You seem to be mistaken. After all, +(a-b)=a-b, -(a-b)=-a-(-b)=-a+b=b-a. With a change of sign they do change places.
Vadim wrote some time ago that putting a function inside the loop slows down code execution by an order of magnitude.
As far as I understood Vadim, he meant the call of a user function in a loop.
Maybe you should open your own branch. Why do you need "A branch for newbies"?
I made thecntUp andcntDn counters different, because it may have one value at once and then another when calculation is done through the loop by calculated bars. And the counter can sum up one value and continue summing up another one. And if there is one variable, the number of bars of one attribute will be added to the counter of bars of another attribute.
The counter is different there. If the candlestick goes in the opposite direction, the counter is reset by the formula. Or maybe I did not understand you. The only thing is that it may work slower. I'll test it when I get around to it.
Now, why do I need to take the last weight if I can simply wrap the power function if the next weight is more important than the previous one? I'm not even asking anymore why use recursion when the final weights after recursion can be derived by a formula (see F(n,x) and y(n,x)).
Go ahead and start a thread like "EMA Questions" and attach a Matcad file. Your post will just get lost here. In a separate thread, the math gurus should be able to break it down.
You probably mean the answer to the question will get lost. Okay, I'll open a thread, edit that post, I'll write moved.
Watch this. ;)
Hmm, thanks. Are these results from optimisation?
You seem to be mistaken. Because +(a-b)=a-b, -(a-b)=-a-(-b)=-a+b=b-a. With a change of sign, they do change places.
So from mathematics we know that minus to minus gives plus. And Plus to minus gives minus. But this is the first time I've heard of variables swapping places.
As far as I understood Vadim, he meant call of user function in the loop.
I have a user function there. Here is the initial function itself in its unshortened form since it does not work as I want it to for now, so I decided not to make it universal:
Inside the loop, from a function that receives a common signal, this variable gets its value and is passed by parameter:
int directionMA = GetStateOfMA();
Well yes, why would newbies need to understand the anatomy and periods of a waving machine))) I am no different from beginners, maybe only because I am illiterate, so I am trying to get to everything with my brain.
You are wrong. In fact, there is no question of illiteracy. You have such thoughts here that many newbies don't understand...
There's a different counter there. If the candle goes the other way, the formula resets the counter. Or am I misunderstanding you. The only thing is that it might work slower. I'll test it when I get a chance.
Yes. But we have a counter where the values are calculated by the order of bars appearing from the bar with indexi_AnyBarsToHistory to the bar with index 1. It follows that if the condition will be fulfilled on the bars from index 30 to index 15:
and then for example at cnt=2 the condition will be fulfilled:
Then cnt will be incremented to the previous value. If we had 2, the new condition will increment with 1, then cnt=3 and we will exit the function with value 3. Do you see what I mean? Look closely, the logic is basically obvious here.
Good afternoon.
Does anyone have any experience of changing indicator parameters in an EA
depending on volatility (e.g. MA parameters) ?
Or can you give me a link to read
Good afternoon.
Does anyone have any experience of changing indicator parameters in an EA
depending on volatility (e.g. MA parameters) ?
Or can you give me a link to read
If you understand what a muving is, such questions will disappear on their own.
If you understand what muving is, such questions disappear on their own.
Adaptive MA