- The charts AFLs are being run completely separately. Therefore what you calculate on the 1-min chart timeframe, will not be available on the 5-min, unless stored in a StaticVar
- RequestTimedRefresh(in1Minute, False); does nothing but requests the chart to be refreshed at least the period specified. The second paramter (False) makes sure that it is executed, even if the chart is not visible. (You put it after the SetForeign, it's not wrong but doesn't make sense from a flow of code perspective).
- For anything but 1-min you'll need to retrieve those StaticVars set in the 1-min.
So for the second comment:
if(Interval() == in1Minute) {
//SetBarsRequired(-2, -2);
RequestTimedRefresh(in1Minute, False); // This only requests the update, nothing else
// No need to switch timeframe here -- you are ALREADY running on a 1-minute TF (see interval check above)
// Do you calculation here
TimeStamptime = ....
// STORE that result
StaticVarSet("DB_1min_SPY", TimeStamptime);
} else {
// okay, this is run for all charts but 1-min
// retrieve what we store over the other chart
TimeStamptime = StaticVarGet("DB_1min_SPY");
// do more stuff...
}
For the first comment:
Time labels are synchronized when a 'foreign' symbol is requested, this ensures that any array operation you perform will make sense (ie. the timetamp of the two array actually match up in terms of datetimes).
Try using SetForeign("SPY", FixUp=False);
While I haven't used it personally, this should resolve the problem you are seeing.... Though, you are getting the values only, not sure how you'd access the actual timestamps for them? (anyone or support can help?)
__._,_.___
Posted by: gabor.s.kuti@gmail.com
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (4) |
Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
.
__,_._,___
EmoticonEmoticon