global variable - EasyLanguage Programming | futures io social day trading
futures io futures trading


global variable
Updated: Views / Replies:771 / 11
Created: by Chuck6475 Attachments:0

Welcome to futures io.

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

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

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

Reply
 
Thread Tools Search this Thread
 

global variable

  #1 (permalink)
Elite Member
Long Beach
 
Futures Experience: None
Platform: tradestation
Favorite Futures: ES
 
Posts: 11 since Dec 2015
Thanks: 3 given, 0 received

global variable

Global variables and TradeStation 9.5

I came across Eric Brown's post on Excel & Easy Language and used his template with some changes makes some daily constants ( about 100) available to an indicator I built.

It works great but each time I change the time interval it rereads the data from Excel and does its thing.

I was thinking about figuring out a way to read the data once, as it doesn't change in a day, to Global variable and then doing my thing from there. Is it worth the effort?

I'm not an Easy Language programmer but I can figure it out. I doubt anyone would be impressed by my code but it works.

I downloaded the Global Variable 2.2 stuff and have begun reading it. More Greek than English currently therefore the question, is it worth the effort?

Thanks in advance for your assistance.

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary


Chuck6475,

I am not sure how to answer if something is worth the effort without knowing what you'd gain by changing it or lose by leaving it the way it is.
So for now I'd say learning something new is most likely worth the effort, as it should develop your skill in EasyLanguage and might be helpful for you later.

On a separate matter it sounds like there are much simpler solutions to your problem than utilizing Global Variables. Why not just block the reload of the Excel data every time you switch the time frame?

Regards,

ABCTG

Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #4 (permalink)
Elite Member
Long Beach
 
Futures Experience: None
Platform: tradestation
Favorite Futures: ES
 
Posts: 11 since Dec 2015
Thanks: 3 given, 0 received


ABCTG View Post
Chuck6475,
.......
On a separate matter it sounds like there are much simpler solutions to your problem than utilizing Global Variables. Why not just block the reload of the Excel data every time you switch the time frame?

Regards,

ABCTG

I'm sure by my question you could tell that I'm a beginner at this, and I really appreciate you taking the time to reply to my question. Conceptually I totally agree, but I don't seem to understand enough about the structure of Easy Language to do it.

-- I put the reading of Excel data in a "ONCE...begin...end" statement, thinking it would only do it once. That didn't work the way I wanted. It appears to do it "ONCE" each time it is invoked (which does make sense) but did cause it to reread the Excel data each time the time interval was changed.

"Blocking the reload" was exactly what I wanted but didn't get. My assumption was that the variable data didn't persist and needed to regenerated each time, therefore I'd have to use Global variable to keep the data once I had loaded it.

It sounds like there is another way, that would be great. Can you point me in that direction? Thanks again.

Reply With Quote
 
  #5 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary

Chuck6475,

you are correct that the variables won't persist upon a symbol/time frame change and once would be re-executed with a change, too.
One idea would be to store a flag within a AppStorage dictionary as these will keep the values upon switching the time frame. So you could set the flag to true when the code is executed the first time and on every new reload check the value of the flag and block reading from Excel.

Regards,
ABCTG

Reply With Quote
 
  #6 (permalink)
Trading Apprentice
Onsala Sweden
 
Futures Experience: Intermediate
Platform: Multichart
Broker/Data: InteractiveBrokers, eSignal
Favorite Futures: OMXS30
 
Posts: 28 since Nov 2016
Thanks: 21 given, 1 received

Hello!

Isn't there any way to create any global variable directly in easylanguage without using the dll GlobalVariabel?
Is there any way to run a script once when a MC starts (not associated to any specific chart or scanner)?

Best regards
Shahram

Reply With Quote
 
  #7 (permalink)
Elite Member
Long Beach
 
Futures Experience: None
Platform: tradestation
Favorite Futures: ES
 
Posts: 11 since Dec 2015
Thanks: 3 given, 0 received

Global Variables and TS Easy Language

The easiest way to do global variables in TS Easy language that I found was using Global Dictionary. I haven't done it for awhile, so I won't try and explain it here. However it isn't that hard. No DLL needed.

Reply With Quote
 
  #8 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary

ShahramTor,

there is no such option in legacy Easylanguage and Object Oriented EasyLanguage (which is what the solution @Chuck6475 pointed out uses) is not available in Multicharts.

It will take some programming, but you could save a flag status on your hard disk or in memory when "when a MC starts" and runs your indicator. Then have this indicator (or other indicators) read the file/value from memory.

Regards,

ABCTG


ShahramTor View Post
Hello!

Isn't there any way to create any global variable directly in easylanguage without using the dll GlobalVariabel?
Is there any way to run a script once when a MC starts (not associated to any specific chart or scanner)?

Best regards
Shahram


Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #9 (permalink)
Trading Apprentice
Onsala Sweden
 
Futures Experience: Intermediate
Platform: Multichart
Broker/Data: InteractiveBrokers, eSignal
Favorite Futures: OMXS30
 
Posts: 28 since Nov 2016
Thanks: 21 given, 1 received

Hello and thanks for your answer,
I would like that MC run a script to login to a specific broker in Sweden, get session-id and save it into a variable which can be read from all other scripts in MC without using any extra DLL-files.
It seems that I would stop searching isn't it?

Regards


Sent from my iPad using futures.io

Reply With Quote
 
  #10 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary


ShahramTor,

I am not aware of a way to accomplish that in regular Multicharts without a DLL. This would be doable in Multicharts.NET.

Regards,

ABCTG


ShahramTor View Post
Hello and thanks for your answer,
I would like that MC run a script to login to a specific broker in Sweden, get session-id and save it into a variable which can be read from all other scripts in MC without using any extra DLL-files.
It seems that I would stop searching isn't it?

Regards


Sent from my iPad using futures.io


Reply With Quote
The following user says Thank You to ABCTG for this post:

Reply



futures io > > > > > global variable

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Global Variable 2.2 in MultiCharts? Masse MultiCharts 9 May 8th, 2016 06:26 AM
Global Variable allthewayne Elite Automated NinjaTrader Trading 16 May 11th, 2014 12:52 AM
Need little help/ Unable to access a global variable in custom method nemeis45 NinjaTrader 9 April 17th, 2014 11:15 AM
Using Global Variable string with Excel is causing problem arjfca MultiCharts 0 July 11th, 2013 07:02 PM
Is there a 64bit Global Variable replacement? Tarkus11 NinjaTrader Programming 4 March 16th, 2011 08:47 AM


All times are GMT -4. The time now is 01:29 AM.

Copyright © 2017 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
Page generated 2017-12-18 in 0.12 seconds with 19 queries on phoenix via your IP 54.92.201.232