Discussion of article "Developing graphical interfaces for Expert Advisors and indicators based on .Net Framework and C#" - page 7

 
andy.maverl:

Hi,


Can this be used with WPF application as well or just window form ?


Thanks

The code in the example is WinForms specific, but you can easily alter it for use with WPF. You just need to bind to different events on the WPF shell side. The code will be a bit different but the principles will remain the same.

You can also use the code as is if you just use the WinForms window as a host for XAML controls. You can do this with the new XAML Islands. This way you can use all of the modern UWP controls inside a WinForm.

 

I put the element "Timer" into the form.

It doesn't work...

I run the exe - it works.

I don't understand what's wrong yet....

 

also localisation doesn't apply...

 
Renat Akhtyamov:

also localisation doesn't apply...

What localisation?

 
Vasiliy Sokolov:

What localisation?

Let's say we take a price from MT

when we try to operate on it using the Sharpe algorithm, we get an error, because the price contains a dot, not a comma.

This bug in Sharpe is removed by applying the English localisation command:

System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");


when we run the programme in studio - everything is fine, but when we run it through MT - it doesn't work any more

the same problem with the Sharpe timer (it works there, but not through MT).

but otherwise, so far so good, we're moving forward.

 
Renat Akhtyamov:

let's say we took the price from MT

When we try to operate on it with the Sharpe algorithm, we get an error, because the price contains a dot, not a comma.

This bug in Sharpe is removed by applying the English localisation command:

System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");


when we run the programme in studio - everything is fine, but when we run it through MT - it doesn't work anymore

the same problem with the Sharpe timer (it works there, but not through MT).

But otherwise, so far so good, we're moving forward.

double can be transmitted directly. The standard is the same both there and there. As for purely system Sharpean things like timer - it will not work to pull them from MT like native ones, because the systems are very different.

 
Vasiliy Sokolov:

double can be passed directly. The standard is the same in both systems. As for purely system Sharpean things like timer, you can't pull them from mt as native ones, because the systems are very different.

not

in MT it's a dot, but in my studio, just like in Excel, it's a comma.

 
Renat Akhtyamov:
not

in MT it's a full stop, but in my studio, just like in Excel, it's a comma.

I'm not talking about thongs, I'm talking about IEEE-754, there's no full stop there.

 
Vasiliy Sokolov:

I'm not talking about the thong, I'm talking about IEEE-754, there's no dot.

And I'm not talking about the thong, I'm talking about the dubs.
 
Renat Akhtyamov:
not

in MT - dot, but in my studio just like in Excel - comma.

you have a unique C# :-) don't lose it by accident - it may be the only copy in the world. The more time passes, the more expensive it is