Re: Moving Average indicators for MT4

2541
kvak wrote: Thu Nov 03, 2022 11:31 am Yes, you are right, I forget something in code....Sorry for that, here is corrected version and tomorrow I correct previous versions...
Thank you. I have another question for you. I would like to read the value of this indicator in m5 (shift = 1), but using m1 chart, so I read the previous m5 close candle every m1 candle, nothing strange. I do this using the iCustom function and in backtest for some personal testing, specifically:

Code: Select all

   iCustom(Symbol(), PERIOD_M1, IndicatorName, PERIOD_M5, indicators parameters...., shift=1); 
however this seems to give me not the value of the indicator in m5 with shit = 1, but another value which I'm not able to understand where it comes from.

One thinkg that I may ask you is related to the calls that you do internally on the mt4 functions, like Time, Close etc. The proper format in order to get a functional code is from

Code: Select all

Close[shift] to iClose(NULL , PERIOD_M15 , shift )
for example.

I give you an example:

Example: Long when previous m5 center line is green and volumes are green or gray, Short when previous m5 center line is red and volumes are red or gray. Look at my prints and the hours.
I think that this happens because the iCustom function written in my way reads the indicator in m1 chart with m5 version

Thank you!
Attachments


Re: Moving Average indicators for MT4

2542
@ kvak

Respected kvak Sir,

If you find this option useful for yourself / for all users then - Please Kindly : Add Colour Candles option to Indicator : eAverages ( adx filtered)

Preferably : 2 state Colour Candles i.e. : Bull / Bear Candles Or Drop Down Menu : 2 state colour Candles / 3 state colour Candles.


Thanks for your Time, Efforts, Generosity.
Thanks
These users thanked the author thomdel for the post (total 2):
Mickey Abi, kvak

Re: Moving Average indicators for MT4

2543
traderokey wrote: Tue Nov 15, 2022 7:18 am Yes, the middle line can be a Vwap too. I just want a line that divides the upper and lower Vwap lines by equal halves.

Oh I checked the lines thickness again and yes, I can edit them now. Not sure what happened the first time.

So please, add a middle Vwap line and on/off button. Thanks.
Added the third line and a button.
These users thanked the author mrtools for the post (total 4):
traderokey, vvFish, 太虚一毫, RodrigoRT7

Re: Moving Average indicators for MT4

2545
thomdel wrote: Tue Nov 15, 2022 2:23 am @ kvak

Respected kvak Sir,

If you find this option useful for yourself / for all users then - Please Kindly : Add Colour Candles option to Indicator : eAverages ( adx filtered)

Preferably : 2 state Colour Candles i.e. : Bull / Bear Candles Or Drop Down Menu : 2 state colour Candles / 3 state colour Candles.


Thanks for your Time, Efforts, Generosity.
Thanks
Added candle option, try it...
These users thanked the author kvak for the post (total 7):
Ricstar_8, RodrigoRT7, Jedidiah, thomdel, 太虚一毫, Mickey Abi, pail1217


Re: Moving Average indicators for MT4

2546
hernandez wrote: Mon Nov 14, 2022 9:34 pm Thank you. I have another question for you. I would like to read the value of this indicator in m5 (shift = 1), but using m1 chart, so I read the previous m5 close candle every m1 candle, nothing strange. I do this using the iCustom function and in backtest for some personal testing, specifically:

Code: Select all

   iCustom(Symbol(), PERIOD_M1, IndicatorName, PERIOD_M5, indicators parameters...., shift=1); 
however this seems to give me not the value of the indicator in m5 with shit = 1, but another value which I'm not able to understand where it comes from.

One thinkg that I may ask you is related to the calls that you do internally on the mt4 functions, like Time, Close etc. The proper format in order to get a functional code is from

Code: Select all

Close[shift] to iClose(NULL , PERIOD_M15 , shift )
for example.

I give you an example:

Example: Long when previous m5 center line is green and volumes are green or gray, Short when previous m5 center line is red and volumes are red or gray. Look at my prints and the hours.
I think that this happens because the iCustom function written in my way reads the indicator in m1 chart with m5 version

Thank you!
Sorry I dont understand your puzzle.... You use icustom like a call in some EA?
As I said in previous post, I don't do EAs, but I see, that
you call shift, but this indicator haven't menu for shift? So I dont know what is calling.
Also said in my previous post, that this indicator haven't something to do with volume.
Ribbon have simply condition and coloring like a center line and one state is colored when HI or LO of channel is broken....

Re: Moving Average indicators for MT4

2548
kvak wrote: Tue Nov 15, 2022 11:48 am Sorry I dont understand your puzzle.... You use icustom like a call in some EA?
As I said in previous post, I don't do EAs, but I see, that
you call shift, but this indicator haven't menu for shift? So I dont know what is calling.
Also said in my previous post, that this indicator haven't something to do with volume.
Ribbon have simply condition and coloring like a center line and one state is colored when HI or LO of channel is broken....
Thank you for your reply. Sorry if I call them volumes again, I know that this is not a Volume as you told me :sweat:

By shift, I mean the candle id i want to watch. shift = 1 means that I look at the previous candle in the reference time frame, not the current one. Yes I use iCustom function in EAs to call this indicator looking at the values inside the buffers, and I call this function like I wrote in my previous question. However, If I print every minute the values of this indicator called with iCustom, it seems that they don't match with the values that I see using the data watch tool from MT4, it seems that there is some unprecision in the data read with iCustom or lag.

One thing could be the fact that inside the code there are calls on the common mt4 function in the old fashion. Like

Code: Select all

Close[i]
instead of

Code: Select all

iClose(Symbol(), User_chosen_Period, i)
Other reasons are currently unknow to me, maybe some of you have already experienced this! Even if you don't program specific EAs

I want to do a further explanation of one key thing that it is not clear in my mind and regardless of EAs it could be something that you know.
There are two types of readings in my opinion that one can try to do:

1: Reading every minute the current m5 indicator value, this implies that the developer (me in this case) implements a function able to read at the start of every new m1 candle the actual value of the m5 candle to obtain the desired behaviour, and this is exaclty what I'm doing right now.

2: Reading every minute the previous m5 indicator value, and this is the question. This should be straightforward because there is no strange logic behinf it. It is sufficient to read the indicator m5 value with shift = 1, and the values should be fixed because the candle is definitely closed. However, when I try to do that on your idicator as:

Code: Select all

iCustom(Symbol(), PERIOD_M1, IndicatorName, PERIOD_M5, indicators parameters...., shift=1);


this is not working properly because buffers are populated with values different from values showed on the GUI. One possible reason is old fashion code like

Code: Select all

Close[i]
instead of

Code: Select all

 iClose(Symbol(), User_chosen_Period, i)
. Other reasons are uknown to me and I'm trying to reasoning about that with you.

Thanks for your time!


Who is online

Users browsing this forum: 256robertm, alimpe2000, ChatGPT [Bot], DotNetDotCom [Bot], FXSurf, Grapeshot [Bot], IBM oBot [Bot], Intrest 1, pfxi, Sogou [Bot] and 77 guests