- Joined
- 6 October 2011
- Posts
- 109
- Reactions
- 134
@CNHTractor you can try this code, @Trav. code slightly modified for Norgate (NDU)
I emailed Norgate to query the difference between people have the .au suffix and other not ( that's me )
Maybe email them to get a quick answer
It should be showing the .au suffix there - it looks like we have a bug in that area.
For now, you should manually add ".au" to the end. We'll develop a fix and test it over the next week or so, and I'll let you know when that is released.
SectorIndexImported = Foreign(NorgateIndex +".au","C"); // Brings in sector index name XEJ, XMJ etc
AddtextColumn( NorgateIndex+".au", "Index")
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
_SECTION_BEGIN("EMA");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();
Buy = C > EMA( P, Periods );
Sell = C < EMA( P, Periods );
Buy = ExRem( Buy, Sell ); // Removes additional buy signals
Sell = ExRem( Sell, Buy ); // Removes additional sell signals
//Stale Stop
StaleStop = ROC(C,13)<0;
// data to plot the ribbon
Plot( 0.55, /* defines the height of the ribbon in percent of pane width */ "Ribbon",
IIf( StaleStop , colorYellow, colorGrey40 ), /* choose color */
styleOwnScale|styleArea|styleNoLabel, -1.0, 49);
SetForeign( "$XAO.au", True , True ); // I've used this for the new Norgate Updater (NDU) format
MAfilter = MA( C, 100 ); // 100 week lookback period
IndexBuyfilter = C > MAfilter; // Index Filter = ON: When the close is greater than the 100 week simple moving average the Index Filter is ON [trailing stop set to 20%] + [buy + sell signals generated]
IndexSellfilter = C < MAfilter; // Index Filter = OFF: When the close is less than the 100 week simple moving average the Index Filter is OFF [shortens trailing stop to 10%] + [only sell signals generated]
RestorePriceArrays( True ); // Restores original price and volume arrays after the call to SetForeign.
SetTradeDelays( 1, 1, 1, 1 ); // Trade delays FALSE, the delay is in the array
ts1 = 20; // Trailing stop one = set at 20% when the Index Filter is TRUE
ts2 = 10; // Trailing stop two = reduces to 10% when the Index Filter is FALSE
ts = IIf( indexbuyfilter , ts1 , ts2 ); // If the Index Filter is TRUE use (ts1) set at 20%, if the Index Filter is FALSE use (ts2) settings reduce Trail Stop to 10%
ApplyStop( stopTypeTrailing , stopModePercent , ts , exitatstop = 2 ); // Apply Stop = [ts] Trailing Stop [exitatstop = 2] means check High-Low prices but exit NEXT BAR on regular trade price.
highsinceBuy = HighestSince( Buy, High);
stoplevel = highsinceBuy * (100-ts)/100;
Plot( stoplevel, "Trailing Stop", colorAqua, styleLine );
Plot( highsinceBuy, "highsinceBuy", colorBrightGreen, styleDashed );
//Plot(HI, "100 week High", colorTurquoise, styleDashed);
PlotShapes( Buy*shapehollowUpArrow, colorWhite, 0, Low, -20 ); // Displays Buy up arrow on the signal bar
PlotShapes( ( Sell > 0 ) * shapeDownArrow, Coloryellow, 0, High, -40 ); // Displays Sell down arrow on the signal bar
PlotShapes( Ref( Buy, -1 ) * shapeHollowSquare, colorWhite, 0, O, 0, 0 ); // Displays a white square on the buy bar
PlotShapes( Ref( Sell, -1 ) * shapeHollowCircle, colorYellow, 0, O, 0, 0 ); // Displays a yellow circle on the sell bar
Righto I'm back with another piece of useless information for the AmiBroker users
One of favourite sites is Market Index which I find very useful to check out the latest announcements for stocks that I am interested in and you can link that directly to which code you have a chart open on to the web research panel....confusedwell let me try to explain a bit better with pictures
1 - I run a scan and a stock is suggested - in this case BVS
View attachment 104015
2 - I click on the stock and it opens in my chart window
View attachment 104016
3 - I want to view the latest announcements
a) I select New Web Research and Market Index web page is displayed with BVS already selected
View attachment 104017
View attachment 104018
What .... how did that happen .... Lets have a look see
4 - Select the following.......Tools - Customize - Web Pages
a) Delete the other pre loaded rubbish.....(well that is up to you)View attachment 104019
b) add the following
Now if you are still confused just put me on ignore and carry on....
@MovingAverage I am glad that you have found something useful mate.
I can help you with the Analysis window now and will investigate the Web research tab.
- Create new project -
- Open Analysis Window - File / New / Analysis- Create new Batch File that opens up on startup
- Setup your defaults - AFL formula / Filter Settings / Scan dates etc
- File / Save As / Analysis_Batch.apx
- File / New / Batch
- Insert Actions as per below ( change paths to suit )
View attachment 105809
- Open the schedule task ( Clock ) and configure as you would like it
View attachment 105812
The above loads my Norgate Data Updater which is optional
Some info here - http://www.amibroker.com/guide/h_batch.html
Hopefully you can have a go with the above, if you have any troubles let me know and we can figure it out.
Good Luck
Is there a way to save a setup
Quick question: Is there a way to save a setup.
Much thanks, with shortcuts will be quite workable@qldfrog an alternative solution to the one @Trav. has just given you. Now if I understand your question correctly, how to save a setup - let me explain the procedure that I carry out as I switch between strategies in a heartbeat.
Procedure to save a setup
(1) Load your [AFL] in a new analysis window & (2) when you have the "Analysis setting" as desired - navigate to the [menu bar] select [File] then select [Save as...] press “Save”. The "Analysis window project file" (APX) gets saved when you press “SAVE”, its that simple.
Important
Create a [New Folder] & rename it [APX folder] meaning all your (APX) files are in their own folder.
Make a shortcut on the menu bar
Another way of opening recently opened Analysis projects quickly is going to [File] - [Recent Files].
A better alternative
Place a shortcut to your (APX) files on the menu bar. How?, Via Tools - Customize - Commands - File - now you can drag and drop "Recent Files" to the menu bar to have quicker access to your (APX) files. I've renamed "Recent files" to [Exlpore] & [Hybrid Explore] or whatever name that has meaning to you. The (APX) files will automatically accumulate when a new (APX) file is opened.
From the menu bar
Open the (APX) directly from the menu bar drop-down list to load your (AFL) with all the preset settings & they should give you a pick list as below:
DailyQFDuc.apx
WeeklyQFDuc.apx
DailyVolatility.apx
SkateSystem.apx
How to place a shortcut of the (APX) files to the menu bar
Have a read here as it's explained succinctly: https://forum.amibroker.com/t/open-apx-file-from-an-already-open-analysis-window/7571 If I have missed the premise of the question the procedure might be helpful to someone else.
Skate.
Quick question, might be a repeat as i i ubt i am the only one:
When i open amibroker, i always open 2/3 analysis files apx..googling it was not very helpful, more exactly positive
Is there a way to save a setup.
As an IT guy, this is actually mindblowing that this is not present by default.shoukd have been from start and definitively by now more than a decade later
Saving user workspaces is basic ABC functionality.
Any way around?
Do you always reopen, reset windows as per wishes etc?
Many thanks
As for the answer, add a request aka join the queue, google search demonstrate how useful this has NOT been..very disappointing there
ideally open both a set of 4 layouts and as well 4 apx...I think that I might have lost a little in the translation from French to English but are you looking to have different layouts of charts in your workspace for each system.
If so maybe create some layouts as per below so when clicked they open up the appropriate charts for each system
View attachment 105846
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?