Search the web
Sign In
New User? Sign Up
amibroker · AmiBroker User's List
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 143651 - 143680 of 144294   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries   (Group by Topic) Sort by Date ^  
#143651 From: "f8fcs" <nickdepeyster@...>
Date: Fri Nov 6, 2009 9:28 pm
Subject: Group info in AFL
f8fcs
Online Now Online Now
Send Email Send Email
 
Hi,

I am trying to use one formula file to generate multiple, distinct equity lines.
The idea is that I will just change the "apply to filter" in Automatic Analysis
and run the backtest while not changing the pointer to the formula file.  Each
time I run the backtest on a new filter group, I will create a new equity line
that has a label that reflects the group was being filtered for that particular
backtest.

So if I selected a group called "XYZ" for a formula file "ABC", on running the
backtest the equity line might be called "~~~EC_ABC_XYZ"

It is easy enough to create a custom-labeled equity line on a one-off basis, but
I want to make this more flexible by referencing whatever group I have decided
to filter with in Autmoatic ANalysis.  The article I used is here:

TO get this to work, I need to figure out how to obtain the name of the group
that is being filtered.  I tried Name(), CategoryGetName() etc and they don't
seem to give the right output.

#143652 From: "f8fcs" <nickdepeyster@...>
Date: Fri Nov 6, 2009 9:30 pm
Subject: setting automatic analysis filters programmatically
f8fcs
Online Now Online Now
Send Email Send Email
 
Is there anyway to set the "Apply to filter" group programmatically within AFL
rather than having to click the buttons in Automatic Anaysis?

#143653 From: "f8fcs" <nickdepeyster@...>
Date: Fri Nov 6, 2009 9:31 pm
Subject: Batch processing
f8fcs
Online Now Online Now
Send Email Send Email
 
I have a lot of strategies that I would like to run on a daily basis.  Is there
some sort of batch processor that I can set up to run them?

#143654 From: Herman <psytek@...>
Date: Fri Nov 6, 2009 10:24 pm
Subject: Re: How to use AUX1 and AUX2?
psytek2
Offline Offline
Send Email Send Email
 
OK, i think i know why the confusion: AUX1 and AUX2 are not formatted like a reserved word (like Close, Sell, etc) in the editor. They look like non-reserved words. However the syntax check does not flag them down as uninitialized variables so the are reserved variable names.

Is it possible to format/color them like other reserved keywords?



Many thanks,
herman





Tomasz Janeczko wrote:
They work the same as OHLCV arrays.
You can write to them, but what you write is NOT stored to database.
These are built-in price arrays and in order to protect from modifying quotes by mistake
you are writing to temporary runtime copies of OHLCVA1A2 arrays.
 
In order to actually write to database you need to use AddToComposite or COM or ASCII importer.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: Herman
Sent: Friday, November 06, 2009 8:08 PM
Subject: Re: [amibroker] How to use AUX1 and AUX2?

ahh, so they can't be assigned values, or be read, like we do OHLCVI fields? Thus, i gather, these fields cannot be used in a loop?

AUX1[b] = 999;
MyData = AUX[b]

I have a host of other uses, like storing real trade information so that these can easily be accessed and plotted - with having to compare DT all the time.

Thanks for the reply,
herman

Tomasz Janeczko wrote:
Hello,
Aux1 and Aux2 fields are intended to be used as:
1. Storage for extra quotation data such as bid/ask figures
2. Storage for other data such as trading volume expressed in dollars, volume-weigted average price, etc
3. Extra fields for AddToComposite/Foreign (use "1" field ID for aux1 and "2" for aux2 in Foreign/AddToComposite calls)
You can store values to those fields either using ASCII importer or
using OLE or using AddToComposite
Example:
AddToComposite( array, Name(), "1") ; // store array to aux1
Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- From: "Herman" <psytek@...>
To: <amibroker@yahoogroups.com>
Sent: Friday, November 06, 2009 7:04 PM
Subject: Re: [amibroker] How to use AUX1 and AUX2?
any AUX1 and AUX2 users out there?
As is often the case some very useful new features sit on the shelf for a long time before people start using them, simply because they are not documented for the simple user. Tomasz, please give a sales pitch as what we can do with the new array expansion - its a waste to let it go to waste :-)
herman
Herman wrote:
I can't find any examples on how to use the two new AUX1 and AUX2 fields. Can anyone give an example?
When working with the current ticker, how do i assign a value to one of these fields? How do i read it back?
Thanks,
herma
------------------------------------
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
Yahoo! Groups Links
------------------------------------
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
Yahoo! Groups Links

------------------------------------
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
amibroker-digest@yahoogroups.com amibroker-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/

#143655 From: "Bruce" <brucer@...>
Date: Sat Nov 7, 2009 12:03 am
Subject: Re: Batch processing
bruce1r
Offline Offline
Send Email Send Email
 
Nick -

I'll take this since I'm here and curious about something.  I saw that
Keith referred you to BoilerPlate.afl (thanks Keith) on AmibrokerU.  Did
you search for info about a "batch" manager and not find it there ?

I believe that I'm seeing a search issue on that site related to certain
article summary headers not being indexed and am looking into it.

Anyway, there is a article and video about Batman - a batch manager that
Fred Tonetti wrote some time ago.  It is in the Free Presentations menu
section under Free Library.  There is also a download link, although the
ZIP is also in the file group of this board.

It should do everything that you want and probably a little more.

-- BruceR

P.S. Also saw your note asking how to get the Watchlist name.  If I get
a chance later, I'll do a short article about a utility function I wrote
called GetFilter.afl that does that and some other things.  I never
thought anyone would need until now.


--- In amibroker@yahoogroups.com, "f8fcs" <nickdepeyster@...> wrote:
>
> I have a lot of strategies that I would like to run on a daily basis.
Is there some sort of batch processor that I can set up to run them?
>

#143656 From: "levibreidenbach" <levib1@...>
Date: Sat Nov 7, 2009 12:17 am
Subject: setOption("InterestRate")
levibreidenbach
Offline Offline
Send Email Send Email
 
Is it possible to set value for interest rate to  something that changes.  For
example my data has symbol for 3 month treasury yield.  Is there a way to set
interest rate to this?

Thanks

#143657 From: "paultsho" <paul.tsho@...>
Date: Sat Nov 7, 2009 12:39 am
Subject: Re: Biggest shortcoming of AFL scripting language
paultsho
Offline Offline
Send Email Send Email
 
If Tomasz was designing a new language, then this discussion might have been
fruitful. And I might even support one of the well thought suggestions. But the
simplifications suggested by scourt2000, modified by Mike and supported by
progster provide a very complex picture that frankly are a lot more confusing
and less functional than the 2 two functions StaticVarSet and StaticVarGet.
Let me explain what i mean. The declaration static in C++ and other language of
the same genre (java included) has two properties. First is Scope, Second is
persistance. In terms of scope, it is within either the function, the class or
file scope that it is declared. Outside of that it simply doesnt exist. The
Second property is persistance. static tells the compiler that the
variable/class member still holds its value even if controll is passed out of
scope. So the value persist next time when control is in scope again. Now Mike's
suggestion is about permission, which is third dimension and isnt a property of
static. It specify who/what has permission to acesss the variable's value but it
doesnt say anything about scope or persistence.  To cater for all of these, then
you must have something like this:
Global public static xyz;
Not only that, Global by default should not have anything bigger than a file
scope. So we need to define xyz as
Extern Global public static xyz if we want to access it from another file. Now
you might say you can simply it by excluding mutually exclusive combinations.
But That is where what we'll have to begin with.
AFL is a script language, it is not object oriented and there is no instance
that anything can be private to deny unauthorised access.
The original suggestions was ambiguous, the additional suggestion doesnt really
clarify that, but it does create another way to make it more complex, And to
make Mike and Scout's approach unambiguous we need to go the extent of Extern
Global public static..... and perhaps more.
On the other hand, StaticVarGet is a function which allow us to bypass these
problems. It also has two additional advantages
1. The argument, hence the variable in question, can be gotten through string
concatenations programatically.
2. The function can be accessed through dll - a big plus for portability and
versatility.
My conclusion is that StaticVarGet is still superior and easier to understand
than what were being suggested.
/Paul.
--- In amibroker@yahoogroups.com, "progster01" <progster@...> wrote:
>
> Mike,
>
> Very thoughtful commentary you've made, there's alot to agree with there (even
for those coming from C++ rather than Java).
>
> IMO, all the types of locality specifiers have their uses.  Having a few more
of them at our disposal would be great (carefully chosen by TJ to integrate
well, of course!).
>
> - Progster
>
>
> --- In amibroker@yahoogroups.com, "Mike" <sfclimbers@> wrote:
> >
> > I'd like to address what I see as a flaw in the logic of the original post,
as well as a suggestion to Tomasz's reply.
> >
> > There are perhaps more Java developers now than C++ developers. For the true
equivalent of StaticVarGet/Set, the Java keyword "public" would work very nicely
(as opposed to "shared").
> >
> > e.g. Java
> >
> > class MyClass {
> >   public static int a;
> >   ...
> > }
> >
> > e.g. AFL
> >
> > public static a;
> >
> > In Java, the variable "a" would be accessible as is (i.e. just by typing
"a") anywhere within its own class definition (i.e. the file), and in qualified
form outside of its class (e.g. MyClass.a).
> >
> > As Tomasz pointed out, the AFL declaration would be global and therefore
have no equivalent qualifier (i.e. no MyClass qualifier). I believe that that is
what would be the biggest source of confusion with what the original poster
suggested.
> >
> > Consider that:
> >
> > - In Java, when we write MyClass.a from within MyOtherClass, it is clear
that the static variable is coming from somewhere else (i.e. from the file
MyClass.java).
> >
> > - Similarly, using AFL's function call StaticVarGet, in a different file,
makes it clear that the variable is not necessarily local to the current file.
> >
> > Compare the above to the original poster's proposal of just using
> >
> > "a = 3" or "a"
> >
> > When "a" is referenced outside of the file that it was declared in, the
variable becomes ambiguous. Should it default to a new implicit, non static
variable as is the current behavior? Or, should it first try to resolve against
a static variable of that name? What happens when the user has set the option to
force all variables to be explicitly declared; Must the author redeclare the
static in every file that its referenced? Clearly, the proposal as originally
suggested is not sufficient.
> >
> > However, this weaknesses might be addressed by requiring the use of the
existing "global" keyword whenever a static is to be referenced outside of the
file in which it was declared.
> >
> > e.g.
> >
> > File1.afl
> > public static a; // Declared in File1.afl
> > a = 3;
> >
> > File2.afl
> > global static a; // Treat as having been declared somewhere else
> > x = a;
> >
> > This has the advantage of building upon the semantics of the existing
"global" keyword, while at the same time being compatible with the requirement
of explicit variable declarations.
> >
> > Going a step further, what I would really like to see is the introduction of
both "static" and "final" such that we can write our own procedures/functions
that accept constants just as AmiBroker itself has constants for
atcFlagDefaults, etc.
> >
> > e.g.
> >
> > File1.afl
> > public static final myInterestingValue = 0;
> > public static final myOtherValue = 2;
> >
> > procedure doSomething(value) {
> >   switch (value) {
> >     case myInterestingValue: ...
> >     case myOtherValue: ...
> >   }
> > }
> >
> > File2.afl
> > #include_once <File1.afl>
> > ...
> > doSomething(myInterestingValue);
> >
> >
> > We can do this now already. But, we have no way to protect against anyone
accidentally changing the value of myInterestingValue, myOtherValue.
> >
> > These two keywords would go a long way towards promoting more modular code
in larger coding projects.
> >
> > Mike
> >
>

#143658 From: "paultsho" <paul.tsho@...>
Date: Sat Nov 7, 2009 12:49 am
Subject: Way to control Available Cash without Custom Bactester
paultsho
Offline Offline
Send Email Send Email
 
Are there ways to control cash after a position is closed via sell, and not
applystop
e.g. If the sellprice is at the open, the cash is available to Buying on the
same day. But if the sell is at the close, the cash is not available until the
next day.
Looked at SetOption("ActivateStopsImmediately", true), it seems to work on stops
only.
Cheers
Paul.

#143659 From: Mark Hike <markhike@...>
Date: Sat Nov 7, 2009 2:26 am
Subject: Re: How to use AUX1 and AUX2?
sdkingman
Online Now Online Now
Send Email Send Email
 
You can make them reserved keywords easily if you use Notepad++ :-)

On Fri, Nov 6, 2009 at 5:24 PM, Herman <psytek@...> wrote:
 

OK, i think i know why the confusion: AUX1 and AUX2 are not formatted like a reserved word (like Close, Sell, etc) in the editor. They look like non-reserved words. However the syntax check does not flag them down as uninitialized variables so the are reserved variable names.

Is it possible to format/color them like other reserved keywords?



Many thanks,
herman







Tomasz Janeczko wrote:
They work the same as OHLCV arrays.
You can write to them, but what you write is NOT stored to database.
These are built-in price arrays and in order to protect from modifying quotes by mistake
you are writing to temporary runtime copies of OHLCVA1A2 arrays.
 
In order to actually write to database you need to use AddToComposite or COM or ASCII importer.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: Herman
Sent: Friday, November 06, 2009 8:08 PM
Subject: Re: [amibroker] How to use AUX1 and AUX2?

ahh, so they can't be assigned values, or be read, like we do OHLCVI fields? Thus, i gather, these fields cannot be used in a loop?

AUX1[b] = 999;
MyData = AUX[b]

I have a host of other uses, like storing real trade information so that these can easily be accessed and plotted - with having to compare DT all the time.

Thanks for the reply,
herman

Tomasz Janeczko wrote:
Hello,

Aux1 and Aux2 fields are intended to be used as:

1. Storage for extra quotation data such as bid/ask figures
2. Storage for other data such as trading volume expressed in dollars, volume-weigted average price, etc
3. Extra fields for AddToComposite/Foreign (use "1" field ID for aux1 and "2" for aux2 in Foreign/AddToComposite calls)

You can store values to those fields either using ASCII importer or
using OLE or using AddToComposite

Example:

AddToComposite( array, Name(), "1") ; // store array to aux1

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "Herman" <psytek@...>
To: <amibroker@yahoogroups.com>
Sent: Friday, November 06, 2009 7:04 PM
Subject: Re: [amibroker] How to use AUX1 and AUX2?


  
any AUX1 and AUX2 users out there?

As is often the case some very useful new features sit on the shelf for 
a long time before people start using them, simply because they are not 
documented for the simple user. Tomasz, please give a sales pitch as 
what we can do with the new array expansion - its a waste to let it go 
to waste :-)

herman

Herman wrote:
    
I can't find any examples on how to use the two new AUX1 and AUX2 
fields. Can anyone give an example?

When working with the current ticker, how do i assign a value to one of 
these fields? How do i read it back?

Thanks,
herma




------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

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

Yahoo! Groups Links





  
      
------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

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

Yahoo! Groups Links



    
------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

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

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    amibroker-digest@yahoogroups.com 
    amibroker-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/



  


#143660 From: Rick Osborn <ricko@...>
Date: Sat Nov 7, 2009 4:12 am
Subject: Re: error is here request for :support resistance formula error pls correct endless l;oop problem
ricko8294_98
Offline Offline
Send Email Send Email
 
when you see "//" (without the quote marks) in a line everything to the right of it on that line is ignored.
So for the line
RSIperiod = 5; // Param("RSI p",3,14,30,1) ;
the value of 5 is inserted in the variable RSIperiod.   Everything else on that line is ignored.

To use the parameters (which will allow you to change the value of RSIperiod), you need to change the line to
RSIperiod = Param("RSI p",14,3,30,1) ;  => and change the order of the 3 and the 14.
The same applies to the other lines too.
 
Best Regards
Rick Osborn



From: ram vel <rvlv@...>
To: amibroker@yahoogroups.com
Sent: Thu, November 5, 2009 10:34:12 PM
Subject: Re: [amibroker] error is here request for :support resistance formula error pls correct endless l;oop problem

 

Hi Rick
Is it needed to reverse these param numbers? or not?
I mean Do I need to use
instead of this below
------------ --------- --------- --------- --------- ---------
RSIperiod = 5; // Param("RSI p",3,14,30,1) ;

Percent = 5; // Param("ZIG %",8,9,15,1) ;

EMAperiod = 5; //Param("EMA p",4,5,10,1) ;

HHVperiod = 5; //Param("HHV p",3,5,10,1) ;

NumLine = 1; //Param("Num Lines",3,1,20, 1);
------------ --------- --------- --------- --------- --------- --------- ---
new code to be added with normal param numbers like this======== =
============ ========= ========= ========
RSIperiod = 5; // Param("RSI p",1,30,14,3) ;

Percent = 5; // Param("ZIG %",1,15,9,8) ;

EMAperiod = 5; //Param("EMA p",1,10,5,4) ;

HHVperiod = 5; //Param("HHV p",1,10,5,3) ;

NumLine = 1; //Param("Num Lines",1,20, 1, 3);
============ ========= ========= ====
please let me know
if anything wrong
regards
rvlv


 
Is it possible to add plotshapes arrows for buy and sell
can you please add the code for buy sell arrows on chart?
 
I tried somehow it is not working out.
Thanks in advance.


--- On Thu, 11/5/09, Rick Osborn <ricko@rogers. com> wrote:

From: Rick Osborn <ricko@rogers. com>
Subject: Re: [amibroker] error is here request for :support resistance formula error pls correct endless l;oop problem
To: amibroker@yahoogrou ps.com
Date: Thursday, November 5, 2009, 8:39 AM

 
also noted the first two Param numbers are backwards (even thought they are "rem-ed out")
 
Best Regards
Rick Osborn



From: Graham <kavemanperth@ gmail.com>
To: amibroker@yahoogrou ps.com
Sent: Thu, November 5, 2009 1:50:37 AM
Subject: Re: [amibroker] error is here request for :support resistance formula error pls correct endless l;oop problem

 
an obvious error I can see is this
i = numline should be i <= numline

hope I did not write that error in the code I originally posted !

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

2009/11/5 ram vel <rvlv@...>


Plot(ValueWhen( SupBase==Base, LLV(L,HHVperiod) ), "Support Level",colorGreen);
line 58 col 78 
error 15   endless loop detected in FOR loop

--- On Wed, 11/4/09, rvlv <rvlv@...> wrote:

From: rvlv <rvlv@...>
Subject: [amibroker] request for :support resistance formula error pls correct endless l;oop problem
To: amibroker@yahoogrou ps.com
Date: Wednesday, November 4, 2009, 11:49 PM

 
attn "Joris M.schuller" <jmschuller@charter. net>
attn droskill

The following code by Don Lindberg has some looping ewrror
kindly correct and post correct code

============ ========= ========= ========= ========= ====
//Don Lindberg
//Subject: RE: [amibroker] graham Kavanagh Support AND resistance usingRSI.
//Date: Tuesday, November 6, 2007, 2:19 PM

//I have put in basic code to allow you to run as exploration. You can narrow
//your search by changing the criteria in the Filter Statement.

//---------- -- --------- ------ Begin Code ------------ --------- ---

_SECTION_BEGIN( "support and resistant");

//Support and resistance levels using RSI.

//graham Kavanagh May 2003

//Load into Indicator Builder

//Sensitivity of the levels can be changed with the variables

//Can test different numbers live with the Param function ctrl-R with Openpane

RSIperiod = 5; // Param("RSI p",3,14,30,1) ;

Percent = 5; // Param("ZIG %",8,9,15,1) ;

EMAperiod = 5; //Param("EMA p",4,5,10,1) ;

HHVperiod = 5; //Param("HHV p",3,5,10,1) ;

NumLine = 1; //Param("Num Lines",3,1,20, 1);

Base = DEMA(RSI(RSIperiod) , EMAperiod) ;

GraphXSpace= 0.5;

Plot(C,"",colorBlac k,styleCandle) ;

for( i = 1; i = numline; i++ )

{

ResBase = LastValue(Peak( Base,Percent, i));

SupBase = LastValue(Trough( Base,Percent, i));

Plot(ValueWhen( ResBase==Base, HHV(H,HHVperiod) ), "Resist Level",

colorRed, styleLine);

Plot(ValueWhen( SupBase==Base, LLV(L,HHVperiod) ), "Support Level",colorGreen) ;
}

Title = Name() + "; " + Date() + ": Support Resistance Levels using

RSI: " + /*EncodeColor( colorGreen) + "Support Levels are Green;

"+EncodeColor( colorRed) + "Resistance Levels are Red:

"+EncodeColor( colorBlack) +*/ "Num lines ="+WriteVal( numline, 1) ;

Filter=C>10 AND C>75 AND ResBase>=1 AND SupBase >=1;

Buy=Sell=Short= Cover=0;

AddColumn(C, "Close",1. 2);

AddColumn(ResBase, "Resistance" ,1.2);

AddColumn(SupBase, "Support" ,1.2);

_SECTION_END( );

============ ========= ========= ========

THANKS IN ADVANCE TO ALL FOR HELP






#143661 From: Rick Osborn <ricko@...>
Date: Sat Nov 7, 2009 4:17 am
Subject: Re: Trading equity-curve in Amibroker
ricko8294_98
Offline Offline
Send Email Send Email
 
Check the IIF function in the Help files.

The proper construct is
positionsize = IIF(equity() > ma(equity(), 20), -20, -10);
 
Best Regards
Rick Osborn



From: Wolfgang Hader <faked@...>
To: amibroker@yahoogroups.com
Sent: Fri, November 6, 2009 3:49:41 PM
Subject: [amibroker] Trading equity-curve in Amibroker

 

Hi all,

how can I code some like this in Amibroker
(I know the following code is wrong, but how can I do it correctly in
Amiboker)?

iif(equity() > ma(equity(), 20), positionsize= -20, positionsize= -10);

Thank you,
BR


#143662 From: "whitneybroach" <WhitneyBroach@...>
Date: Sat Nov 7, 2009 4:52 am
Subject: Re: setOption("InterestRate")
whitneybroach
Online Now Online Now
Send Email Send Email
 
Haven't seen that built into AB yet.  A feature request for vector-oriented
interest rates exists.

Custom backtester code can read your yield series and add interest to bo.Cash in
a bar loop.

--- In amibroker@yahoogroups.com, "levibreidenbach" <levib1@...> wrote:
>
> Is it possible to set value for interest rate to  something that changes.  For
example my data has symbol for 3 month treasury yield.  Is there a way to set
interest rate to this?
>
> Thanks
>

#143663 From: Yves <yltech@...>
Date: Sat Nov 7, 2009 6:41 am
Subject: Problem with PLOT and IIF
yltech2005
Offline Offline
Send Email Send Email
 
I'm would have:

IIF(Result, Plot RSI in colorRed and styleThickcolorRed and styleDashed)

I'm try with that, but is NO GOOD:

Plot(RSI(9),"RSI", IIf(Result,colorRed,|styleThick,styleDashed) ;

 
Thank You
 
Merci
 
YLTech ( Yves L. )
 
Le présent message et les documents qui y sont joints sont réservés exclusivement au destinataire indiqué. Il est strictement interdit d'en utiliser ou d'en divulguer le contenu. Si vous recevez le présent message par erreur, veuillez le détruire S.V.P. et nous en aviser immédiatement afin que nous puissions corriger nos dossiers. Merci.
 
This message and the attached documents may contain privileged or confidential information that are intended to the addressee only. Any unauthorized disclosure is strictly prohibited. If you happen to receive this message by error, please delete it and notify us immediately so that we may correct our internal records. Thank you.
 
yltech@...

#143664 From: reinsley <reinsley@...>
Date: Sat Nov 7, 2009 8:20 am
Subject: Re: Help needed: time dependent stop
reinsley
Offline Offline
Send Email Send Email
 
Are you looking for that ?

http://www.amibroker.com/guide/afl/afl_view.php?id=50

Best regards

jens_lueckhof a écrit :
>
>
> Hi, I am struggeling implementing the following:
>
> After x days of a trade I want to place a protective stop at the entry.
> So if the trade hasn't been profitable, I close it.
>
> I have tried with BarsSince(Buy) and ValueWhen( Buy, C, 1), but this
> doesn't work.
>
> Anyone here who can give me a hand?
>
> Many thanks
> J
>
>

#143665 From: "rowdy358116" <rowdy358116@...>
Date: Sat Nov 7, 2009 8:59 am
Subject: Re: 20-WMA shown as a Ribbon
rowdy358116
Offline Offline
Send Email Send Email
 
Thankyou for your suggestion reinsley.
Rowdy

--- In amibroker@yahoogroups.com, reinsley <reinsley@...> wrote:
>
>
> Hi,
>
> This is not your request, but after a while and many attemps, it's
> difficult to remember what the ribbon is.
>
> You could appreciate this snippet...
>
> Please, adapt your text " T3Classic cross T3reset " to fit your need.
>
> Best regards
>
> // plot a text at 0.5% from bottom's pane
> percent = Param( "PositText%", 0.5, 0, 90, 0.5 );
> Miny = Status( "axisminy" );
> Maxy = Status( "axismaxy" );
> y = Miny +  ( Maxy - Miny ) * percent / 100; // at 5 % above bottom of
> the pane
> begbar = Status( "firstvisiblebar" ) ;
> PlotText( " T3Classic cross T3reset "  , begbar + 5 , y, colorWhite );
>
>
> rowdy358116 a écrit :
> >
> >
> > Thanks for your help Anthony, it's much appreciated.
> > Rowdy
> >
> > --- In amibroker@yahoogroups.com <mailto:amibroker%40yahoogroups.com>,
> > "Anthony Faragasso" <ajf1111@> wrote:
> >  >
> >  > Rowdy,
> >  >
> >  > Plot( Close, "Price", colorBlue, styleCandle );
> >  >
> >  >
> >  >
> >  > Plot( 5, /* defines the height of the ribbon in percent of pane width */
> >  >
> >  > "",IIf( WMA(C,20) < Low, colorGreen, IIf( WMA(C,20) > High, colorRed,
> > 0 )), /* choose color */
> >  >
> >  > styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );
> >  >
> >  > ----- Original Message -----
> >  > From: rowdy358116
> >  > To: amibroker@yahoogroups.com <mailto:amibroker%40yahoogroups.com>
> >  > Sent: Thursday, November 05, 2009 6:13 AM
> >  > Subject: [amibroker] Re: 20-WMA shown as a Ribbon
> >  >
> >  >
> >  >
> >  > Thanks for your reply and help Joris.
> >  > I wanted a ribbon that took up a little space as possible. And I
> > wanted the ribbon to change colour when it changed direction.
> >  > Thanks Again
> >  > Rowdy
> >  >
> >  > --- In amibroker@yahoogroups.com
> > <mailto:amibroker%40yahoogroups.com>, "Joris M.schuller" <jmschuller@>
> > wrote:
> >  > >
> >  > > /*
> >  > >
> >  > > Not sure what you want, but apart from that, there are at least 2
> > ways to do
> >  > > this:
> >  > >
> >  > > 1. (2 panes). Plot the WMA in a separate pane directly underneath
> > the Price
> >  > > pane (simplest)
> >  > >
> >  > > 2. (If same pane preferred)
> >  > >
> >  > > */
> >  > >
> >  > > Title = EncodeColor(4)+ _DEFAULT_NAME()+"; "+EncodeColor(1) +
> >  > > StrFormat("{{NAME}} - {{INTERVAL}}; {{DATE}}; O=%g, H=%g, L=%g, C=%g
> >  > > (%.1f%%)
> >  > >
> >  > > {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) );
> >  > >
> >  > > ScalingFactor=Param("ScalingFactor",10,1,20,0.25);
> >  > >
> >  > > P = ParamField("Price field",-1);// omit if only C required
> >  > >
> >  > > WMAPeriods = Param("WMAPeriods",20,2,100,1);
> >  > >
> >  > > WMAMin=LowestVisibleValue(WMA( C, WMAPeriods));//clamps the lowest
> > WMA value
> >  > > on the bottom of pane; Alternative: WMAMin=LowestVisibleValue( L);
> >  > >
> >  > > WMAMax=HighestVisibleValue(WMA( C,WMAPeriods));//Alternative:
> >  > > WMAMax=HighestVisibleValue(H);
> >  > >
> >  > >
> >  > >
> >  > > Plot(C,"C",1,64);
> >  > >
> >  > > Plot( WMA( P,WMAPeriods ), "WMA("+WriteVal(WMAPeriods,1.0)+")",
> >  > > colorBlack,5); //use if choice between OHLC,AVG,OI and V is desired
> >  > >
> >  > > Plot( WMA( P,WMAPeriods ), "WMA("+WriteVal(WMAPeriods,1.0)+")",
> >  > > colorGreen,styleOwnScale|5,WMAMin,(WMAMax-WMAMin)*ScalingFactor);
> >  > >
> >  > > /* use if only C is used
> >  > >
> >  > > Plot( WMA( C,WMAPeriods ), "WMA("+WriteVal(WMAPeriods,1.0)+")",
> >  > > colorBlack,5);
> >  > >
> >  > > Plot( WMA( C,WMAPeriods ), "WMA("+WriteVal(WMAPeriods,1.0)+")",
> >  > > colorGreen,styleOwnScale|5,WMAMin,(WMAMax-WMAMin)*ScalingFactor);
> >  > >
> >  > >
> >  > >
> >  > > From: amibroker@yahoogroups.com
> > <mailto:amibroker%40yahoogroups.com> [mailto:amibroker@yahoogroups.com
> > <mailto:amibroker%40yahoogroups.com>] On Behalf
> >  > > Of rowdy358116
> >  > > Sent: Wednesday, November 04, 2009 9:54 PM
> >  > > To: amibroker@yahoogroups.com <mailto:amibroker%40yahoogroups.com>
> >  > > Subject: [amibroker] 20-WMA shown as a Ribbon
> >  > >
> >  > >
> >  > >
> >  > >
> >  > >
> >  > > Hello All,
> >  > > Can anyone show me how to put a 20-WMA on my charts as a ribbon on the
> >  > > bottom of the chart? I find MAs on the price chart clutter it up?
> >  > > Thankyou
> >  > > Rowdy
> >  > >
> >  > >
> >  > >
> >  > > No virus found in this incoming message.
> >  > > Checked by AVG - www.avg.com
> >  > > Version: 8.5.423 / Virus Database: 270.14.45/2476 - Release Date:
> > 11/02/09
> >  > > 07:51:00
> >  > >
> >  >
> >
> >
>

#143666 From: reinsley <reinsley@...>
Date: Sat Nov 7, 2009 9:40 am
Subject: Re: Trading equity-curve in Amibroker
reinsley
Offline Offline
Send Email Send Email
 
Do a search equity Howard Bandy. He gave many examples...

BR

Wolfgang Hader a écrit :
>
>
> Hi all,
>
> how can I code some like this in Amibroker
> (I know the following code is wrong, but how can I do it correctly in
> Amiboker)?
>
> iif(equity() > ma(equity(),20), positionsize=-20, positionsize=-10);
>
> Thank you,
> BR
>
>

#143667 From: "Tomasz Janeczko" <groups@...>
Date: Sat Nov 7, 2009 9:55 am
Subject: Re: How to use AUX1 and AUX2?
amibroker
Offline Offline
Send Email Send Email
 
Sure will do that.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: Herman
Sent: Friday, November 06, 2009 11:24 PM
Subject: Re: [amibroker] How to use AUX1 and AUX2?

OK, i think i know why the confusion: AUX1 and AUX2 are not formatted like a reserved word (like Close, Sell, etc) in the editor. They look like non-reserved words. However the syntax check does not flag them down as uninitialized variables so the are reserved variable names.

Is it possible to format/color them like other reserved keywords?



Many thanks,
herman





Tomasz Janeczko wrote:
They work the same as OHLCV arrays.
You can write to them, but what you write is NOT stored to database.
These are built-in price arrays and in order to protect from modifying quotes by mistake
you are writing to temporary runtime copies of OHLCVA1A2 arrays.
 
In order to actually write to database you need to use AddToComposite or COM or ASCII importer.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: Herman
Sent: Friday, November 06, 2009 8:08 PM
Subject: Re: [amibroker] How to use AUX1 and AUX2?

ahh, so they can't be assigned values, or be read, like we do OHLCVI fields? Thus, i gather, these fields cannot be used in a loop?

AUX1[b] = 999;
MyData = AUX[b]

I have a host of other uses, like storing real trade information so that these can easily be accessed and plotted - with having to compare DT all the time.

Thanks for the reply,
herman

Tomasz Janeczko wrote:
Hello,
Aux1 and Aux2 fields are intended to be used as:
1. Storage for extra quotation data such as bid/ask figures
2. Storage for other data such as trading volume expressed in dollars, volume-weigted average price, etc
3. Extra fields for AddToComposite/Foreign (use "1" field ID for aux1 and "2" for aux2 in Foreign/AddToComposite calls)
You can store values to those fields either using ASCII importer or
using OLE or using AddToComposite
Example:
AddToComposite( array, Name(), "1") ; // store array to aux1
Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- From: "Herman" <psytek@...>
To: <amibroker@yahoogroups.com>
Sent: Friday, November 06, 2009 7:04 PM
Subject: Re: [amibroker] How to use AUX1 and AUX2?
any AUX1 and AUX2 users out there?
As is often the case some very useful new features sit on the shelf for a long time before people start using them, simply because they are not documented for the simple user. Tomasz, please give a sales pitch as what we can do with the new array expansion - its a waste to let it go to waste :-)
herman
Herman wrote:
I can't find any examples on how to use the two new AUX1 and AUX2 fields. Can anyone give an example?
When working with the current ticker, how do i assign a value to one of these fields? How do i read it back?
Thanks,
herma
------------------------------------
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
Yahoo! Groups Links
------------------------------------
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
Yahoo! Groups Links

------------------------------------
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
amibroker-digest@yahoogroups.com amibroker-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/

#143668 From: Mubashar Virk <mvirk67@...>
Date: Sat Nov 7, 2009 10:20 am
Subject: Re: Problem with PLOT and IIF
chmav
Offline Offline
Send Email Send Email
 
Plot(RSI(9),"RSI", IIf(Result,colorRed,0),styleThick |styleDashed) ;

1. AmiBroker has a product manual.
2. AmiBroker also has a buit-in HELP, which can accessed by pressing F1
on your keyboard.
Please give a thought to using these two items, sometime.



Yves wrote:
>
> I'm would have:
>
> IIF(Result, Plot RSI in *colorRed* and *styleThick*, *colorRed* and
> *styleDashed*)
>
> I'm try with that, but is NO GOOD:
>
> Plot(RSI(9),"RSI", IIf(Result,*colorRed,*|*styleThick*,*styleDashed*) ;
>
> Thank You
> Merci
>
> YLTech ( Yves L. )
>
> Le présent message et les documents qui y sont joints sont réservés
> exclusivement au destinataire indiqué. Il est strictement interdit
> d'en utiliser ou d'en divulguer le contenu. Si vous recevez le présent
> message par erreur, veuillez le détruire S.V.P. et nous en aviser
> immédiatement afin que nous puissions corriger nos dossiers. Merci.
>
> This message and the attached documents may contain privileged or
> confidential information that are intended to the addressee only. Any
> unauthorized disclosure is strictly prohibited. If you happen to
> receive this message by error, please delete it and notify us
> immediately so that we may correct our internal records. Thank you.
>
> yltech@... <mailto:yltech@...>
>
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 4539 (20091024) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com



__________ Information from ESET NOD32 Antivirus, version of virus signature
database 4539 (20091024) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

#143669 From: "rvlv" <rvlv@...>
Date: Sat Nov 7, 2009 11:43 am
Subject: Req afl code for double vwap on price chart first vwap for 89 tks 2nd for 200tk
rvlv
Offline Offline
Send Email Send Email
 
Herman,rick,droskill (your kind attention please)
HI afl experts

Can you give me an afl code with price 30 min candles, vwap1 for 89ticks,vwap2
for 200 ticks please
the buy sell signals come from vwap1 going above or below vwap2

Looks like a bit complicated

please help
thanks in advance
rvlv

#143670 From: "rvlv" <rvlv@...>
Date: Sat Nov 7, 2009 11:52 am
Subject: fl for new highs and new lows with marking as HH1,HH2,HH3,HH4 and LH1,LH2,LH3,LH
rvlv
Offline Offline
Send Email Send Email
 
hELLOW  AFL experts

Please help
I am looking for an afl  that has
candle chart, 30min, every new HIGHER high marked on chart as HH1,HH2,HH3,HH4
EVERY NEW LOWER HIGH MARKED ON CHART AS LH1,LH2,LH3,LH4
The concept requires marked hh and marked lh, and each hh or lh must have a
dotted line plotted on chart.

trading will be on trend
long on breakout over hh, and short over breakout LH

THANKS
in advance

Looks simple but I cant do it
please help
rvlv

like to exchange more info? mail me at rvlv@... personally.

hint
I rember gordon rose, even mailed him he is busy.

#143671 From: Herman <psytek@...>
Date: Sat Nov 7, 2009 2:12 pm
Subject: Re: How to use AUX1 and AUX2?
psytek2
Offline Offline
Send Email Send Email
 
Thank you! I prefer to stick with the AB editor since I use context help a lot.

herman

Tomasz Janeczko wrote:
Sure will do that.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: Herman
Sent: Friday, November 06, 2009 11:24 PM
Subject: Re: [amibroker] How to use AUX1 and AUX2?

OK, i think i know why the confusion: AUX1 and AUX2 are not formatted like a reserved word (like Close, Sell, etc) in the editor. They look like non-reserved words. However the syntax check does not flag them down as uninitialized variables so the are reserved variable names.

Is it possible to format/color them like other reserved keywords?



Many thanks,
herman





Tomasz Janeczko wrote:
They work the same as OHLCV arrays.
You can write to them, but what you write is NOT stored to database.
These are built-in price arrays and in order to protect from modifying quotes by mistake
you are writing to temporary runtime copies of OHLCVA1A2 arrays.
 
In order to actually write to database you need to use AddToComposite or COM or ASCII importer.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: Herman
Sent: Friday, November 06, 2009 8:08 PM
Subject: Re: [amibroker] How to use AUX1 and AUX2?

ahh, so they can't be assigned values, or be read, like we do OHLCVI fields? Thus, i gather, these fields cannot be used in a loop?

AUX1[b] = 999;
MyData = AUX[b]

I have a host of other uses, like storing real trade information so that these can easily be accessed and plotted - with having to compare DT all the time.

Thanks for the reply,
herman

Tomasz Janeczko wrote:
Hello,
Aux1 and Aux2 fields are intended to be used as:
1. Storage for extra quotation data such as bid/ask figures
2. Storage for other data such as trading volume expressed in dollars, volume-weigted average price, etc
3. Extra fields for AddToComposite/Foreign (use "1" field ID for aux1 and "2" for aux2 in Foreign/AddToComposite calls)
You can store values to those fields either using ASCII importer or
using OLE or using AddToComposite
Example:
AddToComposite( array, Name(), "1") ; // store array to aux1
Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- From: "Herman" <psytek@...>
To: <amibroker@yahoogroups.com>
Sent: Friday, November 06, 2009 7:04 PM
Subject: Re: [amibroker] How to use AUX1 and AUX2?
any AUX1 and AUX2 users out there?
As is often the case some very useful new features sit on the shelf for a long time before people start using them, simply because they are not documented for the simple user. Tomasz, please give a sales pitch as what we can do with the new array expansion - its a waste to let it go to waste :-)
herman
Herman wrote:
I can't find any examples on how to use the two new AUX1 and AUX2 fields. Can anyone give an example?
When working with the current ticker, how do i assign a value to one of these fields? How do i read it back?
Thanks,
herma
------------------------------------
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
Yahoo! Groups Links
------------------------------------
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
Yahoo! Groups Links

------------------------------------
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
amibroker-digest@yahoogroups.com amibroker-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/

#143672 From: "Markus Witzler" <funnybiz@...>
Date: Sat Nov 7, 2009 3:38 pm
Subject: Custm backtester - calling methods and properties
bakijahadzis...
Offline Offline
Send Email Send Email
 
Hello again,
 
I have always been under the impression that trade properties/methods can only be called within a trade loop and signal properties/methods can only be called in a signal loop.
 
But in the documentation in the "users knowledge base", I found this:
 
for (sig = bo.GetFirstSignal(i);sig; sig = GetNextSignal(i))
...
if (trade.GetPositionvalue() >= 50000)
sig.PosSize=0;
...
 
Wouldn´t one need a trade loop to be able to call GetPosiotionValue which is a trade method, or can methods/properties be called from any kind of loop (trade or signal)?
 
Thanks
 
Markus


__________ Information from ESET Smart Security, version of virus signature database 4581 (20091107) __________

The message was checked by ESET Smart Security.

http://www.eset.com

#143673 From: "rvlv" <rvlv@...>
Date: Sat Nov 7, 2009 3:47 pm
Subject: Request afl coding HELP NEEDED to code an afl for this material
rvlv
Offline Offline
Send Email Send Email
 
Dear afl experts

Please look into this matter and code an afl for me

Conditions
1.use of heikin ashi candles
2.use of an envelope-bands(somebody told me these are WMA34 hi-lo bands)
3.use of a linear regression line with trend color change
4.overlay of pivots or volatility levels(cant make out)

trade entry happens as soon as price crosses above the bands and trend line or
directional indicator line with color
trade exit occurs on price reaching next pivot or volatility level
stoploss for long is on some recent low

short trade occurs as price moves below directional indicator line when it is
red in color, and as price comes below the bands.


ref video link
http://ultimateswingtrader.com/while-you-slept
note link is valid only couple of days-hence watch it fast,please

Special attn Rick,herman,droskill and forgive me if I forgot someone who kindly
helped me in the past!
aDVANCE THANKS FOR YOUR SPARING TIME  and helping spirit.
rvlv

#143674 From: "Markus Witzler" <funnybiz@...>
Date: Sat Nov 7, 2009 4:15 pm
Subject: Value of all open positions in CBT
bakijahadzis...
Offline Offline
Send Email Send Email
 
Hello,
 
I have trouble finding coming up with the proper code for determining the value of all open positions for any given day (determined by the close!)
 
Is it this:
 
for (trade = bo.GetFirstOpenPos(); trade; trade = bo.GetNextOpenPos())
{
Value_open_positions = Value_open_positions + trade.GetPositionValue()
    trade.AddCustomMetric ("Open Position Value", trade.Value_open_positions);
}
Incidentally, GetPositionValue doesn´t indicate if it uses closing prices.
 


__________ Information from ESET Smart Security, version of virus signature database 4581 (20091107) __________

The message was checked by ESET Smart Security.

http://www.eset.com

#143675 From: "Joris Schuller" <jschuller@...>
Date: Sat Nov 7, 2009 4:24 pm
Subject: RE: fl for new highs and new lows with marking as HH1,HH2,HH3,HH4 and LH1,LH2,LH3,LH
jmschuller
Offline Offline
Send Email Send Email
 

/*

This should take care of it. It is a combination of 2 existing posts: One buried in a Reinsley afl and one by Tomasz. 

The Zig in the Reinsley post is an elegant modification of the existing AB Zig and uses H and L, rather than only one parameter(e.g. H and L instead of C,H,or L) and was selected over other H_l based Zigs for reasons explained in another post.

(Minor) errors in both of them were corrected and some enhancements were incorporated.

Play with the parameters and adjust or throw out what you don't need or want.

*/

_SECTION_BEGIN("ZigZag");

//added 

Title = EncodeColor(4)+ _DEFAULT_NAME()+";  "+EncodeColor(1) + StrFormat("{{NAME}} - {{INTERVAL}}; {{DATE}}; O=%g, H=%g, L=%g, C=%g (%.1f%%)

{{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) );     

SetChartOptions(0,chartShowArrows|chartShowDates);

Plot( C, "Close", 1,64);

//from Reinsley

ZigPerc= Param( "ZigZag-HL %",0.02,0.01,10,0.01);

HHLLSel = ParamToggle("Each Pk/Tr|HH/LL","Each Pk/Tr|HH/LL Only",1);

Both_Versions=ParamToggle("Modified Only|Both","Modified Only|Both",1);

ATRmult = Param("Text Shift (in ATR)",0.6,0.1,3,0.1);

Show_Arrows=ParamToggle("Show Arrows","No|Yes",1);

Arrowadj = Param("Arrowadj; ",12,2,25,1);

pk=PeakBars(H,ZigPerc)==0;

tr=TroughBars(L,ZigPerc)==0;

pkbars=PeakBars(H,ZigPerc);

trbars=TroughBars(L,ZigPerc);

zHi=Zig(H,ZigPerc); zLo=Zig(L,ZigPerc); HLAvg=(zHi+zLo)/2;

zp1=IIf(pk,zHi,IIf(tr,zLo,IIf(HLAvg>Ref(HLAvg,-1),H,L))); //Reinsley original

zp2=IIf(pk,zHi,IIf(tr,zLo,IIf(pkbars<=trbars,L,H)));//Modified zp to reduce occasional erroneous Pk/Tr connections at very small ZigPerc values

//=========Modified version================

za2=Zig(zp2,ZigPerc);

Slopeza2 = za2-Ref(za2,-1);

Plot(za2,"\nZig Modified",11,5|styleNoLabel);//Zig H-L Modified

if(Show_Arrows)

{

pR=Ref(za2,-1)<za2 AND za2>Ref(za2,1);

pS=Ref(za2,-1)>za2 AND za2<Ref(za2,1);

PlotShapes(shapeDownArrow*pR,colorGreen,0,H,-Arrowadj);

PlotShapes(shapeUpArrow*pS,colorRed,0,L,-Arrowadj);

}

if(Both_Versions)

{

// Original Reinsley Version=================

za1=Zig(zp1,ZigPerc);

Slopeza1 = za1-Ref(za1,-1);

Plot(za1,"ZiG Original",1,5|styleNoLabel);//Zig H-L Reinsley original

if(Show_Arrows)

{

pR=Ref(za1,-1)<za1 AND za1>Ref(za1,1);

pS=Ref(za1,-1)>za1 AND za1<Ref(za1,1);

PlotShapes(shapeDownArrow*pR,colorGreen,0,H,-Arrowadj);

PlotShapes(shapeUpArrow*pS,colorRed,0,L,-Arrowadj);

}

}

//za2 = IIf(Slopeza1 >0 AND Slopeza2>0,Max(za1,za2),IIf(Slopeza1 <0 AND Slopeza2<0,Min(za1,za2),za2));

//Plot(za2,"",11,5|styleNoLabel);//Zig H-L

 

//modified from Tomasco

// ORIGINAL uses H AND L values for next bar after Zig pk/tr instead at Zig pk/tr and is based on Zig(C);

// occasionally, that value is lower/higher than the correct ZigLo/ZigHi values, since the Zig is based on C, NOT on H and L

//added additional bells and whistles

if(HHLLSel)

{

HH=((za2>Ref(za2,- 1) AND za2 > Ref(za2,1)) AND (Peak(za2,ZigPerc,1 )>Peak(za2,ZigPerc,2 ))); //HH

LL=((za2<Ref(za2,- 1) AND za2 < Ref(za2,1)) AND (Trough(za2,ZigPerc,1 ) <Trough(za2,ZigPerc,2 ))); //LL

dist = ATRmult*ATR (20);//might not want that

for( i = 0; i < BarCount; i++ )

{

if( HH [i]) PlotText( "HH"+ "\n"+H[ i ], i, H[ i ]+dist[i], colorGreen );

if( LL [i] ) PlotText( ""+L[ i ]+"\nLL", i, L[ i ]-dist[i], colorRed );

}

}

 

if(!HHLLSel)

{

HH=((za2>Ref(za2,- 1) AND za2 > Ref(za2,1)));

LL=((za2<Ref(za2,- 1) AND za2 < Ref(za2,1)));

}

 

 

dist = ATRmult*ATR (20);//might not want that

for( i = 0; i < BarCount; i++ )

{

if( HH [i]) PlotText( "H"+ "\n"+H[ i ], i, H[ i ]+dist[i], colorGreen );

if( LL [i] ) PlotText( ""+L[ i ]+"\nL", i, L[ i ]-dist[i], colorRed );

}

 

 

/* Original

HH=((za2<Ref(za2,- 1) AND Ref(za2,-1) > Ref(za2,-2)) AND (Peak(za2,ZigPerc,1 )>Peak(za2,ZigPerc,2 )));

LL=((za2>Ref(za2,- 1) AND Ref(za2,-1) < Ref(za2,-2)) AND (Trough(za2,ZigPerc,1 ) <Trough(za2,ZigPerc,2 )));

*/

_SECTION_END();

 

 

From: amibroker@yahoogroups.com [mailto:amibroker@yahoogroups.com] On Behalf Of rvlv
Sent: Saturday, November 07, 2009 5:52 AM
To: amibroker@yahoogroups.com
Subject: [amibroker] fl for new highs and new lows with marking as HH1,HH2,HH3,HH4 and LH1,LH2,LH3,LH

 

 

hELLOW AFL experts

Please help
I am looking for an afl that has
candle chart, 30min, every new HIGHER high marked on chart as HH1,HH2,HH3,HH4
EVERY NEW LOWER HIGH MARKED ON CHART AS LH1,LH2,LH3,LH4
The concept requires marked hh and marked lh, and each hh or lh must have a dotted line plotted on chart.

trading will be on trend
long on breakout over hh, and short over breakout LH

THANKS
in advance

Looks simple but I cant do it
please help
rvlv

like to exchange more info? mail me at rvlv@... personally.

hint
I rember gordon rose, even mailed him he is busy.

No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.424 / Virus Database: 270.14.51/2482 - Release Date: 11/05/09 07:37:00


#143676 From: "Reinsley" <reinsley@...>
Date: Sat Nov 7, 2009 5:58 pm
Subject: Increase and decrease a var with two GFX buttons.
reinsley
Offline Offline
Send Email Send Email
 
Hello,

I would like to decrease Myparam of 0.25 on each clic inside the red button.

I complicated with static var but Myparam comes back to 5 as it is declared at
the beginning of the formula.

How to decrease a var with a GFX button ?

To give an idea of what I want to do , once this point solved, my next step will
be to increase of 0.25 the same Myparam with a Plus button to adjust a Fibonacci
step. I will add Fibonacci code at the very end.

AB parameters windows lacks some ergonomics in real time.

I draw the buttons in the upper right side, after the bars, as quote marker will
not be activate.

Thanks for the help

Best regards




// draw a red square + inside click

//SetChartOptions( 2, chartHideQuoteMarker );

Myparam = Param( "TheValue", 5, 0, 5, 0.25 );
StaticVarSet( "Myparamstat ", Myparam );

Myparam = StaticVarGet( "Myparamstat " );
_TRACE( "Myparamstat = " + Myparam );


function DrawButton( Text, x1, y1, x2, y2, BackColor )
{
     GfxSetOverlayMode( 0 );
     GfxSelectFont( "Tahoma", 12, 800 );
     GfxSelectPen( colorBlack );
     GfxSetBkMode( 1 );
     GfxSelectSolidBrush( BackColor );
     GfxSetBkColor( BackColor );
     GfxSetTextColor( 1 );
     GfxRectangle( x1, y1, x2, y2 );
     GfxDrawText( Text, x1, y1, x2, y2, 32 | 1 | 4 );
}

shift = 40;
XOffset  = StaticVarGet( "XOffset" );
YOffset  = StaticVarGet( "YOffset" );

pxchartwidth = Status( "pxchartwidth" );
XOffset  = pxchartwidth - shift ; // X1
YOffset  = 0;//Y1
SquareSide = 20;

X1m = XOffset  ;
X2m = Xoffset + SquareSide ;
Y1m = YOffset  ;
Y2m = yOffset + SquareSide ;

DrawButton( "-", Xoffset, yOffset, Xoffset + SquareSide , yOffset + SquareSide ,
colorRed );

LButtonTrigger = GetCursorMouseButtons() == 9;
_TRACE( "LButtonTrigger = " + LButtonTrigger );

if ( LButtonTrigger )
{
     MousePx  = Nz( GetCursorXPosition( 1 ) );
     MousePy  = Nz( GetCursorYPosition( 1 ) );

     CursorInMinus = MousePx > X1m AND MousePx < X2m AND MousePy > Y1m AND
MousePy < Y2m;
     _TRACE( "CursorInMinus = " + CursorInMinus );

     if ( CursorInMinus )
     {
         DrawButton( "-", Xoffset, yOffset, Xoffset + SquareSide , yOffset +
SquareSide , colorYellow );
         Myparam = StaticVarGet( "Myparamstat " );
         Myparam = Myparam - 0.25;
         _TRACE( "Myparamstat2 = " + Myparam );
         RequestTimedRefresh( 1 );
     }
}

#143677 From: reinsley <reinsley@...>
Date: Sat Nov 7, 2009 6:04 pm
Subject: Re: fl for new highs and new lows with marking as HH1,HH2,HH3,HH4 and LH1,LH2,LH3,LH
reinsley
Offline Offline
Send Email Send Email
 
Nice Joris, nice...

I just added my two cents, I was not the author.

Best regards

Joris Schuller a écrit :
>
>
> /*
>
> This should take care of it. It is a combination of 2 existing posts:
> One buried in a Reinsley afl and one by Tomasz.
>
> The Zig in the Reinsley post is an elegant modification of the existing
> AB Zig and uses H and L, rather than only one parameter(e.g. H and L
> instead of C,H,or L) and was selected over other H_l based Zigs for
> reasons explained in another post.
>
> (Minor) errors in both of them were corrected and some enhancements were
> incorporated.
>
> Play with the parameters and adjust or throw out what you don't need or
> want.
>
> */
>
> _SECTION_BEGIN("ZigZag");
>
> //added
>
> *Title* = EncodeColor(4)+ _DEFAULT_NAME()+";  "+EncodeColor(1) +
> StrFormat("{{NAME}} - {{INTERVAL}}; {{DATE}}; O=%g, H=%g, L=%g, C=%g
> (%.1f%%)
>
> {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) );
>
> SetChartOptions(0,*chartShowArrows*|*chartShowDates*);
>
> Plot( *C*, "Close", 1,64);
>
> //from Reinsley
>
> ZigPerc= Param( "ZigZag-HL %",0.02,0.01,10,0.01);
>
> HHLLSel = ParamToggle("Each Pk/Tr|HH/LL","Each Pk/Tr|HH/LL Only",1);
>
> Both_Versions=ParamToggle("Modified Only|Both","Modified Only|Both",1);
>
> ATRmult = Param("Text Shift (in ATR)",0.6,0.1,3,0.1);
>
> Show_Arrows=ParamToggle("Show Arrows","No|Yes",1);
>
> Arrowadj = Param("Arrowadj; ",12,2,25,1);
>
> pk=PeakBars(*H*,ZigPerc)==0;
>
> tr=TroughBars(*L*,ZigPerc)==0;
>
> pkbars=PeakBars(*H*,ZigPerc);
>
> trbars=TroughBars(*L*,ZigPerc);
>
> zHi=Zig(*H*,ZigPerc); zLo=Zig(*L*,ZigPerc); HLAvg=(zHi+zLo)/2;
>
> zp1=IIf(pk,zHi,IIf(tr,zLo,IIf(HLAvg>Ref(HLAvg,-1),*H*,*L*))); //Reinsley
> original
>
> zp2=IIf(pk,zHi,IIf(tr,zLo,IIf(pkbars<=trbars,*L*,*H*)));//Modified zp to
> reduce occasional erroneous Pk/Tr connections at very small ZigPerc values
>
> //=========Modified version================
>
> za2=Zig(zp2,ZigPerc);
>
> Slopeza2 = za2-Ref(za2,-1);
>
> Plot(za2,"\nZig Modified",11,5|*styleNoLabel*);//Zig H-L Modified
>
> *if*(Show_Arrows)
>
> {
>
> pR=Ref(za2,-1)<za2 *AND* za2>Ref(za2,1);
>
> pS=Ref(za2,-1)>za2 *AND* za2<Ref(za2,1);
>
> PlotShapes(*shapeDownArrow**pR,*colorGreen*,0,*H*,-Arrowadj);
>
> PlotShapes(*shapeUpArrow**pS,*colorRed*,0,*L*,-Arrowadj);
>
> }
>
> *if*(Both_Versions)
>
> {
>
> // Original Reinsley Version=================
>
> za1=Zig(zp1,ZigPerc);
>
> Slopeza1 = za1-Ref(za1,-1);
>
> Plot(za1,"ZiG Original",1,5|*styleNoLabel*);//Zig H-L Reinsley original
>
> *if*(Show_Arrows)
>
> {
>
> pR=Ref(za1,-1)<za1 *AND* za1>Ref(za1,1);
>
> pS=Ref(za1,-1)>za1 *AND* za1<Ref(za1,1);
>
> PlotShapes(*shapeDownArrow**pR,*colorGreen*,0,*H*,-Arrowadj);
>
> PlotShapes(*shapeUpArrow**pS,*colorRed*,0,*L*,-Arrowadj);
>
> }
>
> }
>
> //za2 = IIf(Slopeza1 >0 AND Slopeza2>0,Max(za1,za2),IIf(Slopeza1 <0 AND
> Slopeza2<0,Min(za1,za2),za2));
>
> //Plot(za2,"",11,5|styleNoLabel);//Zig H-L
>
>
>
> //modified from Tomasco
>
> // ORIGINAL uses H AND L values for next bar after Zig pk/tr instead at
> Zig pk/tr and is based on Zig(C);
>
> // occasionally, that value is lower/higher than the correct ZigLo/ZigHi
> values, since the Zig is based on C, NOT on H and L
>
> //added additional bells and whistles
>
> *if*(HHLLSel)
>
> {
>
> HH=((za2>Ref(za2,- 1) *AND* za2 > Ref(za2,1)) *AND* (Peak(za2,ZigPerc,1
> )>Peak(za2,ZigPerc,2 ))); //HH
>
> LL=((za2<Ref(za2,- 1) *AND* za2 < Ref(za2,1)) *AND*
> (Trough(za2,ZigPerc,1 ) <Trough(za2,ZigPerc,2 ))); //LL
>
> dist = ATRmult*ATR (20);//might not want that
>
> *for*( i = 0; i < *BarCount*; i++ )
>
> {
>
> *if*( HH [i]) PlotText( "HH"+ "\n"+*H*[ i ], i, *H*[ i ]+dist[i],
> *colorGreen* );
>
> *if*( LL [i] ) PlotText( ""+*L*[ i ]+"\nLL", i, *L*[ i ]-dist[i],
> *colorRed* );
>
> }
>
> }
>
>
>
> *if*(!HHLLSel)
>
> {
>
> HH=((za2>Ref(za2,- 1) *AND* za2 > Ref(za2,1)));
>
> LL=((za2<Ref(za2,- 1) *AND* za2 < Ref(za2,1)));
>
> }
>
>
>
>
>
> dist = ATRmult*ATR (20);//might not want that
>
> *for*( i = 0; i < *BarCount*; i++ )
>
> {
>
> *if*( HH [i]) PlotText( "H"+ "\n"+*H*[ i ], i, *H*[ i ]+dist[i],
> *colorGreen* );
>
> *if*( LL [i] ) PlotText( ""+*L*[ i ]+"\nL", i, *L*[ i ]-dist[i],
> *colorRed* );
>
> }
>
>
>
>
>
> /* Original
>
> HH=((za2<Ref(za2,- 1) AND Ref(za2,-1) > Ref(za2,-2)) AND
> (Peak(za2,ZigPerc,1 )>Peak(za2,ZigPerc,2 )));
>
> LL=((za2>Ref(za2,- 1) AND Ref(za2,-1) < Ref(za2,-2)) AND
> (Trough(za2,ZigPerc,1 ) <Trough(za2,ZigPerc,2 )));
>
> */
>
> _SECTION_END();
>
>
>
>
>
> *From:* amibroker@yahoogroups.com [mailto:amibroker@yahoogroups.com] *On
> Behalf Of *rvlv
> *Sent:* Saturday, November 07, 2009 5:52 AM
> *To:* amibroker@yahoogroups.com
> *Subject:* [amibroker] fl for new highs and new lows with marking as
> HH1,HH2,HH3,HH4 and LH1,LH2,LH3,LH
>
>
>
>
>
> hELLOW AFL experts
>
> Please help
> I am looking for an afl that has
> candle chart, 30min, every new HIGHER high marked on chart as
> HH1,HH2,HH3,HH4
> EVERY NEW LOWER HIGH MARKED ON CHART AS LH1,LH2,LH3,LH4
> The concept requires marked hh and marked lh, and each hh or lh must
> have a dotted line plotted on chart.
>
> trading will be on trend
> long on breakout over hh, and short over breakout LH
>
> THANKS
> in advance
>
> Looks simple but I cant do it
> please help
> rvlv
>
> like to exchange more info? mail me at rvlv@...
> <mailto:rvlv%40yahoo.com> personally.
>
> hint
> I rember gordon rose, even mailed him he is busy.
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.5.424 / Virus Database: 270.14.51/2482 - Release Date:
> 11/05/09 07:37:00
>
>

#143678 From: "ta" <tagroups@...>
Date: Sat Nov 7, 2009 6:21 pm
Subject: The 100 new fundametal field
taquant2001
Offline Offline
Send Email Send Email
 

TJ

 

Would you please tell us how the new user defined fundamental fields can be used and exposed? TIA


#143679 From: Aron <aron.groups@...>
Date: Sat Nov 7, 2009 7:25 pm
Subject: Re: Increase and decrease a var with two GFX buttons.
aron_abgroup
Offline Offline
Send Email Send Email
 
Look at this example:

RequestTimedRefresh( 1 );
LeftButton =
GetCursorMouseButtons() & 1;
reset =
GetCursorMouseButtons() &4 ; // middle button pressed

numClicks =
Nz( StaticVarGet( "counter" ) );

if ( leftButton )
StaticVarSet( "counter", numClicks + 1 );

if (reset )
{
    StaticVarSet( "counter" ,0);
    Title = "Counter Reseted !" ;
}
else

Title = "Clicks Counter: " + StaticVarGet( "counter" );


On 11/7/2009 6:58 PM, Reinsley wrote:
Hello,
I would like to decrease Myparam of 0.25 on each clic inside the red button.
I complicated with static var but Myparam comes back to 5 as it is declared at the beginning of the formula.
How to decrease a var with a GFX button ?
To give an idea of what I want to do , once this point solved, my next step will be to increase of 0.25 the same Myparam with a Plus button to adjust a Fibonacci step. I will add Fibonacci code at the very end.
AB parameters windows lacks some ergonomics in real time.
I draw the buttons in the upper right side, after the bars, as quote marker will not be activate.
Thanks for the help
Best regards
// draw a red square + inside click
//SetChartOptions( 2, chartHideQuoteMarker );
Myparam = Param( "TheValue", 5, 0, 5, 0.25 );
StaticVarSet( "Myparamstat ", Myparam );
Myparam = StaticVarGet( "Myparamstat " );
_TRACE( "Myparamstat = " + Myparam );
function DrawButton( Text, x1, y1, x2, y2, BackColor )
{
GfxSetOverlayMode( 0 );
GfxSelectFont( "Tahoma", 12, 800 );
GfxSelectPen( colorBlack );
GfxSetBkMode( 1 );
GfxSelectSolidBrush( BackColor );
GfxSetBkColor( BackColor );
GfxSetTextColor( 1 );
GfxRectangle( x1, y1, x2, y2 );
GfxDrawText( Text, x1, y1, x2, y2, 32 | 1 | 4 );
}
shift = 40;
XOffset = StaticVarGet( "XOffset" );
YOffset = StaticVarGet( "YOffset" );
pxchartwidth = Status( "pxchartwidth" );
XOffset = pxchartwidth - shift ; // X1
YOffset = 0;//Y1
SquareSide = 20;
X1m = XOffset ;
X2m = Xoffset + SquareSide ;
Y1m = YOffset ;
Y2m = yOffset + SquareSide ;
DrawButton( "-", Xoffset, yOffset, Xoffset + SquareSide , yOffset + SquareSide , colorRed );
LButtonTrigger	= GetCursorMouseButtons() == 9;
_TRACE( "LButtonTrigger = " + LButtonTrigger );
if ( LButtonTrigger )
{
MousePx = Nz( GetCursorXPosition( 1 ) );
MousePy = Nz( GetCursorYPosition( 1 ) );
CursorInMinus = MousePx > X1m AND MousePx < X2m AND MousePy > Y1m AND MousePy < Y2m;
_TRACE( "CursorInMinus = " + CursorInMinus );
if ( CursorInMinus )
{
DrawButton( "-", Xoffset, yOffset, Xoffset + SquareSide , yOffset + SquareSide , colorYellow );
Myparam = StaticVarGet( "Myparamstat " );
Myparam = Myparam - 0.25;
_TRACE( "Myparamstat2 = " + Myparam );
RequestTimedRefresh( 1 );
}
}
------------------------------------
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
amibroker-digest@yahoogroups.com amibroker-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/


#143680 From: "bean_pi314" <gkjw@...>
Date: Sat Nov 7, 2009 9:49 pm
Subject: Re: Trading equity-curve in Amibroker
bean_pi314
Offline Offline
Send Email Send Email
 
Are you talking about a portfolio equity curve or the equity curve of an
individual security?  Unfortunately, I think equity() only works for individual
securities, not portfolio equity.  I have been looking into the same issue with
respect to portfolio equity, but am stuck as well.

-Greg

--- In amibroker@yahoogroups.com, Rick Osborn <ricko@...> wrote:
>
> Check the IIF function in the Help files.
>
> The proper construct is
> positionsize = IIF(equity() > ma(equity(), 20), -20, -10);
>
>  Best Regards
> Rick Osborn
>
>
>
>
> ________________________________
> From: Wolfgang Hader <faked@...>
> To: amibroker@yahoogroups.com
> Sent: Fri, November 6, 2009 3:49:41 PM
> Subject: [amibroker] Trading equity-curve in Amibroker
>
>
> Hi all,
>
> how can I code some like this in Amibroker
> (I know the following code is wrong, but how can I do it correctly in
> Amiboker)?
>
> iif(equity() > ma(equity(), 20), positionsize= -20, positionsize= -10);
>
> Thank you,
> BR
>

Messages 143651 - 143680 of 144294   Oldest  |  < Older  |  Newer >  |  Newest
Advanced
Add to My Yahoo!      XML What's This?

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help