jjames Posted July 27, 2010 Report Share Posted July 27, 2010 Hi i wanna ask if soemeone can help me with making this indactor for me. I want a indicator who can plce 2 horizontal lines of the price (area where the ma's are on the dailly to shorter timeframes. The ma's are 3simple high the other 1 is simple ma 3 low. Here 2 screenshots to see it better what i mean i want it like that the guy who has this indie doesnt wanna share it. Oke this 1 shows the 3bar ma hi/lo http://img252.imageshack.us/img252/1657/201007271025.png This is the chart with the horizontal lines plotted on the smaller timeframes. http://img814.imageshack.us/img814/7440/201007271027.png I hope someone can help me with this if so i will help him to learn a strategy what makes money. Thanks JJ Quote Link to comment Share on other sites More sharing options...
kennyhubbard Posted July 28, 2010 Report Share Posted July 28, 2010 Here you go.......cut and paste into metaeditor and save in your indicators folder. //+------------------------------------------------------------------+ //| Daily_Hi_Lo.mq4 | //| Copyright © 2010, Kenny Hubbard | //| http://www.compu-forex.com | //+------------------------------------------------------------------+ #property copyright "Copyright © 2010, Kenny Hubbard" #property link "http://www.compu-forex.com" #property indicator_chart_window extern int MA_Period = 3; string Hi_Line = "Hi_Line", Lo_Line = "Lo_Line"; color Hi_Col = Red, Lo_Col = Blue; double Day_Hi, Day_Lo; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { Day_Hi = iMA(Symbol(),PERIOD_D1,MA_Period,0,MODE_SMA,PRICE_HIGH,0); Day_Lo= iMA(Symbol(),PERIOD_D1,MA_Period,0,MODE_SMA,PRICE_LOW,0); ObjectCreate(Hi_Line,OBJ_HLINE,0,0,Day_Hi); ObjectSet(Hi_Line,OBJPROP_COLOR,Hi_Col); ObjectCreate(Lo_Line,OBJ_HLINE,0,0,Day_Lo); ObjectSet(Lo_Line,OBJPROP_COLOR,Lo_Col); return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- ObjectDelete(Hi_Line); ObjectDelete(Lo_Line); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { if(New_Bar()){ Day_Hi = iMA(Symbol(),PERIOD_D1,MA_Period,0,MODE_SMA,PRICE_HIGH,0); Day_Lo= iMA(Symbol(),PERIOD_D1,MA_Period,0,MODE_SMA,PRICE_LOW,0); if (ObjectFind(Hi_Line)>-1)ObjectDelete(Hi_Line); if(ObjectFind(Lo_Line)>-1)ObjectDelete(Lo_Line); ObjectCreate(Hi_Line,OBJ_HLINE,0,0,Day_Hi); ObjectSet(Hi_Line,OBJPROP_COLOR,Hi_Col); ObjectCreate(Lo_Line,OBJ_HLINE,0,0,Day_Lo); ObjectSet(Lo_Line,OBJPROP_COLOR,Lo_Col); } return(0); } //+------------------------------------------------------------------+ bool New_Bar() { static datetime New_Time=0; //---- if(New_Time!=Time[0]){ New_Time=Time[0]; return(true); } //---- return(false); } //+------------------------------------------------------------------+ Quote Link to comment Share on other sites More sharing options...
jjames Posted July 28, 2010 Author Report Share Posted July 28, 2010 Hi Kenny thanks for helping but when i put the code in metaeditor and iit makes the indie it is not working can't put it in my chart Quote Link to comment Share on other sites More sharing options...
huuu Posted July 28, 2010 Report Share Posted July 28, 2010 yep, i get the following error messages when trying to complie the indicator: 'PRICE_' - variable not defined C:\uwc\experts\indicators\test2.mq4 (27, 54) 'HIGH' - variable not defined C:\uwc\experts\indicators\test2.mq4 (27, 61) 'PRICE_' - variable not defined C:\uwc\experts\indicators\test2.mq4 (28, 53) 'LOW' - variable not defined C:\uwc\experts\indicators\test2.mq4 (28, 60) 'PRICE_' - variable not defined C:\uwc\experts\indicators\test2.mq4 (52, 54) 'HIGH' - variable not defined C:\uwc\experts\indicators\test2.mq4 (52, 61) 'PRICE_' - variable not defined C:\uwc\experts\indicators\test2.mq4 (53, 53) 'LOW' - variable not defined C:\uwc\experts\indicators\test2.mq4 (53, 60) Quote Link to comment Share on other sites More sharing options...
kennyhubbard Posted July 28, 2010 Report Share Posted July 28, 2010 Ok, try this.......... http://www.multiupload.com/U3RX59CIZF Quote Link to comment Share on other sites More sharing options...
enigma1873 Posted July 28, 2010 Report Share Posted July 28, 2010 Also here http://www.4shared.com/file/LQrP6hT5/3_Bar_High_Low.html Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.