Re: Coding Help

1271
mrtools wrote: Tue Aug 31, 2021 5:06 am Try this one.
Thank you so much Mr Tools. That is perfect.

It is also appreciated that I could compare it to the original in DiffMerge. While I guessed CleanPoint had some bearing after looking at your recent Momentum Histo and/ or Alb Speed MA fixes, I didn't catch any of the PlotPoint or the changes that were made.


Re: Coding Help

1272
Jackson Doh wrote: Tue Aug 31, 2021 5:45 am Thank you so much Mr Tools. That is perfect.

It is also appreciated that I could compare it to the original in DiffMerge. While I guessed CleanPoint had some bearing after looking at your recent Momentum Histo and/ or Alb Speed MA fixes, I didn't catch any of the PlotPoint or the changes that were made.
Those functions (CleanPoint & PlotPoint), are for non repainting line type indicators.
These users thanked the author mrtools for the post (total 3):
Jackson Doh, Jimmy, Thangarasu

Re: Coding Help

1273
Dear Coders, currently I am writing my EA and confused with calling custom indicators. I am going to take mrtools' TrendScalp indicator as an example.

The first question is, if the indicator has MTF, I want to call the indicator's higher timeframe value, for example calling 30 minutes value for trading 5 minutes candle, for which "Time Frame" I should enter PERIOD_M30? iCustom's int timeFrame or MTF indicator's TimeFrame or both?

Code: Select all

// 1
double value=iCustom(Symbol(),PERIOD_M30,"Trend - scalp 1.01(mtf + arrows + alerts).ex4",
				PERIOD_CURRENT,/*the rest of custom indicator parameters*/,bufferNumber,shift);

// 2
double value=iCustom(Symbol(),Period(),"Trend - scalp 1.01(mtf + arrows + alerts).ex4",
				PERIOD_M30,/*the rest of custom indicator parameters*/,bufferNumber,shift);

// 3
double value=iCustom(Symbol(),PERIOD_M30,"Trend - scalp 1.01(mtf + arrows + alerts).ex4",
				PERIOD_M30,/*the rest of custom indicator parameters*/,bufferNumber,shift);

The second question is, can I just only enter the yellow box parameters (shown as attached image) and ignore the rest like alert, arrows etc, shown as following:

Code: Select all

double value=iCustom(Symbol(),Period(),"Trend - scalp 1.01(mtf + arrows + alerts).ex4",				// Symbol, period, and Trend Scalp indicator name
		TimeFrame,Trend rigger factor bars,Upper level,Lower level,T3 period,T3 volume factor,T3 type,	// Yellow box Trend Scalp indicator inputs and let the rest as default
		0,1);												// Buffer number and shift

I used to test it by writing a custom indicator to call another custom indicator. It only works when I call the MT4 build-in indicators, but it doesn't work when I call the indicators that I downloaded from this forum or somewhere else. I am not a professional Coders, so if dear professional coders can address my confusion, I would appreciate it. Thank you!


Re: Coding Help

1276
Lesley919 wrote: Wed Sep 01, 2021 6:33 pm Dear Coders, currently I am writing my EA and confused with calling custom indicators. I am going to take mrtools' TrendScalp indicator as an example.

The first question is, if the indicator has MTF, I want to call the indicator's higher timeframe value, for example calling 30 minutes value for trading 5 minutes candle, for which "Time Frame" I should enter PERIOD_M30? iCustom's int timeFrame or MTF indicator's TimeFrame or both?

Code: Select all

// 1
double value=iCustom(Symbol(),PERIOD_M30,"Trend - scalp 1.01(mtf + arrows + alerts).ex4",
				PERIOD_CURRENT,/*the rest of custom indicator parameters*/,bufferNumber,shift);

// 2
double value=iCustom(Symbol(),Period(),"Trend - scalp 1.01(mtf + arrows + alerts).ex4",
				PERIOD_M30,/*the rest of custom indicator parameters*/,bufferNumber,shift);

// 3
double value=iCustom(Symbol(),PERIOD_M30,"Trend - scalp 1.01(mtf + arrows + alerts).ex4",
				PERIOD_M30,/*the rest of custom indicator parameters*/,bufferNumber,shift);

The second question is, can I just only enter the yellow box parameters (shown as attached image) and ignore the rest like alert, arrows etc, shown as following:

Code: Select all

double value=iCustom(Symbol(),Period(),"Trend - scalp 1.01(mtf + arrows + alerts).ex4",				// Symbol, period, and Trend Scalp indicator name
		TimeFrame,Trend rigger factor bars,Upper level,Lower level,T3 period,T3 volume factor,T3 type,	// Yellow box Trend Scalp indicator inputs and let the rest as default
		0,1);												// Buffer number and shift

I used to test it by writing a custom indicator to call another custom indicator. It only works when I call the MT4 build-in indicators, but it doesn't work when I call the indicators that I downloaded from this forum or somewhere else. I am not a professional Coders, so if dear professional coders can address my confusion, I would appreciate it. Thank you!
To both questions yes.

Re: Help: Trying to change width of levels

1277
mrtools wrote: Thu Sep 02, 2021 2:35 am Should be possible unless the width is hardcoded somewhere in the code.
I thought it would be easy by just putting a '2' after the 'SOLID' but that did not work.
Then I tried many variations of 'levels_width' and 'style_widths' but nothing has worked.
Is there a special code that I can enter that can change the levelsStyle width?
This is the block of code that I refer to with the one in bold that I would like to change.

extern color Fibo3Color = clrBlack;
extern int Fibo3Width = 1;
extern int Fibo3Style = STYLE_DOT;
extern int Fibo3LevelsStyle = STYLE_SOLID;
Thanks
TEAMTRADER

Re: Coding Help

1279
Dear Mr Tools,
I came across the Fast_Ema_Hull.mq4 indicator on the mql5 site. It is similar to the one Darks issued on here last year. I decided to try to do some upgrades to it so there's now a version with an on/off button and alerts, which appears to work just fine. I have also created a histo version but I've got a similar problem like with the Step Jurik in that this time there's repainting as the signal goes from sell to buy. There's no CleanPoint or PlotPoints to change so I'm out of my depth again. Would you mind having a look at the attached histo please and fix the coding error?

I am attaching the original file from mql5, the completed on/off button version that I made along with the problematic histo version.

Many thanks
Edit: I just noticed the alerts don't work on the button. I hashed out the trend index and didn't correct it.


Who is online

Users browsing this forum: No registered users and 13 guests