PureBytes Links
Trading Reference Links
|
Dear Frank,
Thank you for your gentle mail.
You may change anything you like. The code is yours since it is
released. The only "permission" perhaps is from Davidīs dog(through
his new translator). As for my Kiki, she said "A reply again?" and
took a short sleep.
And, please, whenever you see anything wrong, just describe what is
wrong. I suppose here is a dialogue forum.
Thank you very much again.
D.T.
--- In amibroker@xxxx, Frank <fesnay@xxxx> wrote:
> Dear Dimitris,
> Sorry that I changed your code without an explanation of what I was
> trying to accomplish - and then posting the change as if it was
> "better" than your code. I will not do this again.
> When I looked at the code and the results, I thought that the goal
> was to find out what the gain would be 10 days later after each
> harami signal.
> Also, I noted that your gains were computed on max values over the
> ten day span.
> What I attempted to accomplish was to give the 10th day value, and
> also give what the maximim gain would have been if we could have
> captured it.
> As a suggestion, maybe we could have a way to contact original
> authors when code is changed, and let that author post changes to
> the group if he/she approves.
> Once again, sorry.
> Frank
> At 07:13 AM 8/13/01 +0000, you wrote:
> >Dear Frank,
> >Please look #3744.
> >When presented first gifs, I included EXACTLY the case you refer.
> >The two BUYs are afew days apart. It is on the graph, it has green
> >arrows on the graph, I attached also the Exploration Result where
you
> >can read the dates for adjacent Haramis, I wrote a comment that
the
> >code DOES NOT confuses the Haramis and respond one by one
SEPARATELY,
> >WHAT ELSE SHOULD I WRITE TO PRESENT IT?
> >and you come to the quick conclusion that there is a bug and you
find
> >the reason for that bug(HOW ?)and give the solution.
> >Please read again #3744.
> >The code is doing exactly what you wrote the code is not doing.
> >It is written there.
> >D. T.
> >--- In amibroker@xxxx, Frank <fesnay@xxxx> wrote:
> >> David, et all:
> >> When there are more than 1 buy signal within a 10 trading day
> >> time frame, some of the columns on your explore showed "0".
> >> I did some minor rework, and came up with the following code.
> >> See if you like it.
> >> Frank
> >>
> >>
==================================================================
> >> /*BULLISH HARAMI BUY CONDITION*/
> >> /*GAIN 10 DAYS LATER*/
> >> /*PERCENTAGE SUCCESS*/
> >> /* UP TO THREE BUY SIGNALS WITHIN 10 DAYS ACCEPTABLE */
> >> /* WITH EACH BUY SIGNAL GIVEN A % GAIN FIGURE */
> >> u=5;/*PERCANTAGE DROP THE FIRST DAY*/
> >> d1=10;/*DAYS TO WATCH*/
> >> cond1=close<=(1-u/100)*open;
> >> cond2=close>open and close<ref(open,-1) and open>ref(close,-1);
> >> cond3=cond2 and ref(cond1,-1);
> >> BUY=cond3;
> >> h1=iif(barssince(buy) == 10,close,0);
> >> filter=ref(COND3,-d1);
> >> tempg1 = tempg2 = tempg3 = 0; //set up temporary gain holding
arrays
> >> sell=filter;
> >> h2 = iif(sell,hhv(close,d1),0);
> >> numcolumns=7;
> >> column0=ref(close,-d1+1);// Add 1 day to the 10 days - - a -1 is
> >yesterday, so
> >> -10 is 11 days ago
> >> tempg1 = iif(sell and tempg1 == 0 and tempg2 ==0 and
> >tempg3==0,close,0); //if
> >> first active occurance, assign tempg1
> >> tempg2 = iif(sell and tempg1 > 0 and tempg2 == 0 and
> >tempg3==0,close,0); //if
> >> tempg1 active, assign tempg2
> >> tempg3 = iif(sell and tempg1 > 0 and tempg2 > 0 and tempg3 ==0,
> >close,0);
> >> // if
> >> tempg1 and tempg2 active, assign tempg3
> >> column1 = iif(sell and tempg1 > 0 and tempg2 == 0 and tempg3 ==
> >> 0,tempg1,iif(sell and tempg2 > 0 and tempg3 == 0,tempg2,iif(sell
and
> >> tempg3,tempg3,0)));
> >> tempg1 = iif(barssince(buy) > 10,0,tempg1);
> >> tempg2 = iif(barssince(buy) > 10,0,tempg2);
> >> tempg3 = iif(barssince(buy) > 10,0,tempg3);
> >> column2=100*((column1-column0)/column0);
> >> column0name="Harami CLOSE"
> >> column1name="10th CLOSE"
> >> column2name=" % GAIN"
> >>
> >> COLUMN3=LASTVALUE(CUM(BUY));
> >> COLUMN4=(CUM(COLUMN2>0 AND SELL));
> >> COLUMN5=100*COLUMN4/COLUMN3;
> >> COLUMN6 = h2;
> >>
> >> COLUMN3NAME="Signals"
> >> COLUMN4NAME="# Profitable"
> >> COLUMN5NAME="% Profitable"
> >> COLUMN6NAME = "Max 10 Day High"
> >> COLUMN3FORMAT=1.0;
> >> COLUMN4FORMAT=1.0;
> >> COLUMN5FORMAT=1.2;
> >> COLUMN5FORMAT=1.2;
> >>
>
>=====================================================================
> >> At 08:37 PM 8/12/01 +0300, you wrote:
> >> >
> >> > Hi David,
> >> > I think here we have what you ask.
> >> > "FROM" 4 haramis "GAINED" 3, i. e. the
> >> > "% G" is 75%.
> >> > The most I liked is COLUMN4 syntax.
> >> >
> >> > /*BULLISH HARAMI BUY CONDITION*/
> >> > /*GAIN 10 DAYS LATER*/
> >> > /*PERCENTAGE SUCCESS*/
> >> > u=5;/*PERCANTAGE DROP THE FIRST DAY*/
> >> > d1=10;/*DAYS TO WATCH*/
> >> > cond1=close<=(1-u/100)*open;
> >> > cond2=close>open and close<ref(open,-1) and open>ref(close,-1);
> >> > cond3=cond2 and ref(cond1,-1);
> >> > h1=hhv(close,d1);
> >> > filter=ref(COND3,-d1);
> >> > BUY=cond3;
> >> > sell=filter;
> >> > numcolumns=7;
> >> > column0=ref(close,-d1);
> >> > column1=h1;
> >> > column2=100*(column1/column0-1);
> >> > column0name="HARAMI CLOSE"
> >> > column1name="HIGHEST CLOSE"
> >> > column2name="MAX GAIN"
> >> > COLUMN3=LASTVALUE(CUM(BUY));
> >> > COLUMN4=LASTVALUE(CUM(COLUMN2>0 AND SELL));
> >> > COLUMN5=100*COLUMN4/COLUMN3;
> >> > COLUMN3NAME="FROM"
> >> > COLUMN4NAME="GAINED"
> >> > COLUMN5NAME="% G"
> >> > COLUMN6NAME="B/S F"
> >> > COLUMN3FORMAT=1.0;
> >> > COLUMN4FORMAT=1.0;
> >> > COLUMN5FORMAT=1.0;
> >> >
> >> > The majority of my 400 stocks, although in a 2 years bearish
> >> > period, were above 50%
> >> >
> >> > Dimitris Tsokakis
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > Your use of Yahoo! Groups is subject to the
> >> > <http://docs.yahoo.com/info/terms/>Yahoo! Terms of Service.
> >> >
> >
> >
> >
> >
> >Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> >
|