Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/27/2006(UTC) Posts: 135
|
How to plot the recent C constant for previous 10 bars
The recent C maybe 2.21
Want to plot 2.21 constant for the previous 10 bars
|
|
|
|
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)
|
What code have you tried?
wabbit [:D]
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/27/2006(UTC) Posts: 135
|
Wabbit,
The below plot the C constant for the previous 10 bars but the C is the intial C of previous 10 bars not the most recent C of previous 10 bars
ri:=LastValue(Cum(1))-Cum(1); ri2:=Mod(ri,10); ValueWhen(1,ri2>Ref(ri2,-1),C)
|
|
|
|
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)
|
I don't understand precisely what you're trying to do, so this may or may not help. Code:
ri:=LastValue(Cum(1))-Cum(1);
ri:=Mod(ri,10);
ExtFml("forum.ref",C,-ri);
Again annotated charts help more than anything else... wabbit [:D]
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/27/2006(UTC) Posts: 135
|
Is there a easy method to find the below rather inputting the ref() for each data With 100 data would not have to input 100 ref() very cude Ref(C,-10)-C+Ref(C,-9)-C+Ref(C,-8)-C to Ref(C,-1)-C
|
|
|
|
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)
|
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/27/2006(UTC) Posts: 135
|
Wabbit,
For
ri:=LastValue(Cum(1))-Cum(1); ri:=Mod(ri,10); ExtFml("forum.ref",C,-ri);
Is there a alternative without using the forum ref?
|
|
|
|
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)
|
What's wrong with using the free function which actually returns the correct values?
wabbit [:D]
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/27/2006(UTC) Posts: 135
|
Don't want use dll rather want to use ms directly
|
|
|
|
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)
|
Not wanting to use the solution that works...
... whatever
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/13/2005(UTC) Posts: 715 Location: Midwest, USA
Was thanked: 1 time(s) in 1 post(s)
|
Hi Wabbit! I can understand wantig to do thing in "pure" MSFL, if for no other reason than to make sure I know what's going on, and why another way might be better... I'd think these two should be identical, but they're not: Code:ri:=LastValue(Cum(1))-Cum(1);
ri:=Mod(ri,10)*-1;
ExtFml("forum.ref",C,ri);
Code:ri:=LastValue(Cum(1))-Cum(1);
ri:=Mod(ri,10)*-1;
Ref(C,LastValue(ri+PREV-PREV));
|
|
|
|
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)
|
jjstein wrote:I can understand wantig to do thing in "pure" MSFL, if for no other reason than to make sure I know what's going on, and why another way might be better...
I'd think these two should be identical, but they're not
So... the MSFL code should be doing one thing, but returning a different than expected value, whereas the extfml() returns the expected value... so the thing you're not sure of here is how MS is dealing with the forward looking "workaround" (which in this instance doesn't work!) I have said it before and I am sure I will have to say it again in the future, if I have to spend more than a few minutes thinking about how to defeat the limitations of the MSFL, I will simply write the required functionality as an extfml(). 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.