| 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 |
|
|||
|
Hello,
I would like please Kalenzo or another good programmer to help me with this modification please. My level of knowledge of mql language is basic because I'm just beginning to learn and I need to add a sound alert and popup to an indicator and I still don't find the correct code to do so. The indicator that I want to modify is the i_trend.mq4, I need to add a sound alert and popup so as when the red line touches the level 0.0002 it shows a SHORT alert and when the green line touches the level 0.0002 it shows a BUY alert. I would need it to send the alerts only when the lines go UPWARDS because if they touch that level when going down it wouldn't be useful. I took as an example the code of another indicator that shows sound alerts and popup but I can't make this same thing for the i_trend, the sample indicator is the "PerkyAsctrend1.mq4" I an enclosing both indicators to this post as a reference. I will be very grateful to whoever helps me to add those modifications, thank you very much in advance. The section of the code in the PerkyAsctrend where the "alert" is written is the following: if (val2!=0 && up==0 ) { val1buffer[i]= val2-1*Point; up=1; dn=0; if(shift<=2) { Alert (Symbol()," ",Period(),"M Asctrend BUY "); } } if (val1 !=0 && dn==0) { val2buffer[i]= val1+1*Point; dn=1; up=0; if(shift<=2) { Alert (Symbol()," ",Period(),"M Asctrend SELL "); } } How can I implement this same thing for the i_trend? with the conditions that I specified above. Thanks again! Last edited by under_snk; 08-29-2006 at 06:12 AM. |
|
|||
|
Basic Programing
Hello,
I have read through you tutorials and see that you have spent a lot of time and effort into creating them!! But as I am just learning and new to programming I got lost very early on. I am looking into some basic programming classes at a local technical school...I am just wondering if MQL4 is written on the base of another programming language? Or better yet if I had to learn one of the really common programming languages that would make MQL4 easiest, which would it be? Thank You!! |
|
|||
|
EA problem
I created a simple EA by change MACD Sample EA that is placed at MT4 platform.
The created EA I put in 6 folders and changed the names of that folders. In every EA in each folder I put the different magic number. I attached that 6 EAs on the 6 pairs.The problem is that each EA works alone and when one EA opens any order another EAs can't work in the same time. Maybe MACD Sample EA has some code that prevents this operation. |
|
|||
|
Quote:
|
|
||||
|
Quote:
I have a problem with it always modifing the trades in the backtester over and over. How do I get it to modify the trades once. Since the program is going to sleep, the only trades that need to be modified are any trades still open. Please see attached .Gif of Backtest results. I am so close to getting this right - Please advise!! I use this Take Profit and Stop Loss modification in conjunction with the sleep mode. Please see code below int start() { if (UseHourTrade) { int a=0; int b=0; int c=0; if(!(Hour()>=FromHourTrade1 && Hour()<=ToHourTrade1)) a=1; if(!(Hour()>=FromHourTrade2 && Hour()<=ToHourTrade2)) b=1; if(!(Hour()>=FromHourTrade3 && Hour()<=ToHourTrade3)) c=1; if(a==1 && b==1 && c==1) { Comment( "\n"," * SOLAR WIND EXPERT ADVISOR *", "\n", "\n", " - PROGRAM IN SLEEP CYCLE - ", "\n", "\n"," > NON-TRADING HOURS! <"); ///////////////////MODIFY STOP LOSS & TAKE PROFIT AT START OF SLEEP CYCLE ///////////////// int h=0; for (int cnt1=OrdersTotal()-1;cnt1>=0;cnt1--) OrderSelect(h, SELECT_BY_POS, MODE_TRADES); if (OrderType()>=OP_SELL && OrderSymbol()==Symbol() && (OrderMagicNumber () == MagicNumber || MagicNumber==0)) { OrderModify(OrderTicket(),OrderOpenPrice(),Ask+(15 *Point),Bid-(20*Point),Cyan); //Modify stop loss and take profit return(0); } if (OrderType()>=OP_BUY && OrderSymbol()==Symbol() && (OrderMagicNumber () == MagicNumber || MagicNumber==0)) { OrderModify(OrderTicket(),OrderOpenPrice(),Bid-(15*Point),Ask+(20*Point),Cyan); //Modify stop loss and take profit return(0); } return(0); } } Dave <><<< PLEASE LOOK AT ATTACHED THUMBNAIL! Last edited by iscuba11; 08-30-2006 at 05:48 AM. |
|
||||
|
Quote:
|
![]() |
| Bookmarks |
| Tags |
| histogram, forex, ZUP_v1.mq4 |
| 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 10:53 PM | |
| Forex SRDC Sidus Sibkis EA MT4 Forum OTCSmart | This thread | Refback | 12-08-2007 12:46 PM | |