Re: Already Converted TradingView Indicators to MT4 Indicators
Posted: Wed Dec 07, 2022 5:33 pm
Hi Norbert,nwesterhuijs wrote: Wed Dec 07, 2022 3:40 pm Thank you MrTools and Kvak for picking up on this. I had indeed corrected already some errors since then but was still aiming to debug more before posting an update.
Only saw your efforts this morning (after the daily download mention) and I yet need to drop it on a chart this evening, but MrTools can you check 1 thing:
You indicated you have incorporated the iVidya into the iCustomMa call, which sounds fine but you provide the following code:Pls confirm but I reckon the High should be looking for the maximum and therefore look like this:Code: Select all
double hi = high[ArrayMinimum(high,HLPeriod,i)]; double lo = low[ArrayMinimum( low,HLPeriod,i)]; wrk[r].valH = iCustomMa(MaType,hi,MaLength,i,rates_total,0); wrk[r].valL = iCustomMa(MaType,lo,MaLength,i,rates_total,1);
Also curious how the VidyaSmoothPeriod is handled now that the Vidya is incorporated in the iCustom call. Will see that tonight.Code: Select all
double hi = high[ArrayMaximum(high,HLPeriod,i)]; double lo = low[ArrayMinimum( low,HLPeriod,i)]; wrk[r].valH = iCustomMa(MaType,hi,MaLength,i,rates_total,0); wrk[r].valL = iCustomMa(MaType,lo,MaLength,i,rates_total,1);
Furthermore, and again I need to see how it is handled this evening when I drop the indie on a chart, but I think it is lost in this latest version given that you are calling the arrays "high" and "low" which normally means you have replaced the "start"-function by the "OnCalculate"-function, which in turn would mean that the HOTTLOTT has lost the functionality (at least the one I added) of using the open and close as well as the high and low to create the channels. Is this deduction correct?
Nonetheless thank you both for pushing this one along quicker than I have managed thus far, much appreciated.
Cheers, Norbert
In the vidya the smooth period is built in, in the function it was done this way to make it easier when included in the averages. Can be done the other way but when you have a bunch of different averages with more than period and price values, it can be a major pain if you want to include them as well.
Shouldn't matter whether you use "start" function or "OnCalculate" function you still have built in price arrays, only difference I have found is in "OnCalculate" function they are not capitalized, that's the only difference I have found. Posting a new version, where you can choose either hi/lo mode and if that is shut off you can choose whatever combination of the 30+ averages for the channel, the other prices are there for whatever price you want for breakout of the channel mode, some prefer a different price method for the channel breakout.
Again, THANKS for your version. Snapshot is using hl/lo mode off and using Heiken Ashi better formula open/close.