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 Mon May 13, 2024 12:46 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Variable
PostPosted: Wed Sep 12, 2012 2:15 pm 
Offline

Joined: Wed Sep 12, 2012 2:05 pm
Posts: 1
How can I create a variable equal to the close of the completed bar ?


Top
 Profile  
 
 Post subject: Re: Variable
PostPosted: Tue Sep 18, 2012 9:20 am 
Offline
Site Admin

Joined: Fri Oct 16, 2009 3:40 pm
Posts: 451
If you always want the close of the completed/previous bar just use close with shift 1. If you want to get the close at a certain point in time (just get the value once), it is not possible.


Top
 Profile  
 
 Post subject: creating variables
PostPosted: Fri Jan 18, 2013 5:35 pm 
Offline

Joined: Fri Feb 04, 2011 9:48 pm
Posts: 114
Location: Canada
Hi

How do create a variable in MT4?

I went to the show/hide variables block, entered the name of the new variable, pressed add variable and nothing happened. Is there something I am missing?

_________________
Building a future with automated trading


Top
 Profile  
 
 Post subject: Re: Variable
PostPosted: Fri Jan 18, 2013 8:20 pm 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
The variable should be there. Please take a look at the examples pages - the examples at the bottom use variables. You can see there how it looks.

One thing to consider is that if the variable is not used in a TA+ it won't be created in the ea. So you can create variables but if you do not use them they won't be in the generated code.


Top
 Profile  
 
 Post subject: Re: Variable
PostPosted: Sat Jan 19, 2013 12:24 am 
Offline

Joined: Fri Feb 04, 2011 9:48 pm
Posts: 114
Location: Canada
I restarted my computer and went back tried the same thing: typed in name of new variable, pressed "Add Variable" and now it works.

I might have a bug or a virus in my system or something, don't know.

Thanks for your help

_________________
Building a future with automated trading


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