Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 12/12/2005(UTC) Posts: 5
|
i am trying to write what they call it THRUST BAR
and the difinition of the THRUST BAR is (((((Thrust bars close at or very near their highs. They are usually close
to double or greater than the size of those bars immediately
preceding them,)))
i found this thrust bar is very promising and it gives very strog signals i found this information in the site called www.trading-naked.com . so many intresting articals are there and this is one of the most powerfull ones.
then let us assume these craiteria on the thrust bars:
1. price close at the high or at least 1% from its delta lower than its acutal high
2. must be at least double the size of its preceding bar
i am new in writing metastock codes, i wrote some simple explorations but i coudnt solve this problem
and my problem comes from calculating the price range for the day beofe the last day. in the formula primer i coudnt find anything related to this
i hope someone can help me and can help the other friends coz this is really very intresting exploration
thanks in advance
saudksa
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 10/12/2005(UTC) Posts: 141 Location: Brooklyn,NY
|
Saudksa,
Hi. I'm not an expert but you could probably try somthing like this :
{X:=(H-L)>=Ref(H-L,-1)*2
AND (C>=H*.99);
x;}
You might have to modify it depending if you want it as an expert or an indicator,etc.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
sportrider and SaudKsa
I think you might want to add to the definition of the THRUST BAR that the previous day's range should not be zero.
Something along the lines of:
todaysRange:=H-L;
yesterdaysRange:=Ref(todaysRange,-1);
closeNearHigh:=C>=(H*.99);
thrustBar:=yesterdaysRange>0 AND todaysRange>(2*yesterdaysRange) AND closeNearHigh;
thrustBar;
Just a thought....
wabbit :D
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 10/12/2005(UTC) Posts: 141 Location: Brooklyn,NY
|
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 12/12/2005(UTC) Posts: 5
|
heloo guys.......
thanks for replying to my message ..
i dont agree with you that this is the right fourmela becasue you are going to calculate the the percantage from the acutal price of the stock not from the dailey range of the stock and what we are looking for is 5% close from the high
try this out :
If((H-L)>(Ref(H-L,-1)*2),1,0) AND
If((C-L)>((H-L)*.95),1,0)
i think when we add to this criteria, other two we will got more accurace for the next stock that will take the rally
If(C>BBandTop(C,20,S,2),1,0)
AND GapUp()
dont you agree with me??
i would love to see some comments
thanks everybody
saudksa
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
Now you're starting to confuse me!
A couple of days ago you said that todays trading range had to be twice the previous day's trading range, and yet your code has 1.5 times:
If((H-L)>(Ref(H-L,-1)*1.5),1,0)
which, by the way, is EXCATLY the same as writing it this way:
(H-L)>(Ref(H-L,-1)*1.5)
Do you want todays range to be 2 times yesterday, or 1.5 times yesterday?
As I stated in a previous post to you, you must be EXPLICIT in what you are trying to code, we and the computers are just dumb machines that will follow whatever instructions you tell us, without interpretation for what is right, or better, or whatever. If you wanted the daily close to be within 5% of the daily range of the high, you should have said so.
C>=(L+0.95*todaysRange);
Also, you have now added to the original criteria you were looking for. I don't mean to sound sharp, I don't mind helping people code, but please don't make us do your trading system development for you. That's your job.
Anyway, all together, I think your code should now look something like:
todaysRange:=H-L;
yesterdaysRange:=Ref(todaysRange,-1);
closeNearHigh:=C>=(L+0.95*todaysRange);
thrustBar:=
yesterdaysRange>0 AND
todaysRange>(2*yesterdaysRange) AND
closeNearHigh AND
C>BBandTop(C,20,S,2) AND
GapUp();
thrustBar;
Of course, this has now taken us on a journey FAR AWAY from the original intended THRUST BAR as described in http://www.trading-naked.com/library/JoeRossTradingManual_C26_225-230.pdf
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 12/12/2005(UTC) Posts: 5
|
hi wabbit
i think you didnt got my point , i didnt write the whole code to make you write everything for me .. i just recognize that when i but those three criterias togother (thrust,C>uperBolinger,Gapup) the stock will go up in the next few days
i just wanted people to get some benifts from the idea itself and i didnt ask you to write the whole code for me
and by the way i tried your code it didnt work ....
and if you try my code you will find it working fine
changing the percantage from 1% or 5% is the not a problem i was trying what best and i found 5% is much better in my markets even in the thrustbar manual the auther said 10%
the point is not the numbers it is the logic
thanks ....... :)
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
Now that I have my MS back, I tested the code as I had posted, and it works fine. It returned four stocks on the ASX that met the conditions on 22Dec and two on 23Dec. Just because there are no returns on a paticular day doesn't mean the code doesn't work.
An easy way to test if a code has ever returned a stock is to use the barssince() function in one of the Explorer columns and include in the filter that column whatever should have a value of 0 or more. Then only those stocks that have ever met the criteria will be returned from the exploration.
Here's what I used in my test:
ColA
todaysRange:=H-L;
yesterdaysRange:=Ref(todaysRange,-1);
closeNearHigh:=C>=(L+0.95*todaysRange);
thrustBar:=
yesterdaysRange>0 AND
todaysRange>(2*yesterdaysRange) AND
closeNearHigh AND
C>BBandTop(C,20,S,2) AND
GapUp();
BarsSince(thrustBar);
Filter
ColA>=0
Then sort descending by ColA.
On the other matter, if you are going to start heading away from the original subject in the thread, either state this or start a new discussion thread. It is difficult enough trying to ascertain what is going on in most of the threads at the best of times, let alone when people are purposely taking the discussions off-topic. Its not yet a rule, just the polite thing to do.
Hope this helps.
wabbit :D
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.