Australian (ASX) Stock Market Forum

How is ASX data imported into Amibroker?

This is wrong! Do you read the code? Lastbartimeleftrt is not based on pc clock!
"Status( "lastbartimeleftrt" ) to use datetime of last update sent by data source instead of current local time."

And interval() - lastbartimeleftrt == 0 starts event at new bar.

This is one part of one of YOUR quotes: 'on new 5 min bar do this'.
And that's what the example is doing.

Uhm, it is in NT and if your truly in real time they should be the same.

How are you going to handle tick charts - that's what I work with ?
 
No i use NT, a tool more suited to this particular task.

Your opinion.
So you can program your system ideas used for auto-trading on your own? In your previous post you made it look like you can't. So how would you know what is suited for a task and what is not? How can NT be better suited for portfolio trading if it can not do portfolio trading but AB can. Just one example.
 
Your opinion.
So you can program your system ideas used for auto-trading on your own? In your previous post you made it look like you can't. So how would you know what is suited for a task and what is not? How can NT be better suited for portfolio trading if it can not do portfolio trading but AB can. Just one example.

30 years in IT, ex architect, 5 years AB experience, 18 months with NT - just a shot in the dark really.
 
30 years in IT, ex architect, 5 years AB experience, 18 months with NT - just a shot in the dark really.

So how do you auto-trade your system? And how do you auto-trade portfolios ins NT?
You could program them yourself - but were traders here are we not ?
In your upper quote you made it looked like you don't auto-trade your system ideas because of not being a programmer?

5 years AB experience but not knowing basics? Hm...
 
So how do you auto-trade your system? And how do you auto-trade portfolios ins NT?

In your upper quote you made it looked like you don't auto-trade your system ideas because of not being a programmer?

5 years AB experience but not knowing basics? Hm...

Give me strength.

My involvement in this discussion ends right here.
 
You could program them yourself - but were traders here are we not ?

Just a short addition to make it more clear what bugs me as your argument doesn't make much sense to me and rather is a contradiction. You said that you would need to program but don't wanna program because of being a trader. So a trader is a trader and a programmer is just a programmer? So it is just black and white but no middle there? But would an auto-trader be able to auto-trade if he can not or don't want to program? 100% not. It would become just a big failure. So there is the contradiction. It makes no sense to say we are traders but no programmers because a system trader needs to be able to program. Anything different is just a funny story. You could ask another person to code it but who wants to share his system idea with another person? I would go so far to say that someone who can't program or is not willing to program his (auto-)trading system does not have a valuable system idea in mind anyway. So only in that case (giving away an non valuable system idea) it would not be the world's end to contact a programmer doing the job.
 
30 years in IT, ex architect, 5 years AB experience, 18 months with NT - just a shot in the dark really.

And can't come up with 2 lines?

Sorry I forgot ... we are traders so we can't.

Code:
// Example first tick on new bar
// working with setting "time of first tick inside bar" or "start time of interval" on tick charts
tn = TimeNum();

if( tn[BarCount-1] != StaticVarGet( "LastBarTimeNum" + NumToStr( GetChartID(), 1, False );  ) )
{
    // do something

    Say( "New Bar" );

    StaticVarSet( "LastBarTimeNum" + NumToStr( GetChartID(), 1, False ), tn[BarCount-1] );
}
 
After a little bit of playing around here is a final AFL function version. It should work with any start time input even if start time does not exist for the particular symbol. So it behaves the same way as deFlagFirstBarOfDay( starttime ) of plugin deDateTime http://www.amibroker.org/3rdparty/. Test and report back.

Code:
// by joshsmi, 2014

SetBarsRequired( 1000, 1000 );

function FlagStartOfSession( starttime )
{
    tn = TimeNum();
    dom = Day();

    newday      = dom != Ref( dom, -1 );
    newdaytn    = ValueWhen( newday, tn );
    strttimetn  = Nz( ValueWhen( tn == starttime, tn ) );
    starttime   = Max( newdaytn, strttimetn );

    startcond   = tn >= starttime;
    startperiod = startcond != Ref( startcond, -1 );
    newperiod   = IIf( starttime == newdaytn, newday, startperiod AND startperiod != newday );

    return newperiod;
}

starttime   = 090000; // example 9 o'clock

Plot( FlagStartOfSession( starttime ), "", colorRed, styleHistogram | styleOwnScale );


For comparison
Code:
newsession = deFlagFirstBarOfDay( starttime );
Plot( newsession, "", colorOrange, styleHistogram | styleOwnScale );
 
Here is another fix/improvement of one line. See bold line.

Code:
// by joshsmi, 2014

SetBarsRequired( 1000, 1000 );

function FlagStartOfSession( starttime )
{
    tn = TimeNum();
    dom = Day();

    newday       = dom != Ref( dom, -1 );
    newdaytn     = ValueWhen( newday, tn );
    starttimetn  = Nz( ValueWhen( tn >= starttime, tn ) );

    startcond    = tn >= starttime;
    [b]starttime    = ValueWhen( startcond, Max( newdaytn, starttimetn ) );[/b]
    startperiod  = startcond != Ref( startcond, -1 );

    newperiod    = IIf( starttime == newdaytn, newday, startperiod AND startperiod != newday );

    return newperiod;
}

starttime   = 090000; // example 9 o'clock

Plot( FlagStartOfSession( starttime ), "", colorRed, styleHistogram | styleOwnScale );

BTW, the advantage of this function over deFlagFirstBarOfDay function of that 3rd party plugin deDateTime is that it allows array input for starttime. I'm stopping it now as I think it is a little bit off-topic here. :)
 
Top