| 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 |
|
|||
|
Hi there,
I created my first indicator and really happy about it. What I have is a 2map (1hour and daily) for trading only with the major trend. On the 1hour chart it works perfectly, but if I lower the TF the signals change....can anybody tell me how to make the signal appear on the close of the 1hour candle even on a lower TF chart ? Is that possible ? |
|
||||
|
Quote:
PHP Code:
|
|
|||
|
Quote:
Last edited by MFM; 01-14-2008 at 12:12 PM. |
|
|||
|
Putz
Hi, Putz,
Try to use GlobalVariable and iHigh()/iLow(). Maybe like this: //---- input parameters string ChangeTrendBar; int start() double H1=iHigh(NULL,0,1); double H0=iHigh(NULL,0,0); ... if(xnow>ynow && xprevious<yprevious) // signal that trend has change { GlobalVariableSet("BarTrendChange",Time[0]); } if(GlobalVariableGet("BarTrendChange")==Time[1]) { if(H1<H0 && H0-H1=n-pip) ... Hope it works. |
|
||||
|
How to put Expiration day on the indicator
Dear all trader,
I want to know how to put an expiration date in indicator or EA, so that it has an expiration days like picture below. What string code should be added in .mtq? Thanks in advance. |
|
||||
|
Date Expiry Code
Quote:
Good to hear from you again, I have just got back from the Christmas holidays and am ready to get back into it. I use this code I hope you find it works for you. string Message=""; datetime expire = D'2008.02.04 12:00'; if (TimeCurrent()>expire){ Alert("Trial has ended. Please contact xxxx @ xxxx.com"); return(0); }else {Message="Price Display Activated";} ObjectDelete("Price_Account_Info"); ObjectCreate("Price_Account_Info", OBJ_LABEL,WindowFind("Price"), 0, 0); ObjectSetText("Price_Account_Info",""+Message+" - Expires "+TimeToStr(expire)+"",8, "Tahoma", ForestGreen); ObjectSet("Price_Account_Info", OBJPROP_CORNER, 3); ObjectSet("Price_Account_Info", OBJPROP_XDISTANCE, 5); ObjectSet("Price_Account_Info", OBJPROP_YDISTANCE, 5); This code puts a message into the indicator window or chart window and an expiry into an Alert Box Comment.gif This example puts a message into the indicator window or chart window and an expiry into the top left of the chart datetime expire = D'2008.02.04 13:25'; if (TimeCurrent()>expire){ Comment("Trial has ended. Please contact xxxx @ xxxx.com"); return(0); }else {Message="Price Display Activated";} ObjectDelete("Price_Account_Info"); ObjectCreate("Price_Account_Info", OBJ_LABEL,WindowFind("Price"), 0, 0); ObjectSetText("Price_Account_Info",""+Message+" - Expires "+TimeToStr(expire)+"",8, "Tahoma", ForestGreen); ObjectSet("Price_Account_Info", OBJPROP_CORNER, 3); ObjectSet("Price_Account_Info", OBJPROP_XDISTANCE, 5); ObjectSet("Price_Account_Info", OBJPROP_YDISTANCE, 5); Comment1.gif This next example puts both the messages into Comments on the top left of the chart. datetime expire = D'2008.02.04 13:25'; if (TimeCurrent()>expire){ Comment("Trial has ended. Please contact xxxx @ xxxx.com"); return(0); }else {Comment("Price Display Activated");} All of these codes make the indicator disappear when the expiry time is up A simple indicator as an example posted below Price_Display.mq4 cja Last edited by cja; 01-15-2008 at 08:56 AM. Reason: Added info |
![]() |
| 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 | |