| 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 (1) | Thread Tools | Display Modes |
|
|||
|
Help : Scanner
Hi all,
who helps me? I have a question: I have created this scanner that plays at the end of the formation doji, but it also plays the same alarm in the following candle. Who tells me where it is wrong? I would want that it played an only time at the end of the doji and enough, without repeating. I thank who helps me. Antonio (Italy) #property indicator_separate_window string ver="SCANNER DOJI "; //---- input parameters extern bool UseAlert = 1;//***** // -----------DICHIARAZIONE VARIABILI GENERICHE-------------------------- double alertBar;//***** bool alertdoji=False; bool flgrs; string nome_fin; //nome finestra //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- nome_fin=StringConcatenate(" (",ver,")"); IndicatorShortName(nome_fin);//nome separate window //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars=IndicatorCounted(); //################################### // ---------------------------- if ( Close[1] == Open[1]&& //DOJI flgrs==0) { alertdoji = 1; flgrs=1; } else { flgrs=0; } //*****************ALERT**************** if (UseAlert==1 && Bars>alertBar && alertdoji==1) { Alert(Symbol(), " DOJI " ); alertBar=Bars; alertdoji=0; } return(0); } //+------------------------------------------------------------------+ Last edited by newdigital; 06-16-2008 at 05:40 AM. |
|
|||
|
MathCos
Hi,
I am currently coding up in indicator which uses the MathCos function in MQL. The problem is that it seems to be returning an incorrect value. For example, PHP Code:
Is this a known bug? My indicator can't be written unless this function works correctly so I hope there is a solution! Thanks |
|
||||
|
...
Metatrader takes arguments for trigonometric functions in radians
You should do something like this : PHP Code:
Quote:
|
|
|||
|
Line colour
Hi again
![]() I am creating an indicator which draws a line across the chart (in a similar way to a moving average does). The line is plotted with values taken from a buffer. I'd like the line to be drawn green if the value on the current bar is higher than the value on the previous bar, and red if it is lower. How can I do this? Thanks in advance for any help. |
![]() |
| Bookmarks |
| Tags |
| CHinGsMAroonCLK, I_XO_A_H |
| Thread Tools | |
| Display Modes | |
|
|
LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/metatrader-programming/554-how-code.html
|
||||
| Posted By | For | Type | Date | |
| Need an experienced programmer? - Page 2 | Post #0 | Refback | 09-24-2008 06:24 AM | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to code this? | iscuba11 | Metatrader 4 mql 4 - Development course | 1 | 08-03-2007 04:22 PM |