[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FW: [amibroker] Digest Number 8203



PureBytes Links

Trading Reference Links

Title: AmiBroker User's List

Hello,

 

I sent erroneously, and separately within the last days, 2 posts on the same topic : how to mix intrady and EOD data on Amibroker ? I noticed that on today’s posts, where Tomasz replied on the first one. Please kindly delete the second post, which will not bring anything new on this.

 

Thank you,

 

Carl Vanhaes

 


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]
Sent: Tuesday, September 16, 2008 9:40 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Digest Number 8203

 

Messages In This Digest (6 Messages)

Messages

1.

Analysis.RangeFromDate - defines "From" date

Posted by: "marketmonk777" RedEyes777@xxxxxxxxx   marketmonk777

Mon Sep 15, 2008 11:36 pm (PDT)

Hi,

Can someone provide an example on how I would use this property in a scan?

I would like to hard code in a date in which to run a scan from
(locate signals from that date forward).

And this can be used from within AFL right?

Regards,

MM

2a.

you can write AFL functions that will perform matrix operations. I think
Fred did it in the past and have posted it here before.
also you can use the recently uploaded R-Maths to do it (I havent checked
but I would think so). Of course a dll is also possible. I have written a
dll that does a number of matrix operations in the past. It is just a
function that you can call within AFL just like any native AFL functions.
/Paul.

_____

From: amibroker@xxxxxxxxxps.com [mailto:amibroker@xxxxxxxxxps.com] On Behalf
Of Elizabeth Kennedy
Sent: Tuesday, 16 September 2008 1:22 PM
To: amibroker@xxxxxxxxxps.com
Subject: [amibroker] Question for Tomasz re: Matrices, vectors and complex
numbers

Dear Tomasz,

I would appreciate if you could let me now the following.

I have a working C++ code (give by a friend of mine) which uses of matrices,
vectors and complex numbers. As I understand AFL does not handle them.

So my intention is to pay someone to write a DLL for me so that DLL will
make use of the matrices etc outside of AMI and return the calculated values
to AMI.

So my question is whether this is even possible in the first place - any
direction on this would be greatly appreciated.

By the way C++ code I have contain statements like:

#include <vector>

#include <complex>

using namespace std;

typedef complex<double> COMPLEX;

:

vector<double> InverseMatrix( vector<double> M, const long n )

:

void DFit( const vector<double> &values, const long &

vector<double> &amplitudes, vector<double> &phases )

Thanks again

Liz

2b.

Re: Question for Tomasz re: Matrices, vectors and complex numbers

Posted by: "Tomasz Janeczko" groups@xxxxxxxxxxxxx   amibroker

Mon Sep 15, 2008 11:54 pm (PDT)

Hello,

Sure it is possible. The API docs are here:
http://www.amibroker.com/devlog/2006/12/15/amibroker-development-kit-adk-for-cc-now-available-to-everyone/

There is also 3rd party DLL that allows some matrix / table functionality with full source files,
so you can take it as "how-to" example/
http://www.amibroker.org/3rdparty/OSAKA_105s.zip

You may take a look at RMath
http://finance.groups.yahoo.com/group/amibroker/message/129238
http://finance.groups.yahoo.com/group/amibroker/message/129240

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: Elizabeth Kennedy
To: amibroker@xxxxxxxxxps.com
Sent: Tuesday, September 16, 2008 5:22 AM
Subject: [amibroker] Question for Tomasz re: Matrices, vectors and complex numbers

Dear Tomasz,

I would appreciate if you could let me now the following.

I have a working C++ code (give by a friend of mine) which uses of matrices, vectors and complex numbers. As I understand AFL does not handle them.

So my intention is to pay someone to write a DLL for me so that DLL will make use of the matrices etc outside of AMI and return the calculated values to AMI.

So my question is whether this is even possible in the first place - any direction on this would be greatly appreciated.

By the way C++ code I have contain statements like:

#include <vector>

#include <complex>

using namespace std;

typedef complex<double> COMPLEX;

:

vector<double> InverseMatrix( vector<double> M, const long n )

:

void DFit( const vector<double> &values, const long &

vector<double> &amplitudes, vector<double> &phases )

Thanks again

Liz

3a.

Help needed with simple Lowest or LLV afl code

Posted by: "imorf69" imorf69@xxxxxxxxxxxx   imorf69

Mon Sep 15, 2008 11:49 pm (PDT)

Hi all,
I have been trying *unsuccessfully* to generate the all time low Close
and the date it occurred on using either the Lowest(Close) or
LLV(Close, BarCount) function.
The two specific problems I am having is that;

1) the lowest value is not always the all time low but the low up
until the vertical line select is set if I have clicked somewhere on
the chart. If I move that line manually by clicking on the chart the
low changes, so it may be correct or it may not depending on the price
history.

2) I am using the ValueWhen function to give the date when the lowest
or LLV array is satisfied, however it seems to only produce the date
that the vertical line select is currently sitting at, even if the
lowest price is correct the date is always wrong unless I were to
manually click on that exact date that the low occurs on.

So how can I separate the output of these functions from the select
chart vertical line so it gives me the all time lows/dates of the
entire chart (whether it is all visible or not) independent of where I
am clicking in the chart? Is this even possible?

Below is my test code: (some alternative lines are commented out)

Lowest_Close = Lowest(Close);
//Lowest_Close = LLV( Close, BarCount );
//L_date = ValueWhen(LLV( Close, BarCount ), DateTime(),1);
L_date = ValueWhen(Lowest(Close), DateTime(), 1);
Lowest_date = NumToStr( L_date, formatDateTime);
Title = Name() + ": Total bars " + BarCount + " Low = " + Lowest_Close
+ " on " + Lowest_date;

Hopefully someone can point out what is wrong here......

3b.

Re: Help needed with simple Lowest or LLV afl code

Posted by: "Graham" kavemanperth@xxxxxxxxx   kavemanperth

Tue Sep 16, 2008 12:01 am (PDT)

try this to find the lowest close for entire history

Lowest_Close = lastvalue( Lowest(Close) );
L_date =lastvalue( ValueWhen( Lowestbars(Close)==0, DateTime(), 1) );
Lowest_date = NumToStr( L_date, formatDateTime);
Title = Name() + ": Total bars " + BarCount + " Low = " + Lowest_Close
+ " on " + Lowest_date;

--
Cheers
Graham Kav
AFL Writing Service
http://www.aflwriting.com

2008/9/16 imorf69 <imorf69@xxxxxxcom.au>:
> Hi all,
> I have been trying *unsuccessfully* to generate the all time low Close
> and the date it occurred on using either the Lowest(Close) or
> LLV(Close, BarCount) function.
> The two specific problems I am having is that;
>
> 1) the lowest value is not always the all time low but the low up
> until the vertical line select is set if I have clicked somewhere on
> the chart. If I move that line manually by clicking on the chart the
> low changes, so it may be correct or it may not depending on the price
> history.
>
> 2) I am using the ValueWhen function to give the date when the lowest
> or LLV array is satisfied, however it seems to only produce the date
> that the vertical line select is currently sitting at, even if the
> lowest price is correct the date is always wrong unless I were to
> manually click on that exact date that the low occurs on.
>
> So how can I separate the output of these functions from the select
> chart vertical line so it gives me the all time lows/dates of the
> entire chart (whether it is all visible or not) independent of where I
> am clicking in the chart? Is this even possible?
>
> Below is my test code: (some alternative lines are commented out)
>
> Lowest_Close = Lowest(Close);
> //Lowest_Close = LLV( Close, BarCount );
> //L_date = ValueWhen(LLV( Close, BarCount ), DateTime(),1);
> L_date = ValueWhen(Lowest(Close), DateTime(), 1);
> Lowest_date = NumToStr( L_date, formatDateTime);
> Title = Name() + ": Total bars " + BarCount + " Low = " + Lowest_Close
> + " on " + Lowest_date;
>
> Hopefully someone can point out what is wrong here......

4a.

Re: Daily system as a filter for intraday system

Posted by: "Edward Pottasch" empottasch@xxxxxxxxx   ed2000nl

Tue Sep 16, 2008 12:22 am (PDT)

hi James,

what you need to do is use the same timeframes in the Buy/Sell equations.

So for instance you are working in the 1-minute time frame then you define your daily constraints as:

// set timeframe
TimeFrameSet( inDaily );
emaDaily = EMA(C,50); buyDaily = C > emaDaily;
// restore to current time frame
TimeFrameRestore();

// expand the Daily timeframe array to the timeframe you are using currently
buyDaily = TimeFrameExpand( buyDaily, inDaily );

// now you can use this array in your buy/sell constraints
Buy = Cross (High, BuyUpper) AND buyDaily;

regards,Ed

----- Original Message -----
From: James
To: amibroker@xxxxxxxxxps.com
Sent: Monday, September 15, 2008 11:16 PM
Subject: [amibroker] Daily system as a filter for intraday system

I would like to test using a daily system as a filter for an intraday system so that long positions are only taken if the daily system is long and vice-versa.
I understand the set time frame aspect, what I don't understand is how to set the daily system's position as a condition. See AFL thought illustration in red below. Could someone point me in the right direction.

Buy = Cross (High, BuyUpper) AND (Daily system is long);
Sell = Cross (StopLower, Low);
Short = Cross (SellLower, Low) AND (Daily system is short);
Cover = Cross (High, StopUpper);

Thank you,
James

Recent Activity

·                                  45

·                                  1

Visit Your Group

Yahoo! News

Odd News

You won't believe

it, but it's true

Yahoo! Finance

It's Now Personal

Guides, news,

advice & more.

New web site?

Drive traffic now.

Get your business

on Yahoo! search.

Need to Reply?

Click one of the "Reply" links to respond to a specific message in the Daily Digest.

Create New Topic | Visit Your Group on the Web

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html

__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___