Difficulties in using Amibroker

KelvinHand

Well-Known Member
#21
Thanks Kelvin, you are always so supportive. I got it. Previous day, so the "-". But is there any other way to write this code more efficiently? I am learning it from all of you.

Sudip
Read this condition
Filter only when Close Break [Above/Below] Previous Close by 5% AND Volume must be >=AvgVol by 1.5 times


Code:
C1 = Ref(C,-1);
AV = V/MA(V,10);
Filter=(C>=C1*1.05 OR C<=C1*0.95) AND AV>=1.5;

AddTextColumn(Name(), "SYMBOL");
AddColumn(DateTime(), "DATE", formatDateTime,colorBlue);

AddColumn(C, "Close", 1.2);
AddTextColumn(WriteIf(C>C1,"Above", "Below"), "Break", 1,   colorBlack,IIf(C>C1,colorBrightGreen,colorRed),50);
AddColumn( C1, "Previous Close", 1.2, colorDefault, colorDefault, 50);

AddColumn( 100.0*abs(C-C1)/C1, "%Change", 1.2);
AddColumn(V/1000, "Volume(K)", 1);
AddColumn(AV, "Average Volume", 1.1);
 
Last edited:
#22
Thanks again, Kelvin. Your code appears neat and so is the output. Defining two variables at the begining has made the code neat. Use of WriteIf has changed the output. I will try to use this lesson in my other experiments with afl.

Now please tell me one thing. One may want to change filtering criteria during exploration, say AV>= 2 instead of 1.5 or 10% price change instead of predifined 5. This can certainly be done by editing the code. But is it possible to do on the fly? Like changing parameter, if one be applied to each of them. I am just developing a new concept. If you confirm the possibility then I will try to write one myself. And I will post my effort for your review.

Sudip
 
Last edited:

KelvinHand

Well-Known Member
#23
Thanks again, Kelvin. Your code appears neat and so is the output. Defining two variables at the begining has made the code neat. Use of WriteIf has changed the output. I will try to use this lesson in my other experiments with afl.

Now please tell me one thing. One may want to change filtering criteria during exploration, say AV>= 2 instead of 1.5 or 10% price change instead of predifined 5. This can certainly be done by editing the code. But is it possible to do on the fly? Like changing parameter, if one be applied to each of them. I am just developing a new concept. If you confirm the possibility then I will try to write one myself. And I will post my effort for your review.

Sudip
Use Param().
 

mastermind007

Well-Known Member
#28
Did you know? you can use Metastock data in Ami simultaneously?
Simultaneously? How? Please share what you've done.

I store EOD data in MWD format and use the same file/folders from about 6 different places but I never have more than one app read about same scrip. It ends up corrupting data file.
 

4candles

Well-Known Member
#29
Simultaneously? How? Please share what you've done.

I store EOD data in MWD format and use the same file/folders from about 6 different places but I never have more than one app read about same scrip. It ends up corrupting data file.
MM007

Among many interesting features Ami has one more feature... a Metastock Data Plugin that helps retriving data from Metastock. Every time you update Metastock data you can use the same in Amibroker(it is a one time setup). I use it for EOD only & I do not know about its Intraday performance.

Its simple....I am sure you wont need elaborate explanation.

Detailed setup is explained in AB help. Search by keying in " Metastock"
and select - 'How to use AmiBroker with external data source (Quotes Plus, TC2000/TCNet/TC2005, FastTrack, Metastock)'.

But remember one thing when ever there is a symbol change/update you have to use the retrive symbols feature from the plugin.

Regards
 

mastermind007

Well-Known Member
#30
MM007

Among many interesting features Ami has one more feature... a Metastock Data Plugin that helps retriving data from Metastock. Every time you update Metastock data you can use the same in Amibroker(it is a one time setup). I use it for EOD only & I do not know about its Intraday performance.

Its simple....I am sure you wont need elaborate explanation.
That is exactly what I use and you are right. its fairly simple. I did not even have to look up any doco on how to use it.

I share same MWD format data with 3 different terminals. I did find out that Amibroker actually makes a local copy of
data but its transperant to user. For Intraday data, most plug ins provide data in Amibroker and it would
require inverse programming to get it to metastock or other terminal.

The question that I was asking here was what do I have to do if I want to open same file in different terminals. Meta stock locks the
file and any other s/w attempting to read while its open in MS will get either garbage data or File ERROR message.
 

Similar threads