molanis.com/forum - Tools for MetaTrader : The place to ask about the best expert advisor builder, expert advisor downloads, and expert advisor programming

AFTER YOU REGISTER SEND US AN EMAIL TO ACTIVATE YOUR ACCOUNT - Before posting:-1- Please read the user guide -2- Try the examples -3- Search in the forum
It is currently Sat May 11, 2024 1:57 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 14 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: MQL Block: Practical Usage Help
PostPosted: Wed Mar 21, 2012 9:02 am 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
In a TA+ create a condition indicator ma = 100000 so it won't affect the ea logic
In the ma indicator period add a number - then assign the variable to that period. The variable will be defined and the initial value will be the ma indicator period.
Then do the manual adjustement in your other TA where you use the custom indicator. It will compile fine this time.


Top
 Profile  
 
 Post subject: Re: MQL Block: Practical Usage Help
PostPosted: Wed Mar 21, 2012 4:38 pm 
Offline

Joined: Wed Mar 14, 2012 12:31 am
Posts: 118
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


Image
Done

molanisfx wrote:
In the ma indicator period add a number - then assign the variable to that period.


Image
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.

Image
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


Top
 Profile  
 
 Post subject: Re: MQL Block: Practical Usage Help
PostPosted: Thu Mar 22, 2012 8:48 am 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
Maybe I did not explain myself. When using custom indicators you need to add the variables manually as you did before - we force people to do it manually for them to really understand the inputs of the custom indicator. If you do that and generate the ea you will get an error because the variables are not defined. You need to define the variables in the mt var icon.
If you generate the ea at this point, you will get an error because the variables do not have an initial definition. So you need to use a dummy TA+ to assign the initial definition. Create a dummy condition (that does not trade), then assign the initial values there (use shift, period, whatever) - in this condition use any non custom indicator.
We know this is a bit complex so in the next version we will assign zero to variables without an initial definition so the last step won't be need it.


Top
 Profile  
 
 Post subject: Re: MQL Block: Practical Usage Help
PostPosted: Thu Mar 22, 2012 2:49 pm 
Offline

Joined: Wed Mar 14, 2012 12:31 am
Posts: 118
molanisfx wrote:
...Create a dummy condition (that does not trade), then assign the initial values there (use shift, period, whatever) - in this condition use any non custom indicator.


Yes. That was the part that I never knew - the missing link until your last post previous to this one. And, yes. It is very unintuitive. I'm shocked that you are not getting inundated with a flood of technical support queries on this one topic alone. It really makes me wonder how other traders are going about evaluating their iCustom based EAs during the back-test phase.


molanisfx wrote:
We know this is a bit complex so in the next version we will assign zero to variables without an initial definition so the last step won't be need it.


Good! And, hopefully, this will mean that the Variable Assignment Field within the TA+ Block, will now show the actual MT/VAR that was defined by the user, instead of showing "None" in the drop-down list to the right of the Custom Fields field.

In other words, being able to simply use your iCustom Indicator with the MT/VARs, directly in the same TA+ block, would be massively more intuitive for the end user.

All other problems have been resolved - I have nothing further on this issue. Thank you!

Regards,
cfx


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by Molanis © 2009