Yes, it does compile. However, not for the right reasons. The MT/VARs are not being applied to the correct Indicator. They are being applied to the iMA indicators that don't belong in the diagram because they are not a part of the trade logic. Getting the MQL to simply compile is not a solution. Getting MT/VARs applied to the correct iCustom Indicator after using iCustom Import, is the solution and that has not been done.
1) Following your instructions, plots two iMAs on the chart during back-testing.
2) There has never been any explanation given that would cause one to understand why I would need to create
two iMAs, merely to get independent MT/VARs implemented into a Diagram.
3) The TA+ block will not accept a User Defined Value of 100000 as suggested. If you set the User Defined Value to 100,000 as you suggested, the TA+ block will automatically change that value to -99XXX.00000, when you click outside of the assignment field for the User Defined Value.
3) There's been no explanation (at all) for the necessity of including indicators in the TA+ block that do not belong there and that have nothing to do with the trade logic/strategy or trading system.
I believe that my questions are written very clearly and I have used screen pics to walk you through precisely where the instructions you give previously don't work. You then came back, knowing that your previous set of instructions did not work (as my pics have shown) and you offer another abstractly written set of instructions that now calls me to include an Indicator that does not belong in the trade logic. I'm at a lost for words.
molanisfx wrote:
In a TA+ create a condition indicator ma = 100000 so it won't affect the ea logic
Done
molanisfx wrote:
In the ma indicator period add a number - then assign the variable to that period.
Done
molanisfx wrote:
The variable will be defined and the initial value will be the ma indicator period.
The MT/VAR should be defined NOT against the Standard MT4 Indicator, but against the iCustom Indicator. Why define a variable against an indicator that does not belong in the trade logic?
molanisfx wrote:
Then do the manual adjustement in your other TA where you use the custom indicator. It will compile fine this time.
The issue of getting Molanis to compile the MQL is secondary. The primary issue is getting the TA+ to recognize MT/VARs after importing iCustom Indicators and Molanis refuses to do that. That's the primary issue. There is no "other" TA+ block that should be included in the trade logic. The
only TA+ being used in the trade logic, uses an iCustom Indicator. There is
no iMA being used at all. I repeat - there is no iMA being used in the trade logic.
Done
[Note: I had to change TACPeriod and SACPeriod back to 5 and 8, in order to get Molanis to compile the MQL]As you can see here in this pic, even
after following your example to include an iMA in a separate TA+ block, the TA+ Blocks that use the iCustom Indicator still shows
"None" in each of its Variable Selection drop-down lists fields.
This means that the EA is not - I repeat - not using the correct MT/VAR. The diagram does validate. The MQL does get compile into an .ex4 file and the EA does run. However, the MT/VARs are not being applied to the iCustom Indicator period values for TACPeriod and SACPeriod.
By adding your iMA indicators to the diagram, two Moving Averages are created and plotted on the chart. The TACPeriod value of 5, and the SACPeriod value of 8, are being applied to
both iMAs! They are not being applied (at all) to the iCustom Indicator.
So, creating the new iMAs was a red herring at the very least, as it did nothing to add the Variable Inputs of TACPeriod and SACPeriod, to the iCustom Indicator. It works when you use only the Standard MT4 Indicators. But, it does not work when using an iCustom Indicator.
I really would not know how to make this any clearer. I've provided step-by-step pics after following your instructions. I've asked you to provide step-by-step pics of any procedure I may have missed. My pics show each step being followed correctly, yet the TA+ Block does not function as designed when using MT/VARs with iCustom Indicators.
I would appreciate a step-by-step solution (as I have provided in demonstrating the problem), if one is possible in this scenario, please. If this simply won't work in Molanis while using iCustom Indicators, please just say so. I've spent a lot of time on this and time is money in this business as you already know, I'm sure.
Thank you very much.
cfx