(If you already have an account, login at the top of the page)
futures io is the largest futures trading community on the planet, with over 100,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.
At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors – all of which you can find on futures io, utilizing our social trading environment.
With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you don’t need to worry about fake reviews.
We are fundamentally different than most other trading sites:
We are here to help. Just let us know what you need.
We work extremely hard to keep things positive in our community.
We do not tolerate rude behavior, trolling, or vendors advertising in posts.
We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
We expect our members to participate and become a part of the community. Help yourself by helping others.
You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple.
Here you go. As you can see the translation is straightforward. C# is a bit verbose as it's a general purpose language so you have to follow its object oriented framework; but you will gain a lot in the future by using C#.
I tried to translate your EL code line by line without any change. So when I saw "High[1] - High[1]" was used in two places I also translated them without change but added comment wondering why you did this instead of just writing down 0 - could it be a typo, or you modified the script from something else into this?
EL result:
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).
NET result:
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).
The 2 screen shots show that my NET result matches your EL result. (I don't own MultiCharts standard version so I had to get a demo running on a Windows virtual machine to get EL result since demo on my physical machine has long expired ).
There might be minor differences around open and close because the data source is Interactive Brokers for EL and IQFeed for NET (cannot get 2 identical logins running simultaneously for either single data source).
I came up with another newbie question.I want to store some trendlinearray in an indicator ,which will be added manually time by time to use on different charts.But stuck ofcourse Here is what I got so far:
Don't know if the boolean is necessary at all , found it as an suggestion on tradingcode.net articles.
What am I doing wrong?
using System;
using System.Drawing;
using System.Linq;
using PowerLanguage.Function;
It's hard for me to tell what you're doing wrong here, since I don't get what you're trying to do. Perhaps an array with fixed values of 10000, 10050, and 10100 is a good idea, but it might also be a wrong approach to this problem.
I do know that you won't achieve your goal of 'added manually time by time to use on different charts'. That's because your `numbers` array is hardcoded, which doesn't make it manual and makes it the same on different charts.
That Boolean prevents the trend lines from being created with every script update. Currently, your script creates a trend line each each time `CalcBar()` executes. Even if you really wanted a new trend line drawn on every bar, this might give you troubles because there's a limit or 7,500 objects (see here), and that includes trend lines.
By the way, please read your code carefully because your for loop does the following:
That's probably not your intention with the code, I think.
Last edited by Jura; November 15th, 2015 at 10:18 AM.
Reason: typo
The following user says Thank You to Jura for this post:
sorry for my bad explanation .I want to collect horizontal trendlines ,which's price I can add manually.
This I tried with the array.Just keeping the prizes in this case and can be added with int[]numbers = new int [3]{10000,10050,10100};
Maybe there is a better solution , a list or sth similar.
ok then the boolean makes the code just print once - that's ok because it has not to be recalculated.
If I may observe something, then you're overcomplicating things with a `List<T>`. In your last script, you use a generic list and then store the list values into decimal variables. In that case you don't need a list at all, especially since there always seem to be at most 3 horizontal lines that you want to draw (if I understand correctly). It might simplify things a bit if you just use the three variables.
With other things you're oversimplifying, for instance:
This doesn't work that way; `CalcBar()` is executed on every bar, starting from the very first bar to the very last. Then, when there is real-time data, it's called on every tick (for strategies with intra-bar order generation and indicators set to 'update on every tick') or once per bar (for strategies without intra-bar generation and indicators with 'update on every tick' disabled).
This means it's not optional whether or not `CalcBar()` executes; it always does. Every script always calculates at least once per bar. It may not perform an action every time when `CalcBar()` executes, or your `CalcBar()` method may be empty with no code at all, but that doesn't mean that `CalcBar()` isn't called on every bar.
Edit. I noticed that your comment can also be read as 'it's good that the Boolean only executes the code once; that's what I need'. In that case my above explanation is not needed. But in that case I'm wondering why you say such a thing and not add it to the code?
Perhaps it's an idea to invest significantly more time in your replies, because it feels to me that I spend more time replying to you than you spend clarifying and proof-reading your requests for help. That's not how this is supposed to work in my view (assuming you want free help and a discussion that doesn't drag on for ages). Using the [ code ] .. [ / code ] tag would be nice too.
- - - - - - - -
By the way:
In your last script, you still have the values hardcoded. If you want to use your script on different charts, you'll probably want to use inputs so that you can configure the indicator for each chart. And not plot lines at 10,000 for EUR/USD, for instance, as the current script does.
Last edited by Jura; November 15th, 2015 at 05:51 PM.
Reason: Realised another interpretation
The following 2 users say Thank You to Jura for this post: