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

R: trading idea



PureBytes Links

Trading Reference Links

I completely agree with Mario about sharing with the list as much as you
can, because different points of view on the same subject can contribute to
a successful strategy.

I've been studying patterns for a while and I strictly believe there is
something good to work on.

I made some indicators on TS in order to create statistics on the debug
window and have a deeper glance on particular short term configurations.
On December 2001 S&C Magazine i published an article regarding this subject
and if somebody lost it, at the bottom I include one of the codes I use.

I made some research on gaps and I submit to the list some statistical
results hoping to be helpful.

TBOND FUTURE  
gaps down 7.19% times
reaches previous low 56.52% times
closes over previous low 46.15% times
gaps up 4.38% times
reaches previous high 71.43% times
closes below previous high 40% times

CRB INDEX
gaps down 18.04% times
reaches previous low 66.43% times
closes over previous low 53.46% times
gaps up 16.59% times
reaches previous high 56.67% times
closes below previous high 60.70% times

S&P 500 INDEX
gaps down 6.37% times
reaches previous low 72.36% times
closes over previous low 60.94% times
gaps up 9.04% times
reaches previous high 72.43% times
closes below previous high 54.98% times

ITALIAN MIB 30 FUTURE
gaps down 13.81% times
reaches previous low 70.16% times
closes over previous low 57.46% times
gaps up 18.25% times
reaches previous high 73.02% times
closes below previous high 58.63% times

The old Williams's Oops seems still valid.

below is the code one can include as Indicator or Signal
==========================================================
if O<L[1] then begin
	value1=value1+1;
end;
if value1>value1[1] and H>=l[1] then begin
	value2=value2+1;
end;
if value2>value2[1] and c>L[1] then begin
	value3=value3+1;
end;
if O>H[1] then begin
	value4=value4+1;
end;
if value4>value4[1] and L<=H[1] then begin
	value5=value5+1;
end;
if value5>value5[1] and c<H[1] then begin
	value6=value6+1;
end;

if lastcalcdate=date then begin
	print(getsymbolname);
print("GAPDOWN");
print("gaps down"," ",iff(barnumber>0,value1/barnumber,0)*100:4:2);
print("reaches previous low"," ",iff(value1>0,value2/value1,0)*100:4:2);
print("closes over previous low"," ",iff(value2>0,value3/value2,0)*100:4:2);
print("GAPUP");
print("gaps up"," ",iff(barnumber>0,value4/barnumber,0)*100:4:2);
print("reaches previous high"," ",iff(value4>0,value5/value4,0)*100:4:2);
print("closes below previous high","
",iff(value5>0,value6/value5,0)*100:4:2);
end;
===========================================================================

On the same way one can check whatever he wants.
Let me know what do you think about this approach.
Tks to everybody

Max Scorpio
(Italy)


-----Messaggio originale-----
Da: marika11 [mailto:marika11@xxxxxxxxx]
Inviato: mercoledì 20 marzo 2002 12.49
A: omega-list@xxxxxxxxxx
Oggetto: trading idea


Here it is the idea...
Assumption: In most indexes markets gaps on daily bars are rare
Idea to take advantage of this: to put in open 2 orders, one buy x point
under yesterday close, one sell x point above yesterday close (+ targets and
stop orders as anybody likes).
My original code: I'm a novice EL programmer (I know it's a terrible
code..:-)) , so most of you could improve it

Input:pointAdd(as You like);
var:AttivaHigh(-1),SellOK(-1),AttivaLow(-1),BuyOK(-1);

If  d<>d[1] Then begin

 AttivaHigh=0;
 SellOK=0;
 AttivaLow=0;
 BuyOK=0;
End;

If AttivaHigh=0 and closeD(1)+pointadd<High  Then AttivaHigh=1;
If SellOK=0 and AttivaHigh=1 Then begin
 sell at closeD(1)+pointadd limit;
 SellOK=1;
    buyok=1;
End;
If Time>=1725 {15 min to trading session end}
 then  Exitshort ("exsh") at market;

If AttivaLow=0 and closeD(1)-pointadd>Low  Then AttivaLow=1;
If BuyOK=0 and AttivaLow=1 Then begin
 Buy at closeD(1)-pointadd limit;
 BuyOK=1;
    sellok=1;

   End;
If Time>=1725  {15 min to trading session end}
then  ExitLong ("exLo") at market;

-------
targets and stops are to add (from TS2000 library)

One good idea to better set "x pointadd" is to make reference to yesterday
range or multiply a constant for ATR...

The original problem is that  with
"If  d<>d[1] Then begin....."

this buy/sell the open of second intraday bar...not the first; what I think
it'd be better is buy/sell closeD(1)+/-pointadd on stop but I can't code it
workely...
it's all
I wish somebody will be interested in it.
Mario