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.
Global Variable
Re: Global Variable
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.
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.
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Global Variable
Your description is very vague.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.
You need to give more information and more specific on what you want to do...
Re: Global Variable
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.
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.
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Global Variable
Because the term "global variable" can mean different things to different people.Thanks Escamillo.
What is vague in "global variable" term?
....
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.