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

Notification

Icon
Error

Options
Go to last post Go to first unread
Bulli  
#1 Posted : Sunday, September 10, 2006 11:53:45 AM(UTC)
Bulli

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 9/26/2005(UTC)
Posts: 185
Location: Brazil

One of my friends (Caixa) asked a good question

In many of the expert advisor, the commentary says so and so happened 18 bars ago for example, how can I know which is the bar 18 without having to count the bars myself?

And imagine the commentary says 300 bars ago!

I ended up making this indicator for him, thought of sharing it, since I liked the question, at the same time maybe some one here has a better idea!

Periods:=LastValue(Cum(1));

Periods-Cum(1)

UserPostedImage

Bulli

wabbit  
#2 Posted : Sunday, September 10, 2006 5:38:33 PM(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)
Bulli,

I have also found it useful with the Experts that have these "countbacks" in them to add a symbol or another highlight to the Expert for the condition(s). (You have to code these yourself.)

In your example, I would have added a symbol to indicate the bar when the MACD crossed below the signal line.

It's a lot easier than having to lose more screen realestate to counter indicators, and certainly beats counting bars manually.



wabbit [:D]
Bulli  
#3 Posted : Sunday, September 10, 2006 5:53:28 PM(UTC)
Bulli

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 9/26/2005(UTC)
Posts: 185
Location: Brazil

Wabbit,

Thank you for the feed back.

Actually I did not add something for the MACD as he asked for a general solution, in other words for any expert that does this count back not just the MACD. It has to be general.

You would not really loss much except for some system resources off course, but just place the indicator in a minimized chart.

Thanks

Bulli

Users browsing this topic
Guest (Hidden)
Similar Topics
Bar counting (Basic Coding Techniques)
by Flexi 8/1/2014 1:18:19 PM(UTC)
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.