Quote:
As per you questions:
Is there a difference using
1. using TA+, TA blocks or;
2. even using the custom indicator code and paste it the MQL block removing i
With the TA icons you are sure the condition code is correct because it is generated by the builder. If you use the MQL icon and the code is correct you will get the same result. If you are not getting the same result maybe you need to check your code.
I have checked the code many times, and see no issues with it. Like I said how the custom indicator built is tested is by painting on the chart using arrows. The arrows painted and looking at the chart and the indicators it uses, matches the condition for BUY or SELL, of the strategy.
I have pasted the indicator code in SB removing i, and saw same results with the differences in values with one specific condition mentioned above. I've even created a separate one in SB that uses TA blocks instead of using the custom indicator, and saw the same effects. The debugging printed, that I added in SB after code generation, is looking at all the values of interest that the condition is checking, and how I saw the issue.
Quote:
Quote:
(iCustom(NULL,0,"Indicator-M30",2,i+1)<iCustom(NULL,0,"Indicator-M30",2,i+2))&& etc ...
That does not seem correct. the i+1 is a format for creating the indicator but not for using it. When you use it you use the numbers only to indicate the bar that will be used to get the indicator value (1 is the previous bar, 0 current bar)
am not sure am with you here. When using the Indicator Builder, it adds the i+1, i+2 etc ... I add open, it puts open[i], open[1], it puts open[i+1]. The manual of indicator builder does not say we have to remove the i when using the indicator builder. So I just save, validate, and generate mql4 code. The mql4 code does show the shifts with i in them. But the ex4 generated works for me as it paints on chart where I expect it to paint.
I had a separate MT4 looking at this indicator from two separate charts. One chart (lower timeframe) has the hardcoded of the higher timeframe referencing the 3 x modes built using indicator builder. The other chart is the higher timeframe chart using the indicator as is (timeframe 0). The hardcoded version of higher timeframe from lower timeframe eventually loses sync with the higher timeframe one, where the values of the modes don't match what the higher timeframe is showing.
Like I said in my other posts, I don't see this type of problem using the MT4 built-in indicators.
Whenever the value loses sync from the hardcoded higher timeframe indicator attached to the lower timeframe, I have to keep switching it to the higher timeframe it's referencing to be in sync. Having both charts open makes no difference to this issue, as far as I can see.
So right now I have found the safest way for my calculations on the lower timeframe, in indicator builder, is to use this way
Quote:
(iCustom(Symbol(),PERIOD_M30,"Indicator", "-----Alert Settings-----", FALSE, FALSE, "alert.wave", FALSE, 17,2,i+1)< iCustom(Symbol(),PERIOD_M30,"Indicator", "-----Alert Settings-----", FALSE, FALSE, "alert.wave", FALSE, 17,2,i+2))&&
over this way
Quote:
(iCustom(NULL,0,"Indicator-M30",2,i+1)< iCustom(NULL,0,"Indicator-M30",2,i+2))&&
It just means I cannot use a hardcoded version of this indicator attach to lower timeframe for visual use. Just have to look at the higher timeframe of that indicator by looking at the higher timeframe chart manually, when referencing back. Or even if I do use it visually, I just have to sync it's higher timeframe it uses first to be sure am visually seeing correct things
I just have one question, when we send a hardcoded period like PERIOD_M30 to an indicator, is this in effect replacing wherever the indicator uses 0 for timeframe references to PERIOD_M30