[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 20
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
Ugh, not Smoothness, but Slowdown. Here's ten:
Here's a look at how textbook stochastic counts.
Chiripaha:
The text is bound to the line price + 3*Point (i.e. I put it slightly higher), but still, when I change the size of the chart (window) the text is now above the line, now below, now at the level of the line (it jumps)... Why does this happen? - I'm kind of giving the exact price coordinate. How is it solved?
I've looked and tried how others do it, but the effect is similar. I want to understand how this "bounce" gets rid of. And most importantly, why it appears if the coordinates are hard: price and time?
TarasBY:
Text is entered in the object description and the chart is allowed to show object descriptions (one of the ways).How to implement this programmatically? I've searched and poked around and couldn't find it. By hand it works, but what kind of commands should be....
The font_size, font_name and text_color parameters are only used for OBJ_TEXT and OBJ_LABEL objects. For other object types, these parameters are ignored.
See also ObjectDescription().
Woohoo... DESCRIPTION... : )))) I've been looking for where it's done.... Thanks a lot! : )))
Woohoo... DESCRIPTION... : )))) I've been wondering where it's done.... Thank you so much! : )))
ObjectDescription() only returns a property (in this case a description), BUT does not set it!!!
ObjectDescription() only returns a property (in this case a description), BUT does not set it!!!
Yes... Here, I've just worked that out... How do you install it? : ((
It's reflected there manually if you set it through the properties window.
Yes... Here, I've just worked that out... How do you install it? : ((
It's there manually if you set it in the properties window.
And who am I answering to? - https://forum.mql4.com/ru/52892/page20#732354
: ))))))) Yay! I figured it out... - Now I've experimented with it after the bashing. I didn't know you could do that... : )) I looked at how others do it and did it by analogy. And it turns out, this function "..SetText" is independent. I thought it would only work after the text object was created.
Thanks a lot again! : ))) Still learnt something. : ))
Print out the state of the flags separately for each condition. This is because the conditions do not take into account the state of the second flag.
P.S. And it is more convenient to printPrint("flag=",flag, "flagg=",flagg) to avoid confusion;
print("flag=",flag, "flagg=",flagg);
prints flag=1 flagg=0 AS ORDER!
but somehow the signal passes EVERY TICK!
i.e. condition if(Ma_1<Ma_2 && flag==0) flag is ignored FULL! how come? flag prints flag=1 and immediately passes if(Ma_1<Ma_2 && flag==0) ->Sound
-----------------
you can simplify this code to the following
if(Ma_1<Ma_2 && flag==0) {PlaySound("ok.wav"); flag=1 }
as a result the sound should go ONE time. And it beeps at every tick!!!
printed Print("flag=",flag, "flagg=",flagg);
prints flag=1 flagg=0 AS ORDERED!
but somehow the signal passes EVERY TICK!
i.e. condition if(Ma_1<Ma_2 && flag==0) flag is ignored FULL! how come? flag prints flag=1 and immediately passes if(Ma_1<Ma_2 && flag==0) ->Sound
-----------------
you can simplify this code to the following
if(Ma_1<Ma_2 && flag==0) {PlaySound("ok.wav"); flag=1 }
as a result the sound should go ONE time. And it beeps at every tick!!!
P.S. When it's not quite clear what's going on, it's better to print out the values before and after the function or operator you want to check, to see how exactly they change. Sometimes input values are not what we expect them to be, and finding where and why they become what they are is much easier in code than guessing why the program doesn't work correctly.Do you have flag as a local variable?