Easy getcandle question

Section for discussions related to indicators, use of indicators, and building of trading stategies using indicators.

Moderator: admin

Easy getcandle question

Postby futurenets » Wed Jun 19, 2013 5:30 am

can anyone describe what's happening (preferable with an example) in the following code.

s1, e1 = core.getcandle(source:barSize(), core.now(), 0, 0);
s2, e2 = core.getcandle("D1", core.now(), 0, 0);

Size1 = (e1-s1)*Period;
Size2 = (e2-s2)*365;
User avatar
futurenets
FXCodeBase: Initiate
 
Posts: 102
Joined: Mon Aug 02, 2010 2:00 am

Re: Easy getcandle question

Postby Apprentice » Sun Jun 23, 2013 1:51 pm

first line
returns the start and end date for the current candle

second line
returns the start and end date for the current day.

Size1 will have a length of Period Chart Candle
Size2 will have the length of 365 days...
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36476
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia


Return to Discussions

Who is online

Users browsing this forum: No registered users and 24 guests