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

Notification

Icon
Error

Options
Go to last post Go to first unread
alberto.tortella  
#1 Posted : Monday, May 15, 2006 12:04:18 PM(UTC)
alberto.tortella

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/13/2006(UTC)
Posts: 53
Location: Verona - Italy

With the following exploration (in column B) I obtain this error: "Filter reference to N/A value in column B (ValueWhen(3,Fml("MINI"), FmlVar("MACD Bierovic","MOVMACD")) < ValueWhen(2,Fml("MINI"), FmlVar("MACD Bierovic","MOVMACD"))) AND (ValueWhen(3,Fml("MINI"), FmlVar("MACD Bierovic","MOVMACD")) < ValueWhen(1,Fml("MINI"), FmlVar("MACD Bierovic","MOVMACD"))) AND ((ValueWhen(1,Fml("MINI"),HIGH) < ValueWhen(2,Fml("MINI"),HIGH))) AND (ValueWhen(2,Fml("MINI"),HIGH) < ValueWhen(3,Fml("MINI"),HIGH)) What does it mean? Thank you Alberto
Jose  
#2 Posted : Monday, May 15, 2006 1:34:41 PM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
It means that your conditions for column B are not plotting any values. jose '-)
wabbit  
#3 Posted : Monday, May 15, 2006 3:28:14 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)
alberto.tortella wrote:
ValueWhen(3,Fml("MINI"),HIGH)
As Jose eluded to: to be able to return a value, the event in your code (Fml("MINI")) must have happened at least three times! If this event has not happed three times, then no value will be returned. You need to trap this situation on your code. wabbit :D
alberto.tortella  
#4 Posted : Tuesday, May 16, 2006 11:34:36 AM(UTC)
alberto.tortella

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/13/2006(UTC)
Posts: 53
Location: Verona - Italy

Thank you for the reply. I think that this is not a problem for the exploration: if the event has not happed at least three times, I don't want any result from the exploration. Do you agree? But I hope that when the event will happen for 3 times the explorer will advise me! :D Thank you
alberto.tortella  
#5 Posted : Wednesday, May 17, 2006 6:41:51 AM(UTC)
alberto.tortella

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/13/2006(UTC)
Posts: 53
Location: Verona - Italy

Maybe there is a problem in the code to obtain a MAX. MAXr2:= CLOSE > Mov(C,55,E) AND HIGH > Ref(HIGH,-1) AND HIGH > Ref(HIGH,-2) AND HIGH > Ref(HIGH, 1) AND HIGH > Ref(HIGH, 2) I don't know if it is ok the strings Ref(HIGH, 1) and Ref(HIGH, 2): is it possible to find a HIGH greater than the next 2 highs in the past candles? Thank you
wabbit  
#6 Posted : Wednesday, May 17, 2006 7:23:00 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)
alberto, You are setting yourself a dangerous precedence if you use Ref(x,+y). Please forget that the forward looking function even exists! We can only look into the past, so you have correctly identified that you need to rephrase your search criteria: MAXr2:= CLOSE > Mov(C,55,E) AND HIGH > Ref(HIGH,-1) AND HIGH > Ref(HIGH,-2) AND HIGH > Ref(HIGH, 1) AND HIGH > Ref(HIGH, 2) equates to: MAXr2:= Ref(CLOSE,-2) > Ref(Mov(C,55,E),-2) AND Ref(HIGH,-2) > Ref(HIGH,-3) AND Ref(HIGH,-2) > Ref(HIGH,-4) AND Ref(HIGH,-2) > Ref(HIGH,-1) AND Ref(HIGH,-2) > HIGH; this means the peak of highs was formed two bars ago and on that bar the close was above the MA, but only uses hindsight. You can modify the theory to find peaks over longer periods: x:=HIGH > Ref(HIGH,-1); y:=Input("Periods",1,10,2); Ref(Sum(x,LastValue(y)),-LastValue(y))=y AND Sum(x,y)=0; This says the peak is formed when there are 'y' consecutive higher high bars follwed by 'y' consecutive lower/equal high bars. You can progammatically add some latitude too, if you want to be strict that every bar in each part of the series must be higher etc. Hope this helps. wabbit :D
alberto.tortella  
#7 Posted : Thursday, May 18, 2006 4:07:23 PM(UTC)
alberto.tortella

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/13/2006(UTC)
Posts: 53
Location: Verona - Italy

I created an expert highlight with the following conditions: "MAX TRIPLE PAST" HIGH > Ref(HIGH, -1) AND HIGH > Ref(HIGH, -2) AND HIGH > Ref(HIGH, -3) AND HIGH > Ref(HIGH, 1) AND HIGH > Ref(HIGH, 2) AND HIGH > Ref(HIGH, 3) AND CLOSE > Mov(H,13,E) And it works correctly for the past candles on the graph. So I only need to insert these conditions in another expert in order to capture 3 consecutive peaks, not only one. I'm trying to use the function ValueWhen to identify the value of another indicator during these peaks, but I don't know if the following string really works: ValueWhen(2, Fml( "MAX TRIPLE PAST"), FmlVar("MACD Bierovic","MOVMACD")) < ValueWhen(3, Fml( "MAX TRIPLE PAST"), FmlVar("MACD Bierovic","MOVMACD")) Thank you!
wabbit  
#8 Posted : Thursday, May 18, 2006 5:02:12 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)
Alberto, I tried to warn you. :( I did try. :x As you ignored my warning, I am reluctant to help you again. :lol:
wabbit wrote:
You are setting yourself a dangerous precedence if you use Ref(x,+y). Please forget that the forward looking function even exists!
Honestly, please avoid the forward references at all costs. The same results can be found using by only looking back at history, not forwards in time. If you get into the habit of using forward references, then one day you are going to accidentally include in some code that you are going to want to trade... I have shown you how to amend your code. -- As for the other matter, what do you mean by you don't know if it works. If you type it into an exploration and you get the results you expect, then it works; if you don't, it doesn't! Remember we dont have copies of the FmlVar("MACD Bierovic","MOVMACD")) so we cannot tell you whether this is creating errors or what?? Please post all of the relevant code, then perhaps we might be able to help some more. I can tell you that until the Fml( "MAX TRIPLE PAST") event fires three times, the entire exploration will be NA and you will be getting the same rror messages that have already been discussed. 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.