forex software

Create and Test Forex Strategies

forex software

Skip to forum content

Forex Forum

Forex Software, Forex Strategies, Expert Advisors Generator

You are not logged in. Please login or register.


Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 17

Topic: Data alerts

I'm getting annoyed with data alerts and warnings at start-up, firstly the window and secondly the yellow bar alert above toolbar. Frankly I know and every half-experienced user knows very well whether the data is old or not etc. What I'm saying is that there should be a switch to shut-off that kind of alerts.

Thank you!

Re: Data alerts

I'm baffled at the moment, I tell Pro to do this: 1.46305-1.46303.

Pro answers 0.00001 ...

I fired up my old friend FSB 2.53.3.0 Beta to do the same, it tells me 0.00002!

How can Pro get it wrong?

Re: Data alerts

I tell Pro to do this: 1.46305-1.46303. Pro answers 0.00001 ...

How do you receive the answer?

There are different ways to print numbers in C#. I suggest you to use "F5" string format when you print prices.

See these C# examples in LINQPad.

http://s28.postimg.org/oe7wotk7t/screenshot_778.jpg

Re: Data alerts

Popov wrote:

I tell Pro to do this: 1.46305-1.46303. Pro answers 0.00001 ...

How do you receive the answer?

There are different ways to print numbers in C#. I suggest you to use "F5" string format when you print prices.

See these C# examples in LINQPad.

http://s28.postimg.org/oe7wotk7t/screenshot_778.jpg

I receive by subtracting MA values taken from MA array, the most primitive stuff I believe.

Just started Pro again, it's like a nightmare now... I left the indicator unchanged from last night, at least yesterday it calculated correctly, only the answer was wrong, not much, but wrong. Today it's all over the place. I start to question my modest coding abilities, but luckily as a huge fan of old FSBs I have plenty of them, so I copied the same indi from Pro to one of the latest FSBs, which uses the v2/v3 indicator standard as Pro. Have I lost my sanity? Lets find out!

What I'm doing:

answer[iBar] = MA[iBar] - MA[iBar-rearview];

MA 14, close,simple
Rearview 2

Pro:


http://s27.postimg.org/vuidtwoqn/pro1.jpg

http://s15.postimg.org/7iay1rocn/pro2.jpg


As we can see, it's 1,46303 - 1,46365 = -0.00062. Every calculator in my household tells me the answer is -0.00062.
Pro shows 3,09643 !"#¤[suitable cursing in your own choice and language].

OK, maybe it's me, it usually is, so lets copy the indi to FSB, which uses the same indicator standard, meaning no indi conversions.

FSB:

http://s15.postimg.org/wvzj540lj/fsb1.jpg

http://s10.postimg.org/jstkhhc8l/fsb2.jpg

Again, rather straightforward 1,42451 - 1,43522 = -0,01071. And as everyone can see it IS -0,01071 in the old FSB. I have an old beta FSB, it needed indi conversion, but nevertheless it performed flawlessly as well.

Upside - I'm still sane. But what the hell is going wrong...

Re: Data alerts

I'm sure there is a very trivial explanation to that.
If you attach the indicator, I may find the problem.

Re: Data alerts

Thanks, Miroslav!

I deleted the dll and recompiled, finally I was able to re-establish the base line I first had. A note to you - I did reload the indi around 10 times after modifications, that's when the indi went haywire showing totally wrong numbers (>1), I don't know if you can reproduce this issue though...

About the first problem I encountered (values being off by 0.00001), I'm thinking the cause is that the value of the MA can be very long or near infinite, but on the info panel in FSB it is rounded. Therefore, when I use the values in indi calculations it is not using the rounded ones, but the actual values, hence more precise end result but a slight deviation if rounded ones were to be used. What do you think, is it plausible explanation?

Re: Data alerts

Therefore, when I use the values in indi calculations it is not using the rounded ones, but the actual values, hence more precise end result but a slight deviation if rounded ones were to be used.

The chart info rounds the numbers, however this doesn't reflect on the calculations. FSB Pro calculates with the full precision. The signal calculations use Sigma for calculating the signals. You can see the Indicator logic functions how it works for the different logic rules. These functions are absolutely the same in all versions of the program and also in the MQL code. Actually you can look at the MQL code for the signals and indicators calculations.

Re: Data alerts

Another issue I want to ask you:
when I do this

(10 / 100) * 0.0001

FSB shows "-" as a result.

When I declare this

double value = 0.00001;

FSB shows 0.00001 in the info panel.
What I'm doing wrong that the calculation is resulting in "-"?

Re: Data alerts

What I'm doing wrong that the calculation is resulting in "-"?

There isn't anything wrong. See the code below:

if (isDebug)
{
    asInfoValue[row++] = indComp.Value[bar].ToString(CultureInfo.InvariantCulture);
}
else
{
    double dl = Math.Abs(indComp.Value[bar]);
    string sFr = dl < 10 ? "F5" : dl < 100 ? "F4" : dl < 1000 ? "F3" : dl < 10000 ? "F2" : dl < 100000 ? "F1" : "F0";
    if (Math.Abs(indComp.Value[bar] - 0) > 0.000001)
        asInfoValue[row++] = indComp.Value[bar].ToString(sFr);
    else
        asInfoValue[row++] = "   -";
}

If you want to see unrounded values, press F12 and you'll toggle the debug mode.

Re: Data alerts

So I take it that it just doesn't print on the screen. If I were to use that in some following calculations, the value of 0.00001 should be or actually has to be respected in all circumstances.

I did check this:

value = (10 / 100) * 0.0001;
if (value > 0) trace[iBar]= 999;

Basically every bar on the chart has to give me the trace value, which is 999. But it doesn't, only thing I see is "-"...
Further proof is Pro crashing due to the fact that the value of 0.00001 is not passed through, only zero is.

Re: Data alerts

Debug mode shows beautiful round zero!

Re: Data alerts

Footon, I cannot understand what you want to tell me. I even do not know if you speak for the main chart or for a separate chart.

Why do not call me via Skype and show me what you are doing. We'll fix it for a minute.

We can make a conference about building custom indicators or a webinar and to show to the users the whole process.

You know that if there is a bug in FSB Pro we'll fix it in a moment.
Why you are  losing your time? For this two days you could have made five indicators.

Re: Data alerts

10 / 100 = 0

http://s28.postimg.org/55ffcjpg9/screenshot_779.jpg

Re: Data alerts

Lo and behold! This is what I see

http://s9.postimg.org/k96vneqgb/image.jpg

At last, was about time.

Thank you Miroslav for that screenshot, it provided me the clue. For this project 10/100 must equal to 0.1, now it does.

That skype thing is a great proposal, except I'm not into those things; I don't really know about the rest of the pack, but my development work takes more than a couple of days, porting something is easy and quick, but real development from idea to a working indi takes serious time for me. I'm not a math guy by heart, so usually I learn the math stuff, then work out the code in my head, then code. Really heavy stuff involves learning the code nuances as well. Lately my code has been great, no serious debugging at all, this "10/100" reminded the old days, hahaa.

I'll carry on, I expect this saga to continue though, if something starts pulling south, it usually does it to the end.

Thank you again! smile

Re: Data alerts

footon wrote:

Thanks, Miroslav!

I deleted the dll and recompiled, finally I was able to re-establish the base line I first had. A note to you - I did reload the indi around 10 times after modifications, that's when the indi went haywire showing totally wrong numbers (>1), I don't know if you can reproduce this issue though...

I am convinced this is a bug! Developer's hell. I make adjustments, reload the indi and something goes horribly wrong and those adjustments are not showing! DLL isn't reloaded and recompiled properly. Back to old days for me at the moment.

Re: Data alerts

Footon, I made a short video about reloading custom indicators.

Re: Data alerts

Thanks for the vid! I know I maybe thick-headed sometimes, but at least I have experience - I know how to reload indicators. What I'm saying is that if the reloading process is carried out numerous times and it involves error screens and subsequently fixing those errors one by one, reloading the indicator after every fix and additions, FSB Pro goes haywire! The fundamental behaviour of the indicator is changed (I'm talking about calculation changes, not cosmetic stuff), it's the second time I'm using Pro for indi development, and it's the second time this issue has risen. I turned back to old FSB, and it just works. I don't know...

Posts: 17

Pages 1

You must login or register to post a reply

Similar topics in this forum