Question about Blox basic functions and MFE/MAE e-ratio blox

Questions and discussion of Trading Blox and other platforms for non Trading Blox customers. Trading Blox customers should use the Trading Blox Support forum.
Post Reply
hamajyo
Senior Member
Senior Member
Posts: 28
Joined: Sat Dec 12, 2009 9:09 am
Location: Tokyo

Question about Blox basic functions and MFE/MAE e-ratio blox

Post by hamajyo » Mon Dec 14, 2009 12:56 pm

I have downloaded the Demo version to try it out. Now, I have two questions which are as follows:

First Question
I try to implement Ichimoku kinkou Hyo as custom indicators. The formulars are;
1. ConversionLine = ( Highest(instrument.high, 9)+ Lowest(instrument.low, 9)) / 2
2. BaseLine = ( Highest(instrument.high, 26)+ Lowest(instrument.low, 26)) / 2
3. LeadingSpan A = ( ConversionLine[26] + BaseLine[26] ) / 2
4. LeadingSpan B = ( Highest(instrument.high, 52, 26)+ Lowest(instrument.low, 52, 26)) / 2
5. LaggingSpan = instrument.close[-26]
From 1 to 4 there was no problem. but in No.5 LagginSpan the error message which says "the day index for the instrument property 'close' was -26 which is attempting to access the future" came up. When I use Metatrader4 they have index shift function which enables the indicators to shift certain days in both directions. In Trading Blox do you have a similar function? If not, can you implement this in next version?

Second question
In the book 'Way of the TURTLE', the author mentions that Trading Blox has MFE/MAE e-ratio evaluator. But I could not found in the list of Blox. Could you tell me which Blox I should choose?

Thanks a lot
Hama

P.S. I attached the Metatrader4 Code for Ichimoku Kinko Hyo. I hope it will help you out.
Attachments
Ichimoku.txt
(4.93 KiB) Downloaded 239 times

Roger Rines
Roundtable Knight
Roundtable Knight
Posts: 1946
Joined: Wed Oct 06, 2004 10:52 am
Location: San Jose, CA

Re: Question about Blox basic functions and MFE/MAE e-ratio

Post by Roger Rines » Mon Dec 14, 2009 2:15 pm

hamajyo wrote:[snip]
5. LaggingSpan = instrument.close[-26]
From 1 to 4 there was no problem. but in No.5 LagginSpan the error message which says "the day index for the instrument property 'close' was -26 which is attempting to access the future" came up.
I didn't have time to understand the code, but if the Negative reference you show was to move back in time, than the value would be entered as you did with other values you showed.

If you were attempting to move ahead in time, then you are only allowed to look at the next date, but not at any of its values. To do otherwise would create a "Crystal Ball" illusion in the resulting simulation.

Maybe someone else will be more helpful with this part of the question.
hamajyo wrote:Second question
In the book 'Way of the TURTLE', the author mentions that Trading Blox has MFE/MAE e-ratio evaluator. But I could not found in the list of Blox. Could you tell me which Blox I should choose?
Registered users of Trading Blox will gain access to the Blox Marketplace where blox contributions are stored and provided without cost. In that section of the forum there are two blox labeled: "Excursion_Ratio.tbx". The second blox is an update that expands upon the capabilities of the original blox.

There is some conversation in that thread along with three other blox that are also available: Entry_Edge_Tester.tbx, Donchian_Entry.tbx, MACD_Reverseable_PM.tbx

hamajyo
Senior Member
Senior Member
Posts: 28
Joined: Sat Dec 12, 2009 9:09 am
Location: Tokyo

Post by hamajyo » Tue Dec 15, 2009 2:55 pm

Hi Roger

Thanks a lot for your suggestion for the first question. Also I understood that only after purchasing the software I can get the MFE/MAE e-ration evaluator. At this test trial I can not test the component rt?

By the Way I have found the new problem about No.4 Leading Span B in First question . The formula is
4. LeadingSpan B = ( Highest(instrument.high, 52, 26)+ Lowest(instrument.low, 52, 26)) / 2
and I thought it was ok. But when I run a simulation, the error message 'While evaluating the calculated indicator LeadingSpanB, there was a problem: element count for array is greater than starting offset.' came up. Do you have any suggestion to fix this problem?

Many Thanks

Hama

Roger Rines
Roundtable Knight
Roundtable Knight
Posts: 1946
Joined: Wed Oct 06, 2004 10:52 am
Location: San Jose, CA

Post by Roger Rines » Tue Dec 15, 2009 4:53 pm

Hello Hama,
hamajyo wrote:Thanks a lot for your suggestion for the first question. Also I understood that only after purchasing the software I can get the MFE/MAE e-ration evaluator. At this test trial I can not test the component rt?
I don't think I understand this question, "the component rt?"

My belief with the evaluation version of Trading Blox is that it is a fully functional version with a calendar day limit. If you were able to take the text from the book, you would have no problem in testing any of the many Excursion properties. In my work with excursion, it is possible to generate and end of trade series of excursion values, or you can generate a bar series of excursion values. You can also generate a series of net change trade-equity values, so let your imagination be the limiting factor.
hamajyo wrote:By the Way I have found the new problem about No.4 Leading Span B in First question . The formula is
4. LeadingSpan B = ( Highest(instrument.high, 52, 26)+ Lowest(instrument.low, 52, 26)) / 2
and I thought it was ok. But when I run a simulation, the error message 'While evaluating the calculated indicator LeadingSpanB, there was a problem: element count for array is greater than starting offset.' came up. Do you have any suggestion to fix this problem?
Error message your getting is a result of reaching back beyond the beginning of the data start location. In other words, the math of adding 52+26=78 indcates that you cannot begin to apply the calculation until you reach the 79th bar of the data. TB has a "Use for lookback" parameter option that prevents the calculations from beginning before the enough data has been primed so that the error you are getting is prevented.

If the value for the calculations are not part of the Parameter settings, then consider creating a processing filter that looks something like this:

Code: Select all

   If Instrument.Bar > (52 + 26) Then
      '  Do my calculations
   EndIf '  Bar Count Priming Filter 
By controlling the timing of when things begin to crunch data, you'll know that the bar counting will inform your scripts when there is enough data to compute a 52-bar Low, that is offset 26-bars back.

There are also Data Priming values that will load 5-years of data by default as long as you don't put the test-simulation date at the beginning of the data file. If you do place the date at the beginning of the file, then you'll need to have something like the above example priming filter so the Lowest calculation function has data where you are indicating it should work.

hamajyo
Senior Member
Senior Member
Posts: 28
Joined: Sat Dec 12, 2009 9:09 am
Location: Tokyo

problem of Ichimoku Leading Span B indicator

Post by hamajyo » Wed Dec 16, 2009 12:23 pm

Hi Roger
Thanks to your helpful instruction, now I have found the solution for the problem of Ichimoku Leading Span B indicator. My solution is
1. Created dummy indicator 'DummySpan B'= ( Highest(instrument.high, 52, 0)+ Lowest(instrument.low, 52, 0)) / 2
2. then set the formular; LeadingSpan B = DummySpan B[26]

Thanks a lot
HAMA
Roger Rines wrote:
hamajyo wrote:By the Way I have found the new problem about No.4 Leading Span B in First question . The formula is
4. LeadingSpan B = ( Highest(instrument.high, 52, 26)+ Lowest(instrument.low, 52, 26)) / 2
and I thought it was ok. But when I run a simulation, the error message 'While evaluating the calculated indicator LeadingSpanB, there was a problem: element count for array is greater than starting offset.' came up. Do you have any suggestion to fix this problem?
Error message your getting is a result of reaching back beyond the beginning of the data start location. In other words, the math of adding 52+26=78 indcates that you cannot begin to apply the calculation until you reach the 79th bar of the data. TB has a "Use for lookback" parameter option that prevents the calculations from beginning before the enough data has been primed so that the error you are getting is prevented.

Post Reply