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

Notification

Icon
Error

Options
Go to last post Go to first unread
vikas  
#1 Posted : Wednesday, May 10, 2017 3:42:08 PM(UTC)
vikas

Rank: Member

Groups: Registered Users, Subscribers
Joined: 2/7/2015(UTC)
Posts: 12

Thanks: 9 times

Hey all.

As the heading says, can plotting be done on the previous bar, instead of the latest bar?

For example:-

In Expert Advisor, I want a signal/symbol to appear above the Ref(H,-1) bar of the following formula:

H<Ref(H,-1) AND Ref(H,-2)<Ref(H,-1)

This, obviously, plots on the latest bar. However I want the previous bar to be marked.

Can it be done at all?

TIA

wabbit  
#2 Posted : Thursday, May 11, 2017 1:16:48 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,106
Location: Perth, Western Australia

Was thanked: 12 time(s) in 12 post(s)
Code:

{plot}
H > Max(Ref(H,-1),Ref(H,+1));
thanks 1 user thanked wabbit for this useful post.
vikas on 5/11/2017(UTC)
vikas  
#3 Posted : Thursday, May 11, 2017 4:42:21 AM(UTC)
vikas

Rank: Member

Groups: Registered Users, Subscribers
Joined: 2/7/2015(UTC)
Posts: 12

Thanks: 9 times
Originally Posted by: wabbit Go to Quoted Post
Code:
{plot}
H > Max(Ref(H,-1),Ref(H,+1));

So looking into the future is the only way that it can be done, or is there any other way?

TIA

wabbit  
#4 Posted : Thursday, May 11, 2017 5:45:39 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,106
Location: Perth, Western Australia

Was thanked: 12 time(s) in 12 post(s)
Nope. Forward referencing i.e. looking into the future is just as bad as changing the past.
thanks 1 user thanked wabbit for this useful post.
vikas on 5/11/2017(UTC)
Users browsing this topic
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.