Coding help - page 576

 
mladen:

tfi_markets

That "trend" indicator is not updating current bar. But since it is a decompiled code, I think you should get the original code in order to see what is going wrong

The code snippet I posted is OK and in case when the indicator that is called works correctly, it will issue correct signals too

Hi Mladen,

thank you for your code. I have implemented it differently, now it is working!

Happy Christmas Holidays!

Files:
at.jpg  28 kb
 

Thank you! just what I was looking for!

 

Could this indicator be changed so that the 'names' of the ma's are shown instead of numbers?

There are just too many to remember.

Thanks

TEAMTRADER

// MA_Method= 0: SMA------------Simple Moving Average

// MA_Method= 1: EMA------------Exponential Moving Average

// MA_Method= 2: Wilder---------Wilder Exponential Moving Average

// MA_Method= 3: LWMA ---------Linear Weighted Moving Average

// MA_Method= 4: SineWMA-----Sine Weighted Moving Average

// MA_Method= 5: TriMA-----------Triangular Moving Average

// MA_Method= 6: LSMA ----------Least Square Moving Average (or EPMA, Linear Regression Line)

// MA_Method= 7: SMMA ----------Smoothed Moving Average

// MA_Method= 8: HMA-------------Hull Moving Average by Alan Hull

// MA_Method= 9: ZeroLagEMA---Zero-Lag Exponential Moving Average

// MA_Method=10: DEMA----------Double Exponential Moving Average by Patrick Mulloy

// MA_Method=11: T3-------------T3 by T.Tillson

// MA_Method=12: ITrend--------Instantaneous Trendline by J.Ehlers

// MA_Method=13: Median ------Moving Median

// MA_Method=14: GeoMean----Geometric Mean

// MA_Method=15: REMA---------Regularized EMA by Chris Satchwell

// MA_Method=16: ILRS ---------Integral of Linear Regression Slope

// MA_Method=17: IE/2 ---------Combination of LSMA and ILRS

// MA_Method=18: TriMAgen ----Triangular Moving Average generalized by J.Ehlers

// MA_Method=19: VWMA--------Volume Weighted Moving Average

// MA_Method=20: JSmooth-----Smoothing by Mark Jurik

Files:
 
TEAMTRADER:
Could this indicator be changed so that the 'names' of the ma's are shown instead of numbers?

There are just too many to remember.

Thanks

TEAMTRADER

// MA_Method= 0: SMA------------Simple Moving Average

// MA_Method= 1: EMA------------Exponential Moving Average

// MA_Method= 2: Wilder---------Wilder Exponential Moving Average

// MA_Method= 3: LWMA ---------Linear Weighted Moving Average

// MA_Method= 4: SineWMA-----Sine Weighted Moving Average

// MA_Method= 5: TriMA-----------Triangular Moving Average

// MA_Method= 6: LSMA ----------Least Square Moving Average (or EPMA, Linear Regression Line)

// MA_Method= 7: SMMA ----------Smoothed Moving Average

// MA_Method= 8: HMA-------------Hull Moving Average by Alan Hull

// MA_Method= 9: ZeroLagEMA---Zero-Lag Exponential Moving Average

// MA_Method=10: DEMA----------Double Exponential Moving Average by Patrick Mulloy

// MA_Method=11: T3-------------T3 by T.Tillson

// MA_Method=12: ITrend--------Instantaneous Trendline by J.Ehlers

// MA_Method=13: Median ------Moving Median

// MA_Method=14: GeoMean----Geometric Mean

// MA_Method=15: REMA---------Regularized EMA by Chris Satchwell

// MA_Method=16: ILRS ---------Integral of Linear Regression Slope

// MA_Method=17: IE/2 ---------Combination of LSMA and ILRS

// MA_Method=18: TriMAgen ----Triangular Moving Average generalized by J.Ehlers

// MA_Method=19: VWMA--------Volume Weighted Moving Average

// MA_Method=20: JSmooth-----Smoothing by Mark Jurik

TEAMTRADER,

use enum function,for this,look some one indicator code that have names rather than numbers,try to learn some thing by your self too when you are in the top class university [ TSD ] of the world,lol

regards

 
mladen:

Vlad5624

No, I did not, Completely unfamiliar with 11111 and 22222 EAs

Hi Mladen)I'm sorry,EA name qiji

 

Dearest MLADEN,

in TSD threads at so many places i read about indicators.....this indicator for EA and EA version indicator,so my question is,if indicators are coded specifically for EAs or it is for some type of indicators ..... if all indicators needs some specific features and environment for to be used in/with EAs ...kindly explain,thanks

regards

 

Hi all, I need some help with my EA to limit it to have only 1 trade a day but have come to a dead end. I have tried multiple methods but it does not seem to work. Appreciate if someone could enlighten me on this matter.

Below is my EA.

Thanks

//---- input parameters

extern double TakeProfit = 1000.0;

extern double Lots = 0.1;

extern double StopLoss = 980.0;

extern int Entry_Hour_1st = 21;

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

//| expert initialization function |

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

int init()

{

//----

//----

return(0);

}

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

//| expert deinitialization function |

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

int deinit()

{

//----

//----

return(0);

}

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

//| expert start function |

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

int start()

{

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

//-- Trigger Trade

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

int ticket, total;

total = OrdersTotal(); // check for total number of trades currently open

if(total < 1)

{

if (Hour()==Entry_Hour_1st && ((High[0] - High[1]) > 0.00100) && ((High[1] - Low[1]) > 0.00100))

{

if ((Close[1] - Open[1]) > 0.00100)

{

TP_Value = (Close[1] - Open[1]); // value of long body

SL_Value = (Low[1] - 0.0010); // always the same for long

ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,1,SL_Value,Ask+TP_Value,"My EA",200,0,Green);

return(0);

}

}

if (Hour()==Entry_Hour_1st && ((Low[1] - Low[0]) > 0.00100) && ((High[1] - Low[1]) > 0.00100))

{

if ((Close[1] - Open[1]) > 0.00100)

{

TP_Value = (Close[1] - Open[1]); // value of long body

SL_Value = (High[1] + 0.0010); // always the same for short

ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,1,SL_Value,Bid-TP_Value,"My EA",200,0,Red);

return(0);

}

}

}

return(0);

}

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

 
TEAMTRADER:
Could this indicator be changed so that the 'names' of the ma's are shown instead of numbers?

There are just too many to remember.

Thanks

TEAMTRADER

// MA_Method= 0: SMA------------Simple Moving Average

// MA_Method= 1: EMA------------Exponential Moving Average

// MA_Method= 2: Wilder---------Wilder Exponential Moving Average

// MA_Method= 3: LWMA ---------Linear Weighted Moving Average

// MA_Method= 4: SineWMA-----Sine Weighted Moving Average

// MA_Method= 5: TriMA-----------Triangular Moving Average

// MA_Method= 6: LSMA ----------Least Square Moving Average (or EPMA, Linear Regression Line)

// MA_Method= 7: SMMA ----------Smoothed Moving Average

// MA_Method= 8: HMA-------------Hull Moving Average by Alan Hull

// MA_Method= 9: ZeroLagEMA---Zero-Lag Exponential Moving Average

// MA_Method=10: DEMA----------Double Exponential Moving Average by Patrick Mulloy

// MA_Method=11: T3-------------T3 by T.Tillson

// MA_Method=12: ITrend--------Instantaneous Trendline by J.Ehlers

// MA_Method=13: Median ------Moving Median

// MA_Method=14: GeoMean----Geometric Mean

// MA_Method=15: REMA---------Regularized EMA by Chris Satchwell

// MA_Method=16: ILRS ---------Integral of Linear Regression Slope

// MA_Method=17: IE/2 ---------Combination of LSMA and ILRS

// MA_Method=18: TriMAgen ----Triangular Moving Average generalized by J.Ehlers

// MA_Method=19: VWMA--------Volume Weighted Moving Average

// MA_Method=20: JSmooth-----Smoothing by Mark Jurik

Dear TEAMTRADER

as per your complaint in PM,so sorry and excuses,it was not and never my intention to hurt you,just it was a try to request you to be able to do some thing minor by your self,nothing more,any way here is your indicator as per your requirements.thanks

regards

allaverages_v4.0_600.mq4

Files:
 

Understood and highly appreciated.

TEAMTRADER

 
TEAMTRADER:
Understood and highly appreciated. TEAMTRADER

you are always welcome ......... regards

Reason: