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 Thu May 09, 2024 4:42 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Non-indicator code in MQL block?
PostPosted: Mon Jun 25, 2012 10:23 am 
Offline

Joined: Sun Jun 19, 2011 9:38 pm
Posts: 270
Is there a way to insert the condition below via MQL block in SB rather than via MetaEditor? I'm getting invalid code notifications--maybe because this code does not yet exist pre mq4 generation in SB?

(CalculateOpenPositions(Symbol(),OP_BUY,MagicNumberLong)<=0)

Thanks in advance.

_________________
I'm not a programmer, but I play one on TV.


Last edited by RJo on Fri Jun 29, 2012 3:14 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Non-indicator code in MQL block?
PostPosted: Tue Jun 26, 2012 11:46 pm 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
You cannot use that feature in the mql icon
It will be available in the next release as an option


Top
 Profile  
 
 Post subject: Re: Non-indicator code in MQL block?
PostPosted: Wed Jun 27, 2012 2:59 pm 
Offline

Joined: Sun Jun 19, 2011 9:38 pm
Posts: 270
Which mql4 syntax will the MQL block accept when using the Advanced button? (This was my first attempt to use the MQL block, so I have almost no experience with it). Obviously, iCustom works when I use the Indicators button, so I can type iCustom in Advanced mode as well. Are there others not listed in the buttons?

Thanks again.

_________________
I'm not a programmer, but I play one on TV.


Top
 Profile  
 
 Post subject: Re: Non-indicator code in MQL block?
PostPosted: Sun Jul 01, 2012 9:59 pm 
Offline
Site Admin

Joined: Fri Oct 16, 2009 3:40 pm
Posts: 451
The way we test the code is creating a short ea with the code from the mql icon. Unfortunately this testing ea does not have the other functions from the full ea. This is the reason why you cannot call existing functions. You can call icustom or mql commands but not Molanis functions

Next release we will modify it to make it better.


Top
 Profile  
 
 Post subject: Re: Non-indicator code in MQL block?
PostPosted: Sun Jul 01, 2012 10:11 pm 
Offline

Joined: Sun Jun 19, 2011 9:38 pm
Posts: 270
I suppose one workaround would be to write an indicator, in TIB or MetaEditor, that tracks the same info; and then use iCustom from within the MQL icon to call the indi. This would have been one indi build instead of 20 copy, paste, and edits in my EA's mq4. Make that 60 due to 3 versions for different pairs. Next time perhaps.

_________________
I'm not a programmer, but I play one on TV.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

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