Indicator Question Statement
|
|||
|
If I want an indicator MA crossover where the sell signal is generated 5 pips after the crossover takes place, how do I state this in the logic statement that your program will accept. If MA(1) previous crosses MA(2) current - 5 pips then sell. Can you create 2 statements such as Statement 1) And MA(1) current < MA(2) previous. Statement 2) AND MA(1) current <=MA(2) previous -.0005??
Please help me on this basic question. This program is an answer to my prayers! I hope you can help me on this question. Sincerely, Dave Diebold ddiebold@sbcglobal.net 713-977-1892 |
![]() |
|
||||
|
In case you don't know how to setup crossover properly, you should watch the Video Walkthrough: Create a simple MACD Cross expert.
|
|
|||
|
Scorp,
is there a simple way to add a time function to a ma a cross? i had tried many variations on the code below, but i can not get it to work. seems like it should not be that hard. any ideas? // Check for BUY, SELL, and CLOSE signal IsBuying = (ma2_0 > ma3_0 >= (15)Minute); IsSelling = (ma2_0 < ma3_0 >= (15)Minute); the logic i am trying to code is to buy if ma 2 is greater than ma3 for 15 minutes or more. |
|
|||
|
Scorpion I phrased my program wrong. What I need is a crossover condition where a crossover takes place and then the ma averages (gap) grows apart from each other .0005 pips (Variable) (difference between one moving (2 Exp MA average) and the other (30 LWMA) within the last 3 (Variable) candles before a buy or sell signal takes place.
The program is not working right with a cross over + .0005 pips filter. I need the Moving average gap variable filter to signal a buy or sell. This should solve one of my biggest problems I am having so far. Could I ask that you rephrase that part of my program. I wish there was a school on coding this stuff. I asked you a question before on the phrasing to check to see if current price is lower (or higher) than the lowest low during 10 previous candles. Your answer was: PriceBid<Lowest(Mode_low,10,10) and no doubt Pricebid>Highest(Mode_high,10,10) Is this to be placed after: IsBuying=(ma2_1) etc. etc. and (ma2_0) etc. etc., Likewise IsSelling= . . . . . in my program?? I have attached the MQL File. Thanks Scorpion. You do not realize how frustrating it is not to be able to figure this programming stuff out on my own. Have you thought about writing a book on MQL for traders, by example?? If I get this program working right in the near future, tell me what you like to drink, and I will send you a bottle of it!!
Profitable Forex Systems
Automatically trade proven forex trading systems. Real trading records available! Last edited by Dave77 : 06-27-2005 at 02:40 PM. |
|
||||
|
Quote:
Buy logics: MA (1) Previous < MA (2) Previous + 0.0005 AND MA (1) Current > MA (2) Current + 0.0005 Sell logics: MA (1) Previous > MA (2) Previous - 0.0005 AND MA (1) Current < MA (2) Current - 0.0005 Quote:
Last edited by scorpion : 06-27-2005 at 03:52 PM. |
|
|||
|
Thank you kindly! Now I have got to backtest and trouble shoot the unique conditions that it does not cover. Step one in the right direction has been accomplished thanks to you and your compiler. Thanks Again!
![]() |
|
|||
|
Quote:
thanks |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Nested If statement - 3 Conditions | Dave77 | Tutorials, Tips & Tricks | 0 | 08-18-2006 07:55 AM |
| Help needed for MQLII audible Alarm statement | Dave77 | MetaTrader and ZeroCode | 3 | 08-31-2005 02:47 AM |
| RSI - MQL II Indicator Statement Problem | Dave77 | MetaTrader and ZeroCode | 2 | 07-16-2005 11:33 PM |
| Indicator Statement Question 2 | Dave77 | MetaTrader and ZeroCode | 1 | 06-19-2005 05:33 AM |
All times are GMT. The time now is 11:55 AM.
Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Registered members have access to special online forex currency trading tools, software, mt4 expert advisors and indicators. Register now












Linear Mode



