Australian (ASX) Stock Market Forum

AmiBroker Tips and Tricks

@Trav. Thanks so much! You're right - I had the pad and align on but the symbol was the default ^DJI instead of $XAO.au

Reading the Norgate Data Plugin - it's really smart. From what I understand, essentially they do copy the OHLC to the last day, but because the volume is 0, trades cannot be generated. Interestingly by turning padding/aligning OFF, this means that there are holes in the data yet signals are generated as it reads the 'most recent day/bar'.

However, it is worrying that AJM still popped up cause the universe was 'All Ordinaries' instead of 'All Ordinaries Current and Past'.
 
However, it is worrying that AJM still popped up cause the universe was 'All Ordinaries' instead of 'All Ordinaries Current and Past'.

AJM has been suspended from trading, not delisted. So it is correct for it to be in the current list of All Ords.

And yes, I've also fallen into this trap in Amibroker. It has one option for recent bar and one for recent day. But most recent day still picks up the last bar regardless of when it was.
 
Hi @Trav.
I've got a question for you. I've developed a custom Batch in AB. I was hoping that I could create a custom button in AB and link it to my batch to give me a simple click on the button to run the batch. This has me stumped and I've had a look around a few AB forums but can't seem to find out if this is possible and how to do it. Any ideas?
Thanks, MA
 
@MovingAverage no mate I have not done this before and having a quick look I found this thread that hints that it can be done, and he has linked a couple of other threads as well.


I will have a look to see if I can figure it out but the above is a good start. Hopefully someone else will jump in and offer a solution.

Cheers

Been trying this out @Trav. Seems that this is good for executable files (.exe. etc etc). AB's .abb files aren't executable so is a bit of a problem. Anyway, I'll continue to mess around and see what I can work out. Thanks
 
@MovingAverage another way could be like this....


1602497694167.png

some more info in the help file

1602497721068.png

Maybe one step closer to what you want.........

There is also another option of JavaScript which is used in the User Defined Tool which can be dragged and dropped onto your toolbar, but this is beyond me.

The first three defined tools reference the scripts below

1602497785917.png

1602497893166.png
 
@MovingAverage I just had another look at this and I have come up with 2 working options for you (if you already don't have one)

Option 1 - Simple and less sexy

Code:
if( ParamTrigger("batch", "Click here to run batch" ) )
{
    ShellExecute("runbatch", "C:\\Users\\*****your path *****\\Formulas\\Custom\\Batch Files\\Norgate_Batch.abb", "" ); // Add your path and batch file
}

1603188991019.png



Option 2 - Closer to what you are chasing

Code:
idMyButton = 2;

function CreateGUI()
{
GuiButton( "Run Batch", idMyButton, 10, 20, 100, 20, notifyClicked );
}

function HandleEvents()
{
    for ( n = 0;id = GuiGetEvent( n, 0 );n++ ) // get the id of the event
    {
        code = GuiGetEvent( n, 1 );

         switch ( id )
        {
             case idMyButton:
             ShellExecute("runbatch", "C:\\Users\\*****your path *****\\Formulas\\Custom\\Batch Files\\Norgate_Batch.abb", "" ); // Add your path and batch file
                break;

             default:
                 break;
        }
    }
}

CreateGUI();
HandleEvents();

1603189051678.png
 
@MovingAverage I just had another look at this and I have come up with 2 working options for you (if you already don't have one)

Option 1 - Simple and less sexy

Code:
if( ParamTrigger("batch", "Click here to run batch" ) )
{
    ShellExecute("runbatch", "C:\\Users\\*****your path *****\\Formulas\\Custom\\Batch Files\\Norgate_Batch.abb", "" ); // Add your path and batch file
}

View attachment 113456



Option 2 - Closer to what you are chasing

Code:
idMyButton = 2;

function CreateGUI()
{
GuiButton( "Run Batch", idMyButton, 10, 20, 100, 20, notifyClicked );
}

function HandleEvents()
{
    for ( n = 0;id = GuiGetEvent( n, 0 );n++ ) // get the id of the event
    {
        code = GuiGetEvent( n, 1 );

         switch ( id )
        {
             case idMyButton:
             ShellExecute("runbatch", "C:\\Users\\*****your path *****\\Formulas\\Custom\\Batch Files\\Norgate_Batch.abb", "" ); // Add your path and batch file
                break;

             default:
                 break;
        }
    }
}

CreateGUI();
HandleEvents();

View attachment 113457

You're a legend @Trav. ! Thanks for this. Option 2 is exactly what I want--this is a great solution.
 
I came across this article yesterday and it took a while to process in the old noggin but is definitively worth while having a look and incorporating into your system for a test.


I used the above to replace my index filter on the BUY & SELL side in my modified CAM strategy and while it didn't improve the system, it was a good idea to play around with just to learn a bit more about AddToComposite function

1605353873786.png

I substituted the following

xx=IsIndexConstituent("$RUA");

with

xx = InWatchListName( "All Ordinaries" );

or

xx= InWatchList(0);

1605358188705.png

Have fun
 
For those interested in volatility check out the following link, which has some code which you can play with

Also this is a great site and I recommend to add it to your favorites.

 
For the StockBee Market Monitor, you can also calculate the composites using StaticVarAdd. I use different stock list and don't know the exact color schemes that the blogger uses, but can generate a similar trend in breadth measures as he does.

stockbee explore.JPG
 
Traders often use a larger timeframe (weekly) to set the direction of a trade then use a smaller time frame (daily) to get an entry setup. Having to wait for the Friday close can be a pain when there's a good daily setup earlier in the week. How said that a week has to be Mon - Fri?

Is it possible to modify the display of the weekly charts in Amibroker to show the "week" as the prior five trading days. So, on a Wed the last "week's" bar would be the prior 5 trading days (Wed, Thurs, Fri, Mon, Tue). The last week's bar would show the Wed open, H+L of the prior 5 trading days and the Tue close. All prior weekly bars would have to be adjusted as well.

A little out of the box, but interesting.

Edit: Does anyone know of charting software that can display any timeframe bars, like 3 days data showing as one bar and then for a larger timeframe 8 days data showing as one bar. Can TradingView do this?
 
i think AB's default start of the week is sunday. i'm pretty sure this can be adjusted but it would change it for everything ... i think. some code could be used to only trade on certain days. you could also check for a certain day (mon, tues, wed, ... etc) and then do a calc of values based on that. i don't know if its possible to stitch it together for a candle though. if you don't need the visual of a candle, you could display the data in Explore in columns.

as for displaying any timeframe, i believe TradingView does. I gave it a go as I'm sure i've seen videos of people just typing in what they wanted. it wouldn't work for me because i have a free account. if you have a paid account, it shouldn't be a problem.
 
Is it possible to modify the display of the weekly charts in Amibroker to show the "week" as the prior five trading days. So, on a Wed the last "week's" bar would be the prior 5 trading days (Wed, Thurs, Fri, Mon, Tue). The last week's bar would show the Wed open, H+L of the prior 5 trading days and the Tue close. All prior weekly bars would have to be adjusted as well.

Some info below on how to change the default weekly setting

.

1605708400507.png
 
Top