
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
nobody wants to give me a hand.
nobody wants to give me a hand.
I'm sure they do Raul, but not many people are conversant with programming and the few that are are probably busy with other things. I'm sure you will get a reply, but this usually takes a while with forums like this.
I'm sure they do Raul, but not many people are conversant with programming and the few that are are probably busy with other things. I'm sure you will get a reply, but this usually takes a while with forums like this.
I guess
still hopeful. Is driving me nutts already to have to move the line every time i have an open trade.
Please help me to finish my indicator
FW: Please help me to move the line.
--------------------------------------------------------------------------------
The indicator works as it was design. Sound alarm when price touches the line but i want to expand on that. I want this:
Copy the indicator below then do this 2 modifications:
modification #1:
create a line stoploss1(is already there) and move the line to where ever my stop loss is if i do not have an stop loss set move the line 500 pips away to prevent the alarm from being activated.
modification #2:
Create a line takeprofit1(this is not in the code) and move the line to where ever my stop loss is if i do not have a stop loss set move the line 502 pips away to prevent the alarm from being activated.
Pretty much the indicator will be checking what my stop loss and take profit is and will move at they respective prices if stop loss and take profit is not set will move the lines 500,502 pips away.
That way when the market hit my profit or stop loss the sound will let me know when im not looking at metatrader or have the window minimize, and i can go back i see what other set up i may have.
Thank you very much for your help brother.
//+------------------------------------------------------------------+
//| HLine Alert.mq4 |
//+------------------------------------------------------------------+
#property copyright ""
#property indicator_chart_window
extern string LineName="Stoploss1";
extern color LineColor=Red;
extern int LineStyle=STYLE_SOLID;
extern int AlertPipRange=1;
extern string AlertWav="Alert2.wav";
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
ObjectCreate(LineName, OBJ_HLINE, 0, 0, Bid);
ObjectSet(LineName, OBJPROP_STYLE, LineStyle);
ObjectSet(LineName, OBJPROP_WIDTH, 2);
ObjectSet(LineName, OBJPROP_COLOR, LineColor);
double val = ObjectGet( LineName, OBJPROP_PRICE1);
if (Bid-AlertPipRange*Point = val) PlaySound(AlertWav);
//----
//----
return(0);
}
//+--------------------------------------------------------------
Thanks
Here you have.
It works just fine. Thank you for sharing and have a Happy New Year !!!!
NR 7 indicator calculation error-> first indicator
hello
i am codng indicator for nr7.
the algo is
-calculate range and store it in array
- if current range <= last 7 ranges, then current bar is nr7
but the indicator seems to be flagging every bar as nr7. dunno where i made a mistake.
need nelp to put alert
some 1 help to put alert for Horizontal line like picture,
hello
i am codng indicator for nr7.
the algo is
-calculate range and store it in array
- if current range <= last 7 ranges, then current bar is nr7
but the indicator seems to be flagging every bar as nr7. dunno where i made a mistake.the proper counting backward are like this
[ it seems that you have a long way to go == before you produce a useful indicator ]
if (counted_bars < 0) {
return(-1);
}
if (counted_bars > 0) {
counted_bars--;
}
int pos = Bars-counted_bars;
int JJ7pos ;
for(int j = 0; j < Bars; j++) // original j = 0;
{
PatternText[j] = "pattern-" + j;
}
while (pos>=0) {
JJ7pos = pos; // indexing 0 1 2 3 is backward
Horizontal Line alert(for indicator window)
Hello. I am looking for a simple horizontal line alert for seperate Indicator window(NOT the chart portion). I want to use it for my predefined levels on indicators that use a seperate window(MACD,RSI,Stochs etc. It would need to conform to levels either by drag and drop or manual input Exp(-5 etc) Thanks
I am looking for a MACD alert indicator
a MACD indicator which makes alert sound when it reaches specific value of MACD,like 0.002 . Good luck to all