Global Variable

Questions about MultiCharts and user contributed studies.
nvitale
Posts: 15
Joined: 04 Jun 2011
Location: London
Has thanked: 1 time
Contact:

Global Variable

Postby nvitale » 05 Jun 2011

Hi all,

is there a way to use global variable in MultiCharts? My goal is to remember some states in my automate but it seems that everything is forgotten at each bar processing. Is it true?

Thanks and regards.

escamillo
Posts: 197
Joined: 25 Mar 2011
Has thanked: 22 times
Been thanked: 55 times

Re: Global Variable

Postby escamillo » 05 Jun 2011

it sounds like you might want IntraBarPersist

google the word IntrabarPersist for some references that will give you a start and perhaps help you to determine if that is what you are looking to do, which is save variable values tick by tick.
These users thanked the author escamillo for the post (total 2):
Stan Bokovnvitale

User avatar
TJ
Posts: 6520
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 957 times
Been thanked: 1883 times

Re: Global Variable

Postby TJ » 10 Jun 2011

nvitale wrote:Hi all,

is there a way to use global variable in MultiCharts? My goal is to remember some states in my automate but it seems that everything is forgotten at each bar processing. Is it true?

Thanks and regards.


Your description is very vague.
You need to give more information and more specific on what you want to do...

nvitale
Posts: 15
Joined: 04 Jun 2011
Location: London
Has thanked: 1 time
Contact:

Re: Global Variable

Postby nvitale » 11 Jun 2011

Thanks Escamillo.

What is vague in "global variable" term?

An automate can be based on a sequence of event. You need to know what happened in the past to be able to take a decision know.

Let's give a very simple exemple. My automate needs to take different decision according the state it is now. We have a range market state, a long market, and a short. Let's say we detect the change of state based on successful serie of events.

In any classical platform, I can set some global/static variables to true when an event is detected. At each bar, I detect events on this new bar and if I realized all events are "true", I change my state.

If I do not have access to that, I need at each new bar to go back and check for all previous bar if event was detected or not. Often more complicated and speed killing.

That was just an exemple. I can store number of position opens before, or whatever else.

User avatar
TJ
Posts: 6520
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 957 times
Been thanked: 1883 times

Re: Global Variable

Postby TJ » 11 Jun 2011

nvitale wrote:Thanks Escamillo.

What is vague in "global variable" term?
....


Because the term "global variable" can mean different things to different people.

1. There is no defined term called "global variable" in EasyLanguage.

2. There is a 3rd party add-on called "global variable".

3. In some software, "global variable" refers to a value that can be passed between charts or indicators, or between classes, or objects.

escamillo
Posts: 197
Joined: 25 Mar 2011
Has thanked: 22 times
Been thanked: 55 times

Re: Global Variable

Postby escamillo » 12 Jun 2011

.


Return to “MultiCharts”