kenned45900:
- I need some help to create a simple Array(I guess thats what I need).
- I would also like to get the time from the previous signal.
Play videoPlease edit your post.
For large amounts of code, attach it.
- Don't guess - think. Why do you need an array when you only want two values.
static datetime crossLast, crossPrev; if(isCross){ crossPrev = crossLast; crossLast = TimeCurrent(); }
Thanx, bur I useed a bad example since I can use iMAOnArray to get the time from previous crosses. Its not a MA cross but like in this example. When I get a buy signal i get TimeCurrent () for current signal. How can I get the time from the previous signal? I guess I need an array?
if(BuySignal == 1) { TimeOfSignal = TimeCurrent(); }
Asked and answerer.
What's the difference?
You Posted | if(BuySignal == 1){ TimeOfSignal = TimeCurrent(); } |
I Posted. | static datetime crossLast, crossPrev; if(isCross){ crossPrev = crossLast; crossLast = TimeCurrent(); } |
WHRoeder:
Asked and answerer.
What's the difference?
Asked and answerer.
You Posted | |
I Posted. |
Thanx again:-) It works but what if i want TimeCurrent() for the third or fourth signal?
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
Hello,
I need some help to create a simple Array(I guess thats what I need). When I get a signal I have stored the time of the signal like this:
datetime TimeofCross;
TimeOfCross = TimeCurrent();
I get the time of the current signal but I would also like to get the time from the previous signal. How could I do that?
Regards
Kenneth