Jump to content

⤴️-Paid Ad- Check advertising disclaimer here. Add your banner here.🔥

Recommended Posts

Posted

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

Posted

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);

}

//+------------------------------------------------------------------+

Posted

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)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


⤴️-Paid Ad- Check advertising disclaimer here. Add your banner here.🔥

×
×
  • Create New...