logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
pete123  
#1 Posted : Wednesday, January 7, 2009 7:58:05 AM(UTC)
pete123

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 1/7/2009(UTC)
Posts: 5

I find this useful on Bloomberg but i want to code on Metastock. Aprreciate if anyone can do. Thanks. Logic - helps in identifying uptrend / downtrend. 1. Identify a prospective bullish trend first: If price low > 12 prior lows, then selling pressure easing. 2. Plot bullish TD MA once condition (1) is satisfied where TD MA = 5 bars MA of lows & extends it for another 4 bars (ie. current price bar & 3 more into future). And if within the next 4 bars & the market does record a low greater than all 12 previous lows, then the 5-bar MA will continue for another 4 bars. Otherwise, the MA is not plotted.
wabbit  
#2 Posted : Thursday, February 5, 2009 3:31:06 AM(UTC)
wabbit

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)
Hi Pete,

Maybe something like this?

Code:

SellPressEasing:=Sum(L>Ref(L,-1),12) >= 12;
MA:=Mov(L,5,S);

TDMA:=If(SellPressEasing,MA,If(BarsSince(SellPressEasing) <= 3,ValueWhen(1,SellPressEasing,MA),0));

{plot}
TDMA;


Quote:
Otherwise, the MA is not plotted.
Once an indicator starts plotting (returning values) it cannot be switched on and off.


Hope this helps.

wabbit [:D]


edit: It seems the admin team have been playing around with the BBCode styles - - hence the gt and lt tags where the pointy arrows should be??


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.