Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

  • Welcome Guests

    Welcome. You are currently viewing the forum as a guest which does not give you access to all the great features at Traders Laboratory such as interacting with members, access to all forums, downloading attachments, and eligibility to win free giveaways. Registration is fast, simple and absolutely free. Create a FREE Traders Laboratory account here.

popstocks

Easy Language in OEC, Help with Channel Indicator

Recommended Posts

I first started this code in the rapid indicator and realized that it was running my cpu to %50 every time that a new high or low was made on the chart. So I then tried moving it over to easy language to see if it ran better there but still no go. Can someone here more experienced in Easy with OEC please see what could be wrong? Thanks!

 

 

Inputs: L(15);

Plot1(Average(

 

 

Average((Close + Open) /2, 28) + Highest(High-Average((Close + Open) /2, 28),L)

 

,4),"Upper");

Share this post


Link to post
Share on other sites
I first started this code in the rapid indicator and realized that it was running my cpu to %50 every time that a new high or low was made on the chart. So I then tried moving it over to easy language to see if it ran better there but still no go. Can someone here more experienced in Easy with OEC please see what could be wrong? Thanks!

 

 

Inputs: L(15);

Plot1(Average(

 

 

Average((Close + Open) /2, 28) + Highest(High-Average((Close + Open) /2, 28),L)

 

,4),"Upper");

 

Should be easy enough. Not really sure what the calculation you are trying to accomplish here. Kind of looks like what you typed above got cut off.

Share this post


Link to post
Share on other sites

Hi,

 

That's the code I tested with in Easy, there is another bottom plot that makes up the channel but it is the same code just substituting low and lowest.

 

It compiles without errors in both Easy and Rapid, but when either version is applied to the chart the result is the same. The series plots fine and everything is good and cpu runs very low that is up until a new high or low is made and then my cpu runs up to 50% and oec starts to freeze / chart starts to lag. My CPU is only like a year old, equivalent code on thinkorswim for instance doesn't run cpu up more than maybe 1%.

 

 

 

This is the code with both upper and lower of the channel.

 

Inputs: L(15);

Plot1(Average(

 

Average((Close + Open) /2, 28)+ Highest(High-Average((Close + Open) /2, 28),L)

 

,4),"Upper");

 

 

Plot2(Average(

 

Average((Close + Open) /2, 28)+ Lowest(Low-Average((Close + Open) /2, 28),L)

 

,4),"Lower");

Share this post


Link to post
Share on other sites

Well I took a guess at what you wanted. No idea if this is what you were looking for, but it could be a starting point.

 

Inputs: Length(15),Bars_Back(15);

Variables:
Avg(0), HH(0),UC(0);


Avg=AverageFC(((Close+Open)/2),Length);
HH=Highest(High,Bars_Back);

UC=Avg+(HH-AVG);

Plot1(UC,"Upper Channel");

Share this post


Link to post
Share on other sites

No idea as I dont use anything using the Highest High or Lowest Low functions. Maybe using EL as the language will help.

 

Also, i have an older computer and OEC often runs at 100%, especially during times of high volatility, eg. when price is making a new high or a new low. I think older chips struggle to keep up with OEC for whatever reason. I am by no means a computer tech, but it could be the .net that it is based in. Maybe if you could put it on a new computer to see if it acts the same way.

Share this post


Link to post
Share on other sites
No idea as I dont use anything using the Highest High or Lowest Low functions. Maybe using EL as the language will help.

 

Also, i have an older computer and OEC often runs at 100%, especially during times of high volatility, eg. when price is making a new high or a new low. I think older chips struggle to keep up with OEC for whatever reason. I am by no means a computer tech, but it could be the .net that it is based in. Maybe if you could put it on a new computer to see if it acts the same way.

 

 

I'll have to do more testing on Monday. OEC runs very low cpu even on volatile times for me, all the indicators I am running are not interfering with that - all except for this one that I am trying to fix.

Share this post


Link to post
Share on other sites

I just ran some "benchmarks"

 

I did a "load more data" without highest and lowest indicators on the chart and with.

 

Loading more data on a chart without these indicators takes about 5 seconds and that is including running other things like stoch and averages, however loading more with the highest and lowest the process takes 40 seconds and the cpu goes overboard! Looks like the highest and lowest functions must be what is making this code so heavy on the cpu.

Share this post


Link to post
Share on other sites
:)

 

So by declaring things separately and initializing variables etc it helps Easy code run better?

 

 

No idea, just made it easier to make. Would have to find someone w/ more knowledge than what I have.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.