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.

brownsfan019

Open ECry Wish List Thread

Recommended Posts

VWAP is easily done in EL on OEC.

I can post it later when I get some time.

 

pop's right - many things that can be done in EL can be transported to OEC. Might require a little leg work but if you really want it, you can give it a shot.

Share this post


Link to post
Share on other sites

This is what I use on a 1min chart:

---------------

 

 

 

 

vars:

PriceW(0),

 

ShareW(0),

bb(0),

a1(0),

hh(0),

ll(0),

ct(0),

ret(0),

rd(0),

vz(0);

 

 

 

 

if 1 = 1then begin

ct = ct +1;

end

 

if high > hh[1] then hh = high else hh = hh[1];

if low < ll[1] then ll = low else ll = ll[1];

 

 

if date > date[1] or ct=1 then begin

hh = high;

ll = low;

end;

 

 

if volume = 0 then

vz = 1 else vz = volume;

 

 

 

 

if date > date[1] then begin

PriceW = 0;

ShareW = 0;

end;

 

 

 

bb=average(volume,30);

 

if time > 0930 then begin

PriceW = pricew+ average(close,3)*bb;

ShareW = ShareW + bb;

a1 = PriceW / ShareW;

end;

 

if average(close,4) > a1 then

ret = (a1+hh)/2 else ret = (a1+ll)/2;

 

if average(close,4) > a1 then

rd = (a1+hh+hh+hh)/4 else rd = (a1+ll+ll+ll)/4;

 

Plot1(a1);

Plot2(ret);

Plot3((a1+ret)/2);

Plot4(rd);

Share this post


Link to post
Share on other sites

thanks for the vwap code, I will look it over.

 

on first glance, what is this?

----------

bb=average(volume,30);

----------

 

is this supposed to be average(volume,3); ????

 

why would you average the last 30 bars of volume?

 

thanks in advance

Share this post


Link to post
Share on other sites

i prefer a sort of smoothed quazi vwap on my 1min chart but if you don't like it that way you can go for a true vwap by replacing these 2 lines:

 

PriceW = pricew+ average(close,3)*bb;

ShareW = ShareW + bb;

 

with:

PriceW = pricew+ close*vz;

ShareW = ShareW + vz;

 

p.s. plot's 2,3, and 4 are showing you the .25 .5 and .75 distances between the vwap and the daily high or daily low. i suggest you draw these as points instead of lines.

Edited by popstocks

Share this post


Link to post
Share on other sites

this code is supposed to plot HH/HL.

 

Can any of you guys make this work?

 

//HH/LL tag inputs: LeftStrength( 3 ) , RightStrength( 3 ), LookBackLength( 100 ) ; variable: ID(-1), Offset( 0 ) , HighValue1(0), HighValue2(0), LowValue1(0), LowValue2(0), myValue1(0); Offset = .25 * Average( Range, 5 ) ; if PivotHighVSBar( 1, High, LeftStrength, RightStrength, RightStrength + 1 ) <> -1 then begin HighValue1 = PivotHighVS(1, High, Leftstrength, RightStrength, LookBackLength ); HighValue2 = PivotHighVS(2, High, Leftstrength, RightStrength, LookBackLength ); if HighValue2 <> -1 and ( ( HighValue1 >= HighValue2 - Offset ) and ( HighValue1 <= HighValue2 + Offset ) ) then begin ID = Text_New(Date[RightStrength], Time[RightStrength], High[RightStrength] + Offset, "DT"); Text_SetStyle(ID, 2, 0) ; Text_SetColor(ID, black); myValue1 = 1; end ; if HighValue2 <> -1 and HighValue1 > HighValue2 and myvalue1 = 0 then begin ID = Text_New(Date[RightStrength], Time[RightStrength], High[RightStrength] + Offset, "HH"); Text_SetStyle(ID, 2, 0 ) ; Text_SetColor(ID, Green); end else if HighValue2 <> -1 and HighValue1 < HighValue2 and myvalue1 = 0 then begin ID = Text_New(Date[RightStrength], Time[Rightstrength], High[RightStrength] + Offset, "LH"); Text_SetStyle(ID, 2, 0) ; Text_SetColor(ID, Red); end ; myValue1 = 0; end ; if PivotLowVSBar( 1, Low, LeftStrength, RightStrength, RightStrength + 1 ) <> -1 then begin LowValue1 = PivotLowVS(1, Low, Leftstrength, RightStrength, LookBackLength ); LowValue2 = PivotLowVS(2, Low, Leftstrength, RightStrength, LookBackLength ); if LowValue2 <> -1 and ( ( LowValue1 >= LowValue2 - Offset ) and ( LowValue1 <= LowValue2 + Offset ) ) then begin ID = Text_New(Date[RightStrength], Time[RightStrength], Low[RightStrength] - Offset, "DB"); Text_SetStyle(ID, 2, 0) ; Text_SetColor(ID, black); myValue1 = 1; end; if LowValue2 <> -1 and LowValue1 < LowValue2 and myValue1 = 0 then begin ID = Text_New(Date[RightStrength], Time[RightStrength], Low[RightStrength] - Offset, "LL"); Text_SetStyle(ID, 2, 0 ) ; Text_SetColor(ID, Red); end else if LowValue2 <> -1 and LowValue1 > LowValue2 and myValue1 = 0 then begin ID = Text_New(Date[RightStrength], Time[RightStrength], Low[RightStrength] - Offset, "HL"); Text_SetStyle(ID, 2, 0 ) ; Text_SetColor(ID, Green); end; myValue1 = 0; end ; plot1(high,"highlow",white); #function PivotHighVSBar {Function: PivotHighVSBar} inputs: Instance( numericsimple ), PriceValue( numericseries ), LeftStrength( numericsimple ), RightStrength( numericsimple ), Len( numericsimple ) ; variables: var0( 0 ), var1( 0 ) ; Value1 = Pivot( PriceValue, Len, LeftStrength, RightStrength, Instance, 1, var0, var1 ) ; PivotHighVSBar = var1 ; #function PivotHighVS {Function: PivotHighVS} inputs: Instance( numericsimple ), PriceValue( numericseries ), LeftStrength( numericsimple ), RightStrength( numericsimple ), Len( numericsimple ) ; variables: var0( 0 ), var1( 0 ) ; Value1 = Pivot( PriceValue, Len, LeftStrength, RightStrength, Instance, 1, var0, var1 ) ; PivotHighVS = var0 ; #function PivotLowVSBar {Function: PivotLowVSBar} inputs: Instance( numericsimple ), PriceValue( numericseries ), LeftStrength( numericsimple ), RightStrength( numericsimple ), Len( numericsimple ) ; variables: var0( 0 ), var1( 0 ) ; Value1 = Pivot( PriceValue, Len, LeftStrength, RightStrength, Instance, -1, var0, var1 ) ; PivotLowVSBar = var1 ; #function PivotLowVS {Function: PivotLowVS} inputs: Instance( numericsimple ), PriceValue( numericseries ), LeftStrength( numericsimple ), RightStrength( numericsimple ), Len( numericsimple ) ; variables: var0( 0 ), var1( 0 ) ; Value1 = Pivot( PriceValue, Len, LeftStrength, RightStrength, Instance, -1, var0, var1 ) ; PivotLowVS = var0 ; #function Pivot {Function: Pivot} inputs: PriceValue( numericseries ), Len( numericsimple ), LeftStrength( numericsimple ), RightStrength( numericsimple ), Instance( numericsimple ), HiLo( numericsimple ), oPivotPriceValue( numericref ), oPivotBar( numericref ) ; variables: var0( 0 ), var1( 0 ), var2( 0 ), var3( 0 ), var4( false ), var5( false ) ; var3 = 0 ; var5 = false ; var1 = RightStrength ; while var1 < Len and var5 = false begin var0 = PriceValue[var1] ; var4 = true ; var2 = var1 + 1 ; while var4 = true and var2 - var1 <= LeftStrength begin condition1 = ( HiLo = 1 and var0 < PriceValue[var2] ) or ( HiLo = -1 and var0 > PriceValue[var2] ) ; if condition1 then var4 = false else var2 = var2 + 1 ; end ; var2 = var1 - 1 ; while var4 = true and var1 - var2 <= RightStrength begin condition1 = ( HiLo = 1 and var0 <= PriceValue[var2] ) or ( HiLo = -1 and var0 >= PriceValue[var2] ) ; if condition1 then var4 = false else var2 = var2 - 1 ; end ; if var4 = true then var3 = var3 + 1 ; if var3 = Instance then var5 = true else var1 = var1 + 1 ; end ; if var5 = true then begin oPivotPriceValue = var0 ; oPivotBar = var1 + ExecOffset ; Pivot = 1 ; end else begin oPivotPriceValue = -1 ; oPivotBar = -1 ; Pivot = -1 ; 

 

It does not seem to plot anything, but no errors when compiling it? :(

Share this post


Link to post
Share on other sites

I simplified the VWAP code and it matches my Ensign VWAP line with ~0 difference. Ensign uses the (O+H+L+C)/4 method to calculate the price at which to assign that bars volume. On a 1 or 2-minute chart, this ends up being an excellent approximation as the small errors offset each other to some extent as the day goes on.

 

Here is the code:

 

----------------------

vars:

PriceW(0),

ShareW(0),

bb(0),

vwap(0);

 

if date > date[1] then begin

PriceW = 0;

ShareW = 0;

end;

 

value1= (open+high+low+close)/4;

 

bb=volume;

 

if time > 0630 then begin {note, my charts are west coast time so 0630am is open}

PriceW = pricew + value1*bb;

ShareW = ShareW + bb;

vwap = PriceW / ShareW;

end;

 

Plot1(vwap);

----------------------------------

 

attachment.php?attachmentid=8815&stc=1&d=1229174726

5aa70ea0b2d27_VWAPPic.thumb.png.4b1fc2e6da1827b99608a091cce795c5.png

Share this post


Link to post
Share on other sites

TF is offered although I think they call it RLM something or 'nother, you have to enable the contract in their setup first otherwise you cannot add it.

 

Go to the quotes screen, right click and choose add market, then click the little magnifying glass in the screen that pops up, then 'contract lookup' pops up - click the button on the top right that says "contract setup" - then you will want to expand the list on the left for indices and scroll down to the mini russell which will have an unchecked box next to it, check the box, and then all the way on the right you want to set your default order quantity as well as what months you will be able to monitor, I have it set to front month, but you may prefer something else.

 

Now you can finally add it to your quotes or charts (or even trade it) the same way you add any other contract.

 

Why OEC doesn't have new contracts automatically show is a mystery to me.

Share this post


Link to post
Share on other sites

thx pop,

 

strange, mine was defaulting to a January contract rather than the March contract. so I set the RUS to show 'all months' in the contract set-up in order to pull up the March one.

 

for anyone else who reads this --- the correct symbol for March is RLM-MH9 and for June will be RLM-MM9. I have no idea why Ecry made such a simple thing so unintuitive.

Share this post


Link to post
Share on other sites

anyone know if you can open the open ecry written indicators and save them as new personal indicator and then alter them.

 

more specifically, I would like to add a line like 30 or 35 to my 'ADX indicator' -- which comes packaged as an indicator but I don't know how to access the EL code behind ADX in Ecry. I tried to import the EL code from Tradestation (actually Multicharts) but it comes as a reference to a function -- which Ecry doesnt' have -- as far as I know.

 

any tips? I know how to do basic code but not an expert.

 

thx in advance

Share this post


Link to post
Share on other sites
anyone know if you can open the open ecry written indicators and save them as new personal indicator and then alter them.

 

more specifically, I would like to add a line like 30 or 35 to my 'ADX indicator' -- which comes packaged as an indicator but I don't know how to access the EL code behind ADX in Ecry. I tried to import the EL code from Tradestation (actually Multicharts) but it comes as a reference to a function -- which Ecry doesnt' have -- as far as I know.

 

any tips? I know how to do basic code but not an expert.

 

thx in advance

 

Just make an indicator that is simply a plot for those values.

Then you can apply the indicator to ADX and the lines will overlay.

Share this post


Link to post
Share on other sites

Here you go:

inputs:
   Length( 14 ) , Level(35);


variables:
   ADXValue( 0 ) ;

ADXValue = ADX( Length ) ;

Plot1( ADXValue, "ADX" ) ;
Plot2(Level,"Level");



#function ADX
inputs: 
Length( numericsimple ) ; { this input assumed to be a constant >= 1 }

variables:
oDMIPlus( 0 ), 
oDMIMinus( 0 ), 
oDMI( 0 ), 
oADX( 0 ), 
oADXR( 0 ), 
oVolty( 0 ) ;

Value1 = DirMovement( H, L, C, Length, oDMIPlus, oDMIMinus, oDMI, oADX, oADXR, 
oVolty ) ;

ADX = oADX ;

 

I did that using what multicharts supplies. When OEC calls for a function, go the MC power editor and find the function ( assuming its there). Highlight and copy that function, go back to OEC and right click and select "add function". It usually has the correct name already in there for you, but just double check. When you first apply this indicator make sure you select "create in new area" that is in the lower left corner.

 

2hqclth.png

Share this post


Link to post
Share on other sites

I would like to suggest a feature that allow you configure alert to sends out an email or sms when condition(s) are met. Send out email or SMS when an order is executed.

 

I know most of you don't require something like this because you trade on a much shorter time frame. I find it very difficult now to trade shorter time frame while have a baby at home. So I have to move to a higher time higher time frame. My baby is a light sleeper, so an audio alert is out of the question.

 

I know there are programs like that. If someone can know a program that does the trick, please let me know.

 

Great appreciated.

Share this post


Link to post
Share on other sites
I would like to suggest a feature that allow you configure alert to sends out an email or sms when condition(s) are met. Send out email or SMS when an order is executed.

 

I know most of you don't require something like this because you trade on a much shorter time frame. I find it very difficult now to trade shorter time frame while have a baby at home. So I have to move to a higher time higher time frame. My baby is a light sleeper, so an audio alert is out of the question.

 

I know there are programs like that. If someone can know a program that does the trick, please let me know.

 

Great appreciated.

 

In the menu bar choose >Communications > Sound Alerts. There is already an email feature you can set up for different Alerts. I have never used it but it looks simple enough.

Share this post


Link to post
Share on other sites

I coded up a Peak Volume Price aka Developing POC indicator. It is set up for futures with $0.25 tick increments.

 

 

//PopStocks PVP

 

Vars: Counter, Op(0), Ct(0), hh(0), f(0);

Array: v[800](0), p[800](0);

 

If 1 = 1 then Ct =1+Ct;

If Date > Date[1] or Ct = 1 then begin

Op = Open-100;

 

For Counter = 1 to 800

begin

p[counter] = 0;

v[counter] = 0;

End;

 

End;

 

For Counter = 1 to 800

begin

p[counter] = (counter*.25)+Op;

 

If Close = p[counter] then v[counter]= volume+v[counter];

 

End;

 

hh = highestarray(v,800);

 

if hh> hh[1] then f = close;

 

Plot1(f);

Share this post


Link to post
Share on other sites

a 2min, but the smaller the timeframe the more accurate it will be. 1 tick will give you the exact reading. I prefer 2 min is though as there is less noise in the signal.

 

 

thanks popstocks, what timeframe chart are you using here?

Share this post


Link to post
Share on other sites
...It is set up for futures with $0.25 tick increments.

 

 

I dont use PVP, but I take it the hard coded .25 is for mainly the ES. I just added a mintick function so that it would work on all types of markets. I think that would help, but not exactly sure. Anyways, here it is:

 


//PopStocks PVP

Vars: Counter, Op(0), Ct(0), hh(0), f(0),mintick(0);
Array: v[800](0), p[800](0);

mintick=minmove/pricescale;

If 1 = 1 then Ct =1+Ct;
If Date > Date[1] or Ct = 1 then begin
Op = Open-100;

For Counter = 1 to 800
begin
p[counter] = 0;
v[counter] = 0;
End;

End;

For Counter = 1 to 800
begin
p[counter] = (counter*mintick)+Op;

If Close = p[counter] then v[counter]= volume+v[counter];

End;

hh = highestarray(v,800);

if hh> hh[1] then f = close;

Plot1(f);

Share this post


Link to post
Share on other sites

thanks trader, what i'd really like to do is get this working from an intrabarpersist but i can't seem to figure it out. another thing to do is to get this to plot the developing value areas, i tried a few different for and while loops but could not get it working. maybe you know how?

 

cheers!

-pop

Share this post


Link to post
Share on other sites

Sorry, thats over my head. Blu-ray has always been very helpful. Maybe he can get you started and then i could help out, as I have no idea how to start.

 

Does an EL exist of what you are trying to do?

Share this post


Link to post
Share on other sites

Thanks, I think I figured the VAL calulations out. I checked and it looks like intrabar persistance is not available on OEC. Here's the new code that also plots developing value areas.

 

//PopStocks PVP

 

Vars: Counter, Op(0), Ct(0), hh(0), f(0), indx(0), mintick(0);

Array: v[800](0), p[800](0), uvc[800](0);

 

mintick=minmove/pricescale;

 

If 1 = 1 then Ct =1+Ct;

If Date>Date[1] or Ct = 1 then begin

Op = Open-((800*mintick)/2);

 

For Counter = 1 to 800

begin

p[Counter] = 0;

v[Counter] = 0;

End;

 

End;

 

For Counter = 1 to 800

begin

p[Counter] = (Counter*mintick)+Op;

 

If Close = p[Counter] then v[Counter]= volume+v[Counter];

 

End;

 

hh = highestarray(v,800);

 

if hh> hh[1] then f = close;

 

if hh> hh[1] then for Counter = 1 to 800 begin

uvc[Counter] = 0;

end;

 

for Counter = 1 to (800-indx) begin

uvc[Counter]=v[Counter+indx+1];

end;

 

 

 

For Counter = 1 to 800

begin

 

If f = p[Counter] then indx = Counter;

 

End;

 

 

 

Plot1(f);

Plot2(f-(standarddevarray(v,indx,1)/highestarray(v,800)*50));

Plot3(f+(standarddevarray(uvc,800-indx,1)/highestarray(v,800)*50));

Share this post


Link to post
Share on other sites

This doesn't work. I'm not sure it is because of my system or it simply does not work. If set up and click on test, it crashed OEC trader.

 

In the menu bar choose >Communications > Sound Alerts. There is already an email feature you can set up for different Alerts. I have never used it but it looks simple enough.

Share this post


Link to post
Share on other sites
I simplified the VWAP code and it matches my Ensign VWAP line with ~0 difference. Ensign uses the (O+H+L+C)/4 method to calculate the price at which to assign that bars volume. On a 1 or 2-minute chart, this ends up being an excellent approximation as the small errors offset each other to some extent as the day goes on.

 

Here is the code:

 

----------------------

vars:

PriceW(0),

ShareW(0),

bb(0),

vwap(0);

 

if date > date[1] then begin

PriceW = 0;

ShareW = 0;

end;

 

value1= (open+high+low+close)/4;

 

bb=volume;

 

if time > 0630 then begin {note, my charts are west coast time so 0630am is open}

PriceW = pricew + value1*bb;

ShareW = ShareW + bb;

vwap = PriceW / ShareW;

end;

 

Plot1(vwap);

----------------------------------

 

Frank,

Thanks for the code, just been toying around with it. However, I have noticed that if I add to a chart and let it go for a while, then refresh the data the line changes. Do you, or anyone, know what may cause this?

 

TIA

Share this post


Link to post
Share on other sites

This may be due to you not having unchecked tick-by-tick update. You can uncheck that, or you can update the recursive function so that it only references the completed bars, (PriceW = pricew[1] + value1*bb;

ShareW = ShareW[1] + bb;) like in the following code:

 

vars:

PriceW(0),

ShareW(0),

bb(0),

vwap(0);

 

if date > date[1] then begin

PriceW = 0;

ShareW = 0;

end;

 

value1= (open+high+low+close)/4;

 

bb=volume;

 

if time > 0630 then begin {note, my charts are west coast time so 0630am is open}

PriceW = pricew[1] + value1*bb;

ShareW = ShareW[1] + bb;

vwap = PriceW / ShareW;

end;

 

Plot1(vwap);

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.