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
extern int Price = 0; //Apply to Price(0-Close;1-Open;2-High;3-Low;4-Median price;5-Typical price;6-Weighted Close)
extern int MALength = 9; // Period of NonLagMA
extern int Displace = 0; //DispLace or Shift
extern double PctFilter = 0; //Dynamic filter in decimal
extern int Color = 1; //Switch of Color mode (1-color)
extern int ColorBarBack = 1; //Bar back for color mode
extern double Deviation = 0; //Up/down deviation
extern int AlertMode = 1; //Sound Alert switch (0-off,1-on)
extern int WarningMode = 0; //Sound Warning switch(0-off,1-on)
extern int WarningTicks = 0;
extern bool SendAlertEmail = false;
extern double BarShift = 1;
double nLagMA;
nLagMA=iCustom(Symbol(),0,"NonLagMA_v7.7", Price, Length, Displace, PctFilter, Color, ColorBarBack, Deviation, AlertMode, WarningMode, WarningTicks, SendAlertEmail);
double nLagMA1;
nLagMA1=iCustom(Symbol(),0,"NonLagMA_v7.7", Price, Length, Displace, PctFilter, Color, ColorBarBack, Deviation, AlertMode, WarningMode, WarningTicks, SendAlertEmail, BarShift);
// Signal Cross
if (nLagMA == 0 && nLagMA1 > 1000) Order=SIGNAL_BUY;
if (nLagMA1 == 0 && nLagMA > 1000) Order=SIGNAL_SELL;
// Signal Filter
if (nLagMA1 > 1000) Filter_BUY = True; // Maybe used as SellExit Signal
if (nLagMA == 0) Filter_SELL = True; // Maybe used as BuyExit Signal
Hi Mladen,
please find the indicator attached to this posting.
Thank you in advance!
Hi Mladen,
please find the indicator attached to this posting.
Thank you in advance!
Best to use "trend" buffer for that
Something like this :
double trendPrev = iCustom(NULL,0,"NonLagMA_v7.7", Price, Length, Displace, PctFilter, Color, ColorBarBack, Deviation, AlertMode, WarningMode, WarningTicks, SendAlertEmail, 3, BarShift+1);
if (trendNow!=trendPrev)
{
if (trendNow>0)
Order=SIGNAL_BUY;
else Order=SIGNAL_SELL;
}
Best to use "trend" buffer for that
Something like this :
double trendPrev = iCustom(NULL,0,"NonLagMA_v7.7", Price, Length, Displace, PctFilter, Color, ColorBarBack, Deviation, AlertMode, WarningMode, WarningTicks, SendAlertEmail, 3, BarShift+1);
if (trendNow!=trendPrev)
{
if (trendNow>0)
Order=SIGNAL_BUY;
else Order=SIGNAL_SELL;
}
Hi Mladen,
thank you very much for your advise!
Would it also work if I put in more paramaters from other indicators like this?
{
if(totalOrdersLong<MaxLongTrades && trendNow>0 && (NLD1>NLD2) && RSIfilter>55) Order=SIGNAL_BUY;
if(totalOrdersShort<MaxShortTrades && trendPrev>0 && (NLD1<NLD2) && RSIfilter<45) Order=SIGNAL_SELL;
}
\Thomas
Hi Mladen,
thank you very much for your advise!
Would it also work if I put in more paramaters from other indicators like this?
{
if(totalOrdersLong<MaxLongTrades && trendNow>0 && (NLD1>NLD2) && RSIfilter>55) Order=SIGNAL_BUY;
if(totalOrdersShort<MaxShortTrades && trendPrev>0 && (NLD1<NLD2) && RSIfilter<45) Order=SIGNAL_SELL;
}
\Thomas
Yes, you can add as much conditions as you wish.
But in the case of the code written that way, the "primary" condition is if nonlag ma have changed the trend and then all the rest of the conditions would be checked. If that is what you wanted, then you can pack in that code block as much conditions as you wish
Yes, you can add as much conditions as you wish.
But in the case of the code written that way, the "primary" condition is if nonlag ma have changed the trend and then all the rest of the conditions would be checked. If that is what you wanted, then you can pack in that code block as much conditions as you wish
hello mr mladen:
could you introduce or making a indicator to draw MTF vertical line on any histogram
kind regard
hello mr mladen:
could you introduce or making a indicator to draw MTF vertical line on any histogram
kind regard
You mean a simple vertical line drawn at certain time(s)?
YES i need simple vertical line to draw on any histogram for determining candle on histogram
similar this picture but on separate chart or sub chart {can drag it on histogram} to show vertical line
YES i need simple vertical line to draw on any histogram for determining candle on histogram
similar this picture but on separate chart or sub chart {can drag it on histogram} to show vertical line
Here you go. Just drag it to the sub-window you wish it to be displayed at and chose the time frame