Welcome to the Traders Laboratory Forums.
Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
Old 11-07-2008, 04:20 PM   #1

Join Date: Aug 2008
Location: nyc
Posts: 48
Ignore this user

Thanks: 4
Thanked 11 Times in 10 Posts

Easy Language in OEC, Help with Channel Indicator

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");
popstocks is offline  
Reply With Quote
Old 11-07-2008, 04:39 PM   #2

Join Date: Oct 2006
Location: na
Posts: 307
Ignore this user

Thanks: 33
Thanked 89 Times in 58 Posts

Re: Easy Language in OEC, Help with Channel Indicator

Quote:
Originally Posted by popstocks »
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.
trader273 is offline  
Reply With Quote
Old 11-07-2008, 04:43 PM   #3

Join Date: Aug 2008
Location: nyc
Posts: 48
Ignore this user

Thanks: 4
Thanked 11 Times in 10 Posts

Re: Easy Language in OEC, Help with Channel Indicator

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");
popstocks is offline  
Reply With Quote
Old 11-07-2008, 04:51 PM   #4

Join Date: Oct 2006
Location: na
Posts: 307
Ignore this user

Thanks: 33
Thanked 89 Times in 58 Posts

Re: Easy Language in OEC, Help with Channel Indicator

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.

PHP Code:
InputsLength(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"); 
trader273 is offline  
Reply With Quote
Old 11-07-2008, 04:55 PM   #5

Join Date: Oct 2006
Location: na
Posts: 307
Ignore this user

Thanks: 33
Thanked 89 Times in 58 Posts

Re: Easy Language in OEC, Help with Channel Indicator

Lol, we must have posted at the same time.
trader273 is offline  
Reply With Quote
Old 11-07-2008, 04:56 PM   #6

Join Date: Aug 2008
Location: nyc
Posts: 48
Ignore this user

Thanks: 4
Thanked 11 Times in 10 Posts

Re: Easy Language in OEC, Help with Channel Indicator

Thank you,

I will play with that on monday to see if it helps. My first intuition is that OEC has some poorly coded Highest and Lowest that suck cpu.
popstocks is offline  
Reply With Quote
Old 11-07-2008, 05:01 PM   #7

Join Date: Oct 2006
Location: na
Posts: 307
Ignore this user

Thanks: 33
Thanked 89 Times in 58 Posts

Re: Easy Language in OEC, Help with Channel Indicator

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.
trader273 is offline  
Reply With Quote
Old 11-07-2008, 05:01 PM   #8

Join Date: Aug 2008
Location: nyc
Posts: 48
Ignore this user

Thanks: 4
Thanked 11 Times in 10 Posts

Re: Easy Language in OEC, Help with Channel Indicator

Quote:
Originally Posted by trader273 »
Lol, we must have posted at the same time.


So by declaring things separately and initializing variables etc it helps Easy code run better?
popstocks is offline  
Reply With Quote

Reply

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


Similar Threads
Thread Thread Starter Forum Replies Last Post
Easy Language Stop Loss Problem mctaff Automated Trading 23 02-20-2010 03:41 AM
Easy Language Strategy Help Marc33139 Automated Trading 3 07-28-2008 11:35 AM
Need Assintance with Simple Indikator ( Easy Language ) flyingdutchmen Coding Forum 1 06-30-2008 06:32 PM
Accessing Market Indices in Easy Language goldspot Technical Analysis 3 12-26-2007 11:01 PM
Easy Language - Help with Simple System gatrader E-mini Futures Trading Laboratory 8 12-17-2007 06:40 PM

All times are GMT -4. The time now is 12:06 PM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.