This is how you do Global Arrays. - futures io
futures io futures trading



This is how you do Global Arrays.


Discussion in EasyLanguage Programming

Updated by LoboTrader
      Top Posters
    1. looks_one bjschwenzer with 2 posts (1 thanks)
    2. looks_two Jura with 1 posts (1 thanks)
    3. looks_3 LoboTrader with 1 posts (0 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 4,973 views
    2. thumb_up 2 thanks given
    3. group 1 followers
    1. forum 4 replies
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 100,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

This is how you do Global Arrays.

(login for full post details)
  #1 (permalink)
Cleveland, Ohio
 
 
Posts: 6 since Aug 2011
Thanks: 4 given, 1 received

Could you show how to create a Global array variable?
Also how to read the Global array variable in a different indicator or function.
Thank you

Look at my post below on how to do Global arrays.
Thank you

Reply With Quote

Can you help answer these questions
from other members on futures io?
Horizontal Line Indicator
Platforms and Indicators
Evening session trading
NinjaTrader
DLL with webrequest function for MC
MultiCharts
Times and Sales more data to be displayed
TradeStation
T​​​​​​radestation datafeed (real time and historical) to NT8
NinjaTrader
 
 
(login for full post details)
  #3 (permalink)
The Netherlands
 
Experience: None
Platform: MultiCharts, TradingView
Trading: ...
 
Jura's Avatar
 
Posts: 774 since Apr 2010
Thanks: 2,347 given, 685 received


I was wondering the same thing today Bjschwenzer- but as far as I know there is no such thing as a Global Array, not in MultiCharts itself and not in the ELCollections or ADE DLL's (according to their documentation).

I hope I'm mistaken since I'd also like to use global arrays.

Regards,
Jura

Reply With Quote
The following user says Thank You to Jura for this post:
 
(login for full post details)
  #4 (permalink)
Cleveland, Ohio
 
 
Posts: 6 since Aug 2011
Thanks: 4 given, 1 received


// Sending code.
// All these Globals demos are Indicators sample code.
// MultiCharts sent me the GlobalVariable.dll which is placed in the same directory the MultiCharts.exe is in. Most likely it is C:\Program Files\TS Support\MultiCharts
// This is the Sending of the array data part. How to pass Global array data below.
Arrays:Arr_InitialData[50](0);// Declare array size 51 for array[0-50]. Arrays start with 0 and declared 50 is the max array number.
Vars:x(0);// Declare For loop variable is x starting with value 0.
Forx=0to50begin
Arr_InitialData[50]=x;// I am loading the array with numbers from 0 to 50.
// This creates global variables from "G_Arr0" to "G_Arr50" to pass the data globally.
// Yes the global variable is not an array but by creating 51 unique global variable names the data can be passed.
save_global_data(symbolname,ADE.BarInterval,ADE.BarID,"G_Arr"+numtostr(x,0),Arr_InitialData[x]);
// ADE.BarInterval is for 15 minutes = 15, note: 15 seconds is also 15.
end;
// This is the Sending of the array data part. How to pass Global array data above.

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

// Receiving code.
// All these Globals demos are Indicators sample code.
// MultiCharts sent me the GlobalVariable.dll which is placed in the same directory the MultiCharts.exe is in. Most likely it is C:\Program Files\TS Support\MultiCharts
// This is the Receiving part of the array data. How to Receive Global array data below.
Arrays:Arr_ReceiveData[50](0);// Declare array size 51 for array[0-50]. Arrays start with 0 and declared 50 is the max array number.
Vars:x1(0);// Declare For loop variable is x starting with value 0.
Forx1=0to50begin
// This creates global variables from "G_Arr0" to "G_Arr50" to Receive the data globally.
// Yes the global variable is not an array but by creating 51 unique global variable names the data can be passed and received.
load_global_data(symbolname,ADE.BarInterval,ADE.BarID,"G_Arr"+numtostr(x1,0),Arr_ReceiveData[x1]);// ADE.BarInterval is for 15 minutes = 15, note: 15 seconds is also 15.
//load_global_data(symbolname, 15, ADE.BarID, "G_Arr" + numtostr(x1, 0), Arr_ReceiveData[x1]);
//load_global_data commented needs to have the sending bar time, so if this chart is 5 minutes and the sending chart is 15 you need to use the commented above one.
// ADE.BarInterval is for 15 minutes = 15, note: 15 seconds is also 15.
// One strange thing about globals is when sending from one graph to two other graphs. If you want two graphs to received array data create a second unique variable name for teh 2nd receiving graph..
end;
// This is the Receiving part of the array data. How to Receive Global array data above.

Reply With Quote
The following user says Thank You to bjschwenzer for this post:
 
(login for full post details)
  #5 (permalink)
Karlsruhe, Germany
 
Experience: Advanced
Platform: NinjaTrader & Metatrader
Broker: IB , TaiPan
Trading: Shares & ETF at the US and EU , some MNQ & MES
 
LoboTrader's Avatar
 
Posts: 27 since Nov 2011
Thanks: 228 given, 13 received

 
Code
load_global_data(......)
save_global_data(....)
Hello

was searching for this code (save/load) but w/o success .

Could somebody give me a hint ?

Thx

Lobo

Do not trade alone
Follow me on Twitter Visit my Facebook Reply With Quote


futures io Trading Community Platforms and Indicators EasyLanguage Programming > This is how you do Global Arrays.


January 26, 2012


Upcoming Webinars and Events
     



Copyright © 2020 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts