The Downside Tasuki Gap seems to be what you were chasing. A fairly rare event on the day from what I have found. Code and example ....hi, im new to AB and im having some real trouble trying to code for the following.
I want to identify / be able to scan for when a stock gaps down (or up), on open and close back into the previous days range?
as per the following chart
can anyone at least point me in the right direction?
any help would be awesome
//Downside Tasuki Gap
MS = Ref(Close,-2)<Ref(Open,-2) AND Ref(Open,-1) < Ref(Close,-2) AND Ref(C,-1) < Ref(O,-1)
AND Open > Ref(C,-1) AND Open < Ref(O,-1) AND Close > O AND C > Ref(O,-1) AND C < Ref(C,-2);
Filter = MS>0.5;
AddColumn(MS, "Downside Tasuki Gap");
AddColumn(C, "close");
AddColumn(V, "Volume");
Hi,
This is driving me mad, can someone please explain why this isn't working!?
To explain I have a very simple system:
MAs = MA(C,20);
MAl = MA(C,50);
Buy = Cross(MAs,MAl);
Sell = Cross(MAl,MAs);
What I want to do is to stop issuing buy signals based on something else, ie, another filter, maybe when the market is a bear market.
So, my system would now look like this:
flagval = 0;
MAs = MA(C,20);
MAl = MA(C,50);
Buy = Cross(MAs,MAl) AND flagval = 1;
Sell = Cross(MAl,MAs);
Where the first variable 'flagval' changes from 0 to 1.
However, if I run the above code I still get the same number of buy signals.
Surely the above code should not give me any buy signals as flagval is always zero and my buy criteria is looking for flagval = 1.
What am I missing here?
Thanks
hi, im new to AB and im having some real trouble trying to code for the following.
I want to identify / be able to scan for when a stock gaps down (or up), on open and close back into the previous days range?
as per the following chart
can anyone at least point me in the right direction?
any help would be awesome
//This code will search for bars which gap and then close inside the previous
//bar. No copyright blah blah. Created by saiter, 2010.
_SECTION_BEGIN("Gaps");
//Switches
sUp = ParamToggle("Show Gap ups?", "NO|YES", 1);
sDown = ParamToggle("Show Gap downs?", "NO|YES", 1);
f0 = ParamList("Search for:", "Gap down|Gap up", 0);
//Create the arrays
gd=Null;
gu=Null;
//Search for the bars
for(i=1;i<BarCount;i++)
{
if(O[i]<L[i-1] AND C[i]>L[i-1] AND C[i]<H[i-1])
gd[i]=1;
else gd[i]=0;
if(O[i]>H[i-1] AND C[i]<H[i-1] AND C[i]>L[i-1])
gu[i]=1;
else gu[i]=0;
}
//Plot stuff
Plot(C,"Close", colorBlack, styleBar);
if(sDown)
PlotShapes(IIf(gd, shapeSmallCircle, shapeNone), colorRed, 0, L, -15);
if(sUp)
PlotShapes(IIf(gu, shapeSmallCircle, shapeNone), colorGreen, 0, H, 15);
//Filters
NumColumns=1;
if(f0=="Gap down")
Filter=gd;
if(f0=="Gap up")
Filter=gu;
_SECTION_END();
I'm trying to create a number of separate buy conditions, each with their own buyprice. Example:
buy=(close>X AND buyprice=X)
OR (close>Y AND buyprice=Y)
OR (close>Z AND buyprice=Z);
How do I do this? Basic stuff I'm sure, but a seach hasn't found anything yet. The idea is that the buyprice forces the backtesting to fire at a specific price, rather than ohlc. It works fine when I use one instance of buyprice, but not when using multiple instances.
for(i=0;i<BarCount;i++) //Loop through all the bars
{
if(Condition1) //1st buy condition
{
Buy[i] = 1; //Trigger a buy signal at THAT bar
BuyPrice[i] = C[i]; //The buyprice
}
if(Condition2) //Same as above, different conditions
{
Buy[i] = 1;
BuyPrice[i] = O[i];
}
}
Hi everyone,
I'm trying to write a code that uses less equity to trade when in drawdown...
so if I'm 10% down the system will only use 80% of the equity (from the previous peak).
Is drawdown a built-in function? I haven't been able to find it...
any suggestions?
Hi everyone,
I'm trying to write a code that uses less equity to trade when in drawdown...
so if I'm 10% down the system will only use 80% of the equity (from the previous peak).
Is drawdown a built-in function? I haven't been able to find it...
any suggestions?
Amibroker & Northgate/Premium ASX data
Currently a subscriber and was wondering can Amibroker Standard Edition handle the intraday snap shops offered by Premium.
Would like to be able to see a little more detail of market action that occurred during the day other than EOD OHLC.
Hi all
Does anyone know how to use the monte carlo analysis in AB?
Ie. when i "backtest" a system on all of the trades that would have occurred in all / any of the stocks that make up the say russell 3000 over the past 10 years, does that backtest result only give ONE course of action, or is it giving me the results of say 10,000 courses of action (or histories, or whatever the correct term is)?
I am assuming it is only the ONE as I am not seeing any standard deviations or confidence levels in the results summary.
1. please advise on whether this function exists
2. where such a fucntion can be located on the program
Cheers
ST
A free trial is available and I suggest you try that first to see if the software meets your needs. As noted many times before, correctly adjusted historical data is best to use but I get by using Yahoo with the knowledge that the data is not entirely accurate. Within the software is a configurable auto-downloader.I am new here, but I see all the recommendations for AMIBROKER, and I am considering getting a copy to help incease my trading abilities.
What is the best (free if possible ) way of downloading data for the Australian market. I am already with Commsec but what about yahoo finance. Any suggestions.
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?