# Need help for Creating very simple exploration........... Pls Help

#### bond20013

##### New Member
Hello friends,
I need a very simple (May be very simple for you but it's like rading Chinese for me ) exploration/ Scan where,
todays close > yesterday's close > day before yesterday's close
and average volume for last 3 days > 100000
and closing price > 50

#### tkamal

##### Member
Let me try..

TC = C; //todays close
YC=Ref(C,-1); //yesterday's close
Y2C=Ref(C,-2); //day before yesterday's close
//Cond1=TC > YC > Y2C;
Cond1=TC>YC AND YC>Y2C; // Thank you Leenaji

TV=V; //todays volumes
YV=Ref(V,-1); //yesterday's volumes
Y2V=Ref(V,-2); //day before yesterday's volumes
avgV = (TV + YV + Y2V)/3; //average volume for last 3 days
Cond2= avgV > 100000;

Cond3 = C > 50;

Buy = Cond1 AND Cond2 AND Cond3;

Last edited:

#### bond20013

##### New Member
Thank you very much. It worked like charm.
Apart from that i also learned some basic formula language. Thank You

#### bond20013

##### New Member
Thank you very much. It worked .
But now there is some other problem:
1. The result is lagging by one day
2. It is not scanning all the stocks present in database

Pls Help

#### LOVEENAJYOTHI

##### Well-Known Member
Let me try..

TC = C; //todays close
YC=Ref(C,-1); //yesterday's close
Y2C=Ref(C,-2); //day before yesterday's close
Cond1=TC > YC > Y2C;

TV=V; //todays volumes
YV=Ref(V,-1); //yesterday's volumes
Y2V=Ref(V,-2); //day before yesterday's volumes
avgV = (TV + YV + Y2V)/3; //average volume for last 3 days
Cond2= avgV > 100000;

Cond3 = C > 50;

Buy = Cond1 AND Cond2 AND Cond3;

One tiny correction
Code:
``Cond1=TC>YC AND YC>Y2C;``

#### bond20013

##### New Member
One tiny correction
Code:
``Cond1=TC>YC AND YC>Y2C;``
Thank you very much, now it is scanning all the stocks.

##### New Member
Let me try..

TC = C; //todays close
YC=Ref(C,-1); //yesterday's close
Y2C=Ref(C,-2); //day before yesterday's close
Cond1=TC > YC > Y2C;

TV=V; //todays volumes
YV=Ref(V,-1); //yesterday's volumes
Y2V=Ref(V,-2); //day before yesterday's volumes
avgV = (TV + YV + Y2V)/3; //average volume for last 3 days
Cond2= avgV > 100000;

Cond3 = C > 50;

Buy = Cond1 AND Cond2 AND Cond3;

I know I'll create a laugh, but pl tell me where and how I can use this coding?

#### bond20013

##### New Member
Please tell me how to set a formula line where sell condition will be 1.2 time of buy price.

#### manicminer

##### New Member
I know I'll create a laugh, but pl tell me where and how I can use this coding?
its amibroker explorer. u can use it with amibroker software