Hello everyone, I'll post a little program that I've done:
The program should report me 2 of the stochastic crosses that occur sussessivamente inclusion of 'AE in the graph instead of as soon as I insert the graphic print "DrawAllert (" cross 2 Time = "+ TimeToStr (curtime (), TIME_DATE) +" "+ TimeHour (curtime ()) + ":" + TimeMinute (curtime ()), 15,15, Green); "Updating the time every 2 or 3 min? there is something wrong but I can not figure out what help me?
Then I tried to get me to print the values of "mainnow = iStochastic (NULL, 1, KPeriod1, DPeriod1, Slowing1, Mame thod1, PriceField1, 0, j);
signalnow = iStochastic (NULL, 0, KPeriod1, DPeriod1, Slowing1, Mame thod1, PriceField1, 1, j), "but if I do I print vaalori and compare them with the values of the Mt4 stochastic oscillator are not the same and I always wondered why, know how to give me an explanation?
I thank you in advance
Hi texcs:,
The way you constructed the indicator has flaws and the code posted has small errors . In the conditions line , at the end you have an extra parenthesis .
if( NewBar() && (mainnow>signalnow) && (mainprevious<signalprevious) && (mainnow>signalnow))) //here
Then , you need to check if the object already exists before you try to create it , else you get error trying to create an object that already is there .
Next, you really want to create both objects at the same time ?
Is what you want to have a label to tell you when was the most recent cross was and a second one to tell you when the previous one was ?
Are you looking for two crosses in the same direction?
Also you have condition 1 : (mainnow>signalnow) same as condition 3 :(mainnow>signalnow).
I think I have an idea but I'm not sure if I'm right about what you want.
Maybe you can try to explain a bit better.
Cheers
I have corrected as follows:
if( NewBar() && (mainprevious<signalprevious) && (mainnow>signalnow))//&&(signalnow<21)&& (mainnow<21)) { DrawAllert("incrocio Time = "+ TimeToStr(CurTime(),TIME_DATE)+" " + TimeHour(CurTime())+":"+ TimeMinute(CurTime()),10,10,Green); DrawAllert("incrocio 2 Time = "+ TimeToStr(CurTime(),TIME_DATE)+" " + TimeHour(CurTime())+":"+ TimeMinute(CurTime()),15,15,Green); }
I have corrected as follows:
Sorry buddy, still not clear about what you want.
I understand that you want 2 crossings. Do the crossing have to be the same direction or not?
After you start the EA is clear, you only want new crossings, but are you looking for one direction only?
I'm asking because you only have one set of conditions
if( NewBar() && (mainprevious<signalprevious) && (mainnow>signalnow))//&&(signalnow<21)&& (mainnow<21))
Clarify that and I'll let you know how I'd do it.
Is it anything like the picture attached?
At the end of the program I must advise of the following:
1) crossing the stochastic lower between 0 and 20
2) re-opening of the 2 lines upward
3) crossing the stochastic higher between 80 and 100
4) re-opening of the 2 lines do
Sorry buddy, still not clear about what you want.
I understand that you want 2 crossings. Do the crossing have to be the same direction or not?
After you start the EA is clear, you only want new crossings, but are you looking for one direction only?
I'm asking because you only have one set of conditions
Clarify that and I'll let you know how I'd do it.
Is it anything like the picture attached?
Let's recap all, the program must show me only the last crossing
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello everyone, I'll post a little program that I've done:
The program should report me 2 of the stochastic crosses that occur sussessivamente inclusion of 'AE in the graph instead of as soon as I insert the graphic print "DrawAllert (" cross 2 Time = "+ TimeToStr (curtime (), TIME_DATE) +" "+ TimeHour (curtime ()) + ":" + TimeMinute (curtime ()), 15,15, Green); "Updating the time every 2 or 3 min? there is something wrong but I can not figure out what help me?
Then I tried to get me to print the values of "mainnow = iStochastic (NULL, 1, KPeriod1, DPeriod1, Slowing1, Mame thod1, PriceField1, 0, j);
signalnow = iStochastic (NULL, 0, KPeriod1, DPeriod1, Slowing1, Mame thod1, PriceField1, 1, j), "but if I do I print vaalori and compare them with the values of the Mt4 stochastic oscillator are not the same and I always wondered why, know how to give me an explanation?
I thank you in advance