Could you @portfoliobuilder kindly let me know if your code in the link is the full code or partial code? I copied/modified it and was not able to produce any results, it was blank with only the column names after I press "explore". I know I need to learn a lot more, can anyone please kindly help?
Example codes are in the manual that I provided links to.
In newest AmiBroker (>6.40) you can use sequence to automate scan and exploration runs necessary to first calculate multiple security stats and later display them.
Press "SEQUENCE" button in the Analysis window to run the code below.
#pragma sequence(scan, explore)
Version(6.40);
if( GetOption("PadAndAlignToReference") == False ) Error("This code must be run with Pad and Align turned ON");
if( status("action") == actionScan )
{
if( status("stocknum") == 0 )
{
// remove any earier composite values
StaticVarRemove("~Composite");
}
StaticVarAdd( "~Composite", C>100 );
_exit();
}
Filter = Status("stocknum") == 0;
SetOption("NoDefaultColumns", True );
AddColumn( DateTime(), "Date/Time", formatDateTime );
AddColumn( StaticVarGet("~Composite"), "Count" );
Yes Tomasz, that's what I wanted to do, thank you so much.
By the way, could you please explain to me why Pad and Align needs to turn on? What happen if I use N-Bar Stop, how can I identify the artificially added bars and discount them when applying N-Bar stop? Thank you again!
@Tomasz, this GetOption() fieldname seems not to be documented in the 6.90 help files (for now I only installed the 32-bit version). It is only in the release notes.