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
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
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
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!