| New signals service! | |
|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack (2) | Thread Tools | Display Modes |
|
|||
|
What is an easy statement to check to see if 2 moving averages have crossed within 5 bars before the current bar?? Can anybody help me with this??
Dave -OR- How do you state 5 conditional statements?? If all 5 are acceptable, a buyvalue=1 is stated. I do not know if this would work below??: Can somebody comment on this as to whether it would work, if not, how should it be stated?? if(Condition1) if(Condition2) if(Condition3) if(Condiition4) if(Condition5) { buyvalue=1; } Dave Last edited by Dave137; 04-08-2008 at 05:06 AM. |
|
|||
|
PHP Code:
It's the fastest because if condition1 is not filled, condition 2, 3, ... are not evaluated, which is not the case if you put "&&" operator between them. So begin with the most likely unfrequent condition. So this will undoubtfully work. Now, as you are often asking if something will work, the best is to try, its a good way to learn too. Cheers. |
|
|||
|
Quote:
PHP Code:
|
|
|||
|
How do I...
Hi there,
Please can you show me if you will, how do I say:- "if the previous position closed on candle "0" or candle "1", then do not open another position on that same candle." or, even if candle "0" meets the required conditions to open another position... if the previous position closed on that candle then prevent it from opening another position, wait for the conditions to be right again. I can say it in english but I'm still a bit too new to mql4 it. thanks amatrader |
|
|||
|
Qestion for Coders
Hi
I wrote Alert but it only works when I open window with my indicator. It works only also when I jump beetwen charts windows, in other words when I jump between charts time levels. It seems that indicator can not count when whorks. How can I solve my problem ? Need help. Is it conected with Indicatorcounted ? Should I do something in parameter of Alert. How to do it ? Should I use something like: double ? = ObjectGetValueByShift(string name, int shift)); if (???????????) Alert("Pattern on " + Symbol() + " " + Period()); Pucio Last edited by Pucio; 04-16-2008 at 11:45 AM. |
|
|||
|
Silly Question..
Anyone? Trying to create what must be the simplest indy of all time and screwing up..
Input: Last Tic Value of (1)Pair X and (2) Pair Y. ( both CDF "pairs" ..ie 3 letter symbols)) Output 1: Print onscreen X-Y Output 2: Plot In Indicator window MA of X-Y.. .Dont ask...LoL |
|
||||
|
Quote:
__________________
|
![]() |
| Bookmarks |
| Tags |
| histogram |
| Thread Tools | |
| Display Modes | |
|
|
LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/questions/270-ask.html
|
||||
| Posted By | For | Type | Date | |
| OzFx System:) - Page 639 | This thread | Refback | 06-21-2008 09:53 PM | |
| Forex SRDC Sidus Sibkis EA MT4 Forum OTCSmart | This thread | Refback | 12-08-2007 11:46 AM | |