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 Sun May 19, 2024 11:20 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Creating a spread Indicator
PostPosted: Sat Feb 13, 2010 4:54 pm 
Offline

Joined: Sat Feb 13, 2010 4:42 pm
Posts: 1
Could anyone help with a spread indicator. I am trying to create an indicator that calculates the different prices between 2 markets. This indicator takes the closing value of the GBPUSD minus the EURUSD. Can the below code be modified to accomplish this.

Thank you,

Chris


//--------------------------------------------------------------------

//Main Calculation;
ExtMapBuffer0[i]=Close[i]-Close[i];


Top
 Profile  
 
 Post subject: Re: Creating a spread Indicator
PostPosted: Sat Feb 13, 2010 6:55 pm 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
For indicators you use Close[] - Series array that contains close prices for each bar of the current chart. You can't compare different graphs here. You need to code it in the EA with iClose.

Molanis Team


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 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