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.
Frank
Members-
Content Count
398 -
Joined
-
Last visited
Content Type
Profiles
Forums
Calendar
Articles
Everything posted by Frank
-
I don't really understand programming enough to know why my Open Ecry can't call the right function to calculate ADX -- so I am copying this code that imbeds the needed function calls into the indicator --- because this works for me. inputs: Length(14); vars: Counter(0), TRange(0), MyRange(Length), PlusDM(0),MinusDM(0), Plus14(0), Minus14(0), DMIup(0),DMIdn(0), DMI_(0), CummDMI(0), Return(0), ADX_(0); {ZZZZZZZZZZZZ...DMIup/DMIdn...ZZZZZZZZZZZZZ} if CurrentBar = 1 then begin MyRange = Length; DMIup = 0; Plus14 = 0; Minus14 = 0; TRange = 0; for Counter = 0 to MyRange-1 begin if (High[Counter] - High[Counter+1] < 0) then PlusDM = 0 else PlusDM = High[Counter] - High[Counter+1]; if (Low [Counter+1] - Low [Counter] < 0) then MinusDM = 0 else MinusDM = Low [Counter+1] - Low [Counter]; if MinusDM >= PlusDM then PlusDM = 0; if PlusDM >= MinusDM then MinusDM = 0; TRange= TRange + TrueRange[Counter] ; Plus14 = Plus14 + PlusDM ; Minus14 = Minus14 + MinusDM ; end;{...counter=0 to myrange-1} if TRange <> 0 then begin DMIup = 100 * Plus14 / TRange; DMIdn = 100 * Minus14 / TRange; end else begin DMIup = 0 ; DMIdn = 0; end; end{...currentbar=1} else if CurrentBar > 1 then begin if High[0]-High[1] < 0 then PlusDM = 0 else PlusDM = High[0]-High[1]; if Low [1]-Low [0] < 0 then MinusDM = 0 else MinusDM = Low [1]-Low [0]; if MinusDM >= PlusDM then PlusDM = 0; if PlusDM >= MinusDM then MinusDM = 0; if MyRange > 0 then begin TRange = TRange[1] - (TRange[1] / MyRange) + TrueRange; Plus14 = Plus14[1] - (Plus14[1] / MyRange) + PlusDM; Minus14 = Minus14[1] - (Minus14[1] / MyRange) + MinusDM; end; if TRange<>0 then begin DMIup = 100 * Plus14 / TRange; DMIdn = 100 * Minus14 / TRange; end else begin DMIup = 0; DMIdn = 0; end; end;{...currentbar>1} {ZZZZZZZZZZZZZZZ...DMI_...ZZZZZZZZZZZZZZZZ} if DMIup + DMIdn= 0 then DMI_ = 0 else DMI_ = 100 * AbsValue(DMIup - DMIdn) / (DMIup + DMIdn); {ZZZZZZZZZZZ...ADX_...ZZZZZZZZZZZZZ} Return = 0 ; if CurrentBar >= 1 and Length > 0 then begin if CurrentBar < Length then begin CummDMI = 0 ; for Counter = 0 to CurrentBar - 1 begin CummDMI = CummDMI + DMI_[Counter] ; end ; Return = CummDMI / CurrentBar ; end else Return = (ADX_[1] * (Length - 1) + DMI_) / Length ; end ; ADX_ = Return ; {ZZZZZZZZZZZZ...Plot...ZZZZZZZZZZZZZ} plot1(adx_,"adx");
-
Using same account to login multiple windows of OEC trader
Frank replied to Frank's topic in Open E Cry
Just to circle back, It took just a few minutes for this request to be processed through the OEC live help chat conversation. Just ask for the Trader Manager 2nd login. You end up with your same login name -- only with TM added on the end -- & you use your same password as your original login. Very easy to do. ie, Login1: Trader Login2: TraderTM -
Using same account to login multiple windows of OEC trader
Frank replied to Frank's topic in Open E Cry
thanks brownsfan for checking it out --- what do you mean by 'Trader Manager'? -- you mean I email a formal request saying 'I would like a Trader Manager'? can you clarify? I am asking this question here rather than calling and asking OEC just so others don't have to. I don't know how a 'Trader Manager' is diff't than just installing the platform on a second computer and logging in for 2nd time there using same login? thx in advance... awesome help. frank -
Using same account to login multiple windows of OEC trader
Frank replied to Frank's topic in Open E Cry
yah, same account... even if only can trade from one -- would be nice to try some diff't layouts. -
can I run Open Ecry on 2 computers simultaneously? I currently have 4 monitors on 2 computers -- can Ecry be set-up to have 2 concurrent log-ins?
-
can play around with this: "if ____ then buy next bar at open of tomorrow" or "if ____ then buy next bar at open of tomorrow+2 stop" (buy stop 2 pts above OP) "if ____ then buy next bar at open of tomorrow-4 limit" (buy 4 pts below OP limit order) enjoy your weekend, d-bag. frank (btw, there are a bunch of EL coding tips like this in Art Collins book 'Beating the Financial Futures Market")
-
EasyLanguage Indicator -- How Long (in Min) 1500 Tick Bar Took to Complete
Frank replied to Frank's topic in Coding Forum
thanks, someone sent me this fyi which seems to work for me: ----------- if (BarType = 0) then begin { tick bars } if date = date[1] then begin value1 = (TimeToMinutes(time)-TimeToMinutes(time[1])); if value1<=15 then plot1(value1,"tick time"); if value1>15 then plot2(15,"15"); plot3(5,"5"); end; end; ----------- note, it maxes out for 15 minutes so that the chart doesn't skew entirely for globex session --- ie, it might take hours to complete a tick bar btw, I was trying to target a 5-minute chart on ticks just as a benchmark to gauge 'activity' -- in terms of are ticks acting unusualy vs a 5-minute 'benchmark'... -
I am trying to create something similar to Average True Range... but instead of range it would compare ticks to time. ie, the last 14 tick bars took on average XX minutes.... it would use the time stamps of the bars and the number of bars.... doesn't 'seem' like this would be too hard -- but I don't know how to do such code... can anyone help out?
-
thanks popstocks, what timeframe chart are you using here?
-
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
-
you are missing how programming works. it reads bars -- the current bar and past bars is all it can read -- it can never read the next bar because that hasn't occured yet to a computer -- you can reference the next bar with an anticipatory order like 'buy on stop' or 'sell at XX limit'....
-
Brian, you should probably get a basic Easylanguage book and sit down and go through it -- it isn't hard. c = close of 'this' bar c[1] = close of the bar prior to the current one c[2] = close of the bar prior to that c[3] = close 3 bars ago etc.... so if: c>value1 and c[1]>value1[1] this means the current close is > the current location of the moving average AND the close of the prior bar was > than where the moving average was one bar ago. if you wrote c[1]>value1 --- then that would be comparing the prior bar to the current moving average -- which wouldn't make sense. so, you just have to think in terms of bars and logically flesh it out -- good luck.
-
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-
Brian, copy/paste your code below your posts. this is simple stuff and can easily be corrected -- you need to think like Easylanguage does in order to program it correctly -- ie, think in 'bars'. how many bars do you want to hold the position for or what does a bar have to do to generate the exit you want?
-
<<"when price moves above moving average X sell second bar" >> you have been vague but I will make some assumptions -- if you want it to sell the open of the second bar after the first CLOSE above the 20-period moving average: value1=average(c,20); if c>value1 then sell next bar at market;
-
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.
-
does Ecry not offer trading on Russell 2000? ie, TF H8? any idea why?
-
Customers of alternative investments want to see a strategy that has a definable edge and is structured toward 'lots of small bets' rather than a few big bets. If you have an edge AND have lots of small bets, the risk is controlled because the 'risk of a bad run of luck' will be minimized over many bets -- just as a top poker player will have low variance over 10,000 hands played, but might have a 30% (high) chance of losing significant money on the next 50 hands played.
-
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); ----------------------------------
-
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
-
VWAP Open Ecry needs to do VWAP.
-
Sky High VIX, Driven by a Lack of Leverage?
Frank replied to thrunner's topic in Market News & Analysis
yes, there is a good relationship between 'liquidity' & volatility... Liquidity may be artficially high due to over-leverage -- as we had a few years back. read this blog done 15 months ago by the author of truly prescient book written 6 months before that: http://rick.bookstaber.com/2007/08/can-high-liquidity-low-volatility-high.html THURSDAY, AUGUST 23, 2007 Can high liquidity + low volatility = high risk? Lower volatility can mean higher risk. Here is how I think we get to this paradoxical result. With the growth of hedge funds over the past few years, more and more capital has been scavenging for alpha opportunities. When anything moves a little out of line, there is plenty of money ready to pounce on it. That is, there is more liquidity. And this is great for the liquidity demanders – for example a pension fund that has to invest a recent inflow – because they don’t have to move prices very far to elicit the other side of the trade. And that means lower price volatility. The lower volatility in turn leads to higher leverage. One reason is that many funds base their leverage on value at risk, and they calculate value at risk using historical volatility. So when there is lower volatility they can lever more and still stay within their VaR limits. A second reason is that as more capital flows into the market and as leverage increases, there is more money chasing opportunities. Alpha from the opportunities is thus dampened, so a hedge fund now has to leverage up more in order to try to generate its target returns. And so the cycle goes – more leverage leads to more liquidity and lower volatility and narrower opportunities, which then leads to still higher leverage. This cycle is not much different than the classical credit cycle – which it is a part of this time around – where financial institutions make credit successively easier and easier because of competitive pressure and an environment that has, up to that point, been clear sailing. This then gets to the higher risk. Because the real risk in the markets is not the day-to-day volatility, it is the risk of a crisis. And as I argue in A Demon of Our Own Design, high leverage is one root cause of crisis. Bernanke has said the hedge funds “provide a good deal of liquidity in the markets and help the markets work more efficiently.” And that should be good, right? Well, it depends on how they are getting that liquidity. If it is through leverage, there may be a cloud inside that silver lining. This relationship between liquidity, volatility versus risk is hard to observe, because there is nothing in the day-to-day markets to suggest anything is wrong. In fact, with volatility low, everything looks just great. We don’t know that leverage has increased, because nobody has those numbers. We don’t know how much liquidity will be forthcoming if there is a market stress, nor do we know how many of those who are the liquidity providers in the normal, quiet market times will move to the sidelines, or turn into liquidity demanders themselves. On the surface, the water may be smooth as glass, but we cannot fathom what is happening in the depths. -
yes. it is used to compare 2 different strategies --- and should be used as a framework on how to think about trading.
-
in order to create a more 'research-intuitive' measure -- re-work the formula. This is done through focusing on the statistical significance of the measure as a key component. In statistics, you can easily be 'fooled by randomness' unless you are careful. the Sharpe Ratio is a prime example of this. Enter the 'Fundamental Law Of Active Management' (Grinold, Kahn) where the true 'Reward-Risk' measure should be thought of as the Information Ratio (IR) Where: IR is apporximately equal to = 'Expected Return' x SqRt(# of independent bets a strategy has) note the first part of equation factors in big wins and small losses into the 'expected return' for a single trade 'opportunity'. the second part of the equation is the part that directly links the 'statistical significance' of the strategy. ie, just a few independent trades a year will not yield a big IR, unless the 'expected' return is huge. The point here is that Sharpe Ratio can be 'garbage in, garbage out' -- you need to focus on the statistical significance of each strategy you design and measure that strategy properly -- by directly building that into the equation. A strategy that generates 4 trading opportunities a year is no good -- why? because that is not enough opportunities to drive the expectancy in a statistically significant way. you are very prone to being 'fooled' by the historical results unless you drive the number of 'observations' up to a big number. lots of little bets like what a casino does with its 'edge' is the only way that these numbers truly 'work' -- otherwise you are just fooling yourself with numbers.
-
Review of Open ECry (futures broker)
Frank replied to brownsfan019's topic in Brokers and Data Feeds
Tradestation required a downloaded plug-in -- VWAP wasn't a standard feature built in. So this was not just EL code -- so I doubt it would work. I don't have access to Tradestation anymore so I can't try it anyway --- but I really doubt it would work. This can't be too hard to build. A cumulative volume weighted (O+H+L+C)/4) on a 1-minute chart would be decent proxy. I am not so great at coding stuff like this so won't attempt it --- but OEC surely has a few stud coders that could probably write some good efficient code quickly -- we just need to notify them that this is something we would like.