Misunderstanding.
Buy when price is below bb bottom and vice versa.

Ton Sieverding <[EMAIL PROTECTED]> wrote:
Although this has nothing to do with my #Include discussion with Terry, I still would like to give an answer with a question. Why should anybody buy when the price is above de BB en sell when the price is below the BB ? I just don't follow ...
 
Ton.
 
----- Original Message -----
Sent: Monday, September 11, 2006 7:39 PM
Subject: Re: [amibroker] Candlestick pattern scan

Hi,
Can you help me with a code which distinguishes the following.
Cond1 - price should be outside Bollinger band.
high (max) outside BB top and low below BB bottom.
cond2 - It ideally should be a hammer or hanging man. You may add a few other candle patterns.

Buy = price > bb top + a bearish candle
Sell = Price < bb bottom + a bearish candle

Regards
Mithil Pradhan

Ton Sieverding <ton.sieverding@scarlet.be> wrote:
Terry I assume that you mean 'it includes a copy of the include file on runtime'. So during interpretation of the AFL code. It will of course not replace the #Include line with the include file in the AFL code. First because that's not what it does in my AB version and second because you will give up the Include advantage. Includes for me are code that can be used in sereval programs and where you can modify the Include without going through all programs that use the Include code. So the re-using principle ...
 
Ton.
 
----- Original Message -----
From: Terry
Sent: Sunday, September 10, 2006 11:14 PM
Subject: RE: [amibroker] Candlestick pattern scan

You are confusing #include with functions in other programs.
 
All an include does is COPY the lines of code from the include file and INSERTS them into your code IN PLACE OF the #include line.
 
It is EXACTLY THE SAME as if you just typed those lines in your code.
 
Amibroker does have function calls. In the second example I gave, the include was coded as a function call. Thus this include WOULD have to be place near the top of your code since the function must be "seen" before it is "called". Any, yes, this function will never do anything unless and until you call it. However, the first version as noted above is just inline code and it gets executed as if you had typed in there in the first place.
--
Terry
-----Original Message-----
From: [EMAIL PROTECTED]ps.com [mailto:amibroker@yahoogroups.com] On Behalf Of Ton Sieverding
Sent: Sunday, September 10, 2006 02:45
To: [EMAIL PROTECTED]ps.com
Subject: Re: [amibroker] Candlestick pattern scan
 
Terry thanks. Some remarks and questions about the use of includes.
 
1. When entering an include in the code it does not mean that you are calling the function. The link for the external function when running the code is available. That's all. Therefore I still do not understand why it should not be called in your code.
 
2. In most languages I know, you must place the includes as the first line in the code. You have placed the include as the last line. Can I place includes in AFL where ever I want to place them ?
 
Ton.
 
 
----- Original Message -----
From: Terry
Sent: Saturday, September 09, 2006 7:42 PM
Subject: RE: [amibroker] Candlestick pattern scan
 
All this does is change the background color of the chart. The first version IS used because it does not need to be "called" to work since it is not a function.
 
For those that don't realize what an Include file is: It simple INSERTS the include code in place of the #include line. It is the SAME as you typing the code inline and it just a convenience to a) make your code easier to read, b) save you time in re-writing code you frequently use. An #include is NOT a function, unless you design it as such as in my second example.
--
Terry
-----Original Message-----
From: [EMAIL PROTECTED]ps.com [mailto:amibroker@yahoogroups.com] On Behalf Of Ton Sieverding
Sent: Saturday, September 09, 2006 11:04
To: [EMAIL PROTECTED]ps.com
Subject: Re: [amibroker] Candlestick pattern scan
 
Thanks. Question of course is why entering the code because you did not use it in your code anyway ?
 
Ton.
 
----- Original Message -----
From: Terry
Sent: Saturday, September 09, 2006 2:26 AM
Subject: RE: [amibroker] Candlestick pattern scan
 
Didn't realize that was in there. I made it. It's very short and used as a convenience.
 
//One version
    BkgColor = ColorHSB( Param("Hue", 75, 0, 240 ),
    Param( "Saturation", 50, 0, 240 ),
    Param("Brightness", 200, 0, 240 ));
    SetChartBkColor( BkgColor );
 
//Another version as a function you can call
function SetBackColor( HUE, SAT, BRI )
{
    if (Version(0) >= 4.75)
    {
        BkgColor = ColorHSB(
            Param("Hue", HUE, 0, 240 ),
            Param( "Saturation", SAT, 0, 240 ),
            Param("Brightness", BRI, 0, 240 ));
        SetChartBkColor( BkgColor );
    }
}
 
--
Terry
-----Original Message-----
From: [EMAIL PROTECTED]ps.com [mailto:amibroker@yahoogroups.com] On Behalf Of Ton Sieverding
Sent: Friday, September 08, 2006 01:41
To: [EMAIL PROTECTED]ps.com
Subject: Re: [amibroker] Candlestick pattern scan
 
Terry where did you find the Color-Background inlude ?
 
Ton.
----- Original Message -----
From: Terry
Sent: Thursday, September 07, 2006 9:48 PM
Subject: RE: [amibroker] Candlestick pattern scan
< font face="Times New Roman" size="3"> 
See attached AFL I got from someone on this board and/or AB library.

--
Terry

-----Original Message-----
From: [EMAIL PROTECTED]ps.com [mailto:[EMAIL PROTECTED]ps.com] On
Behalf Of infynhome
Sent: Thursday, September 07, 2006 10:15
To: [EMAIL PROTECTED]ps.com
Subject: [amibroker] Candlestick pattern scan

HI,

Need help on creating scans for specifically scanning candlestick
patterns:

Dark cloud cover
Morning and evening star
doji
hammer and hanging man

I would appreciate if there are seperate scans for each of this pattern.

Kindly help
Mithil

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 other support material please check also:
http://www.amibroker.com/support.html

Yahoo! Groups Links


How low will we go? Check out Yahoo! MessengerÂ’s low PC-to-Phone call rates.


Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.
Great rates starting at 1¢/min. __._,_.___

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 other support material please check also:
http://www.amibroker.com/support.html






SPONSORED LINKS
Software support Small business finance Business finance online
Business finance training Business finance course

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

__,_._,___

Reply via email to