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
i think you must attach the mq4 file
hi guys ,
i have a perfect indicator which has been written by dear coders guru.
but it dots below the moving average.
would somebody please change the place of circle in right place , where i show on fig.
tnx
My MTF Stochastic Alert Indicator - Need Help With Arrows Though!
I've coded an indicator which some of you might find useful when trading with Stochs
The 4H, 30M & 5M are all above the 50 level & when the 1M time frame is below the 20 level for a long trade.
Or
The 4H, 30M & 5M are all below the 50 level & when the 1M time frame is above the 80 level for a long trade.
The indicator works perfectly, However I am looking for someone you could possibly insert a few more lines of code so when the long parameters are met an upwards arrow is shown on the chat and when the short parameters are met a downwards arrow is shown on the chart. I would be extremely grateful if someone could help me with this. I've spent hours trying but do not know enough about programming to be able to achieve this! I know there's some great programmers on his forum!
//+------------------------------------------------------------------+
//| Stochs_4H_30M_5M_1M.mq4
//+------------------------------------------------------------------+
#property copyright ""
#property indicator_chart_window
datetime lastbar;
bool EmailSent;
extern bool EmailAlert;
extern bool SoundON;
extern double highlimit = 80;
extern double midlimit = 50;
extern double lowlimit = 20;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
Comment ("Stochastic +/- 80/20 Signal Indicator ON");
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
Comment ("");
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
//----
double main_M1 = iStochastic(NULL,PERIOD_M1,5,1,3,MO DE_SMA,0,MODE_MAIN,0);
double signal_M1 = iStochastic(NULL,PERIOD_M1,5,1,3,MO DE_SMA,0,MODE_SIGNAL,0);
double main_M5 = iStochastic(NULL,PERIOD_M5,5,1,3,MO DE_SMA,0,MODE_MAIN,0);
double signal_M5 = iStochastic(NULL,PERIOD_M5,5,1,3,MO DE_SMA,0,MODE_SIGNAL,0);
double main_M30 = iStochastic(NULL,PERIOD_M30,5,1,3,M ODE_SMA,0,MODE_MAIN,0);
double signal_M30 = iStochastic(NULL,PERIOD_M30,5,1,3,M ODE_SMA,0,MODE_SIGNAL,0);
double main_H4 = iStochastic(NULL,PERIOD_H4,5,1,3,MO DE_SMA,0,MODE_MAIN,0);
double signal_H4 = iStochastic(NULL,PERIOD_H4,5,1,3,MO DE_SMA,0,MODE_SIGNAL,0);
datetime curbar = Time[0];
if (lastbar != curbar)
{
lastbar = curbar;
if ((main_H4 < midlimit) && (main_M30 < midlimit) && (main_M5 highlimit))
if ((signal_H4 < midlimit) && (signal_M30 < midlimit) && (signal_M5 highlimit))
{
Alert ("Short Entry Warning On ",Symbol()," ",Period()," min");
if (EmailAlert && !EmailSent)
{
SendMail("Short","Short Entry Warning On " + (StringConcatenate(Symbol()," ",Period())));
EmailSent = true;
}
if (SoundON == true) PlaySound ("alert2.wav");
}
if ((main_H4 > midlimit) && (main_M30 > midlimit) && (main_M5 > midlimit) && (main_M1 < lowlimit))
if ((signal_H4 > midlimit) && (signal_M30 > midlimit) && (signal_M5 > midlimit) && (signal_M1 < lowlimit))
{
Alert ("Long Entry Warning On ",Symbol()," ",Period()," min");
if (EmailAlert && !EmailSent)
{
SendMail("Long","Long Entry Warning On " + (StringConcatenate(Symbol()," ",Period())));
EmailSent = true;
}
if (SoundON == true) PlaySound ("alert2.wav");
}
}
//----
return(0);
}
//+------------------------------------------------------------------+
need help plssss.........
Good day to all traders especially to all programmers and MT4 coders,
I have a request for indicator modification; I hope you can do this for me and the help of other traders to.
see the attach file for my request
Plese could somone fix.
Hi all I have been using this indi but it shows on the chart 2 bars infront of the current price and other indicators I have no idea if this can be fixed but if some wouldn't mind having a look to see if t could be fixed I would be very thankful.
Thanks
jd1888
Set the drawShift parameter to 0 and it will fix the drawing problem you have. But since it has a part of code that goes like this :
imp = imp + (Open - Close);
}
the best recommendation would be to forget about it (it uses future values in calculation)
Hi all I have been using this indi but it shows on the chart 2 bars infront of the current price and other indicators I have no idea if this can be fixed but if some wouldn't mind having a look to see if t could be fixed I would be very thankful. Thanks
Hi mladen
Thanks for the reply I just relised that it had a shift on it I changed it through the inputs and its where it should be now.
Now that it has moved it doen't look as good as I first thought.
What do you mean it uses future values in the calculations?
jd1888
In this part :
imp = imp + (Open - Close);
}
imp = MathRound(imp / Point);
Open and Close prices are all except the first one, future values of Open and Close (it is probably a coding error from the one made it, but frankly I do not know if it is an error coming from ignorance or from an intention to use future values - either way forget about the indicator, because whatever the reason for that kind of coding was (it should be a sort of a simple momentum in points finding but in this case it is a future momentum in points finding), it is not what it should be).
Hi mladen
Thanks for the reply I just relised that it had a shift on it I changed it through the inputs and its where it should be now.
Now that it has moved it doen't look as good as I first thought.
What do you mean it uses future values in the calculations?Dashboard for indicator
Please I need help with converting the attached indicator to a dashboard that include most of the common pairs and time frames.
Thanks
StepMA_Stoch crossover
Hi all,
I am trying to develop an EA that is supposed to open trades when the 2 lines of StepMA Stoch indicator are crossovering each other. More particularly,
I am setting:
double diCustom0=iCustom(NULL, 0, "StepMA_Stoch_NK", 10, 1, 0, 0, 0);
double diCustom1=iCustom(NULL, 0, "StepMA_Stoch_NK", 10, 1, 0, 1, 0);
double diCustom2=iCustom(NULL, 0, "StepMA_Stoch_NK", 10, 1, 0, 0, 1);
double diCustom3=iCustom(NULL, 0, "StepMA_Stoch_NK", 10, 1, 0, 1, 1);
if (diCustom3 > diCustom2 && diCustom0 > diCustom1)
OrderSend(Symbol(), OP_BUY, Lots, Ask, Slippage, 0, 0, NULL, Magic, 0, clr);
if (diCustom2 > diCustom3 && diCustom1 > diCustom0)
OrderSend(Symbol(), OP_SELL, Lots, Bid, Slippage, 0, 0, NULL, Magic, 0, clr);
(something
However, in many cases the opening time of new trades does not occur when there is a crossover.
Do I try to find the crossovers with a wrong method (shift = 0, shift = 1)? Is there any well-known issue with this tactic?
Thanks in advance for your help!