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.
wchg
Members-
Content Count
9 -
Joined
-
Last visited
Content Type
Profiles
Forums
Calendar
Articles
Everything posted by wchg
-
Thanks Tams, I'll try...
-
Hi, experts! Does the Easy Language automated strategy work with multiple data, for example if I want to buy and to sell simultaneously two instruments, something like that: if(condition) then begin buy next bar at the Close of Data1; sell next bar at the Close of Data2; end; If it possible, how to write the code properly? Thank you in advance for your help
-
The code is: # declare lower; input alpha = 0.02; input price = close; input pthree =0.0005 ; input nthree = -0.0005; def smooth = (price + 2 * price[1] + 2 * price[2] + price[3]) / 6; rec cycle = compoundValue(6, Sqr(1 - 0.5 * alpha) * (smooth - 2 * smooth[1] + smooth[2]) + 2 * (1 - alpha) * cycle[1] - Sqr(1 - alpha) * cycle[2], (price - 2 * price[1] + price[2]) / 4); plot CCO = cycle; plot ZeroLine = 0; plot plus1 = pthree; plot minus1 = nthree; #
-
Hi, Tams This is a TOS Code: declare lower; input alpha = 0.02; input price = close; input pthree =0.0005 ; input nthree = -0.0005; def smooth = (price + 2 * price[1] + 2 * price[2] + price[3]) / 6; rec cycle = compoundValue(6, Sqr(1 - 0.5 * alpha) * (smooth - 2 * smooth[1] + smooth[2]) + 2 * (1 - alpha) * cycle[1] - Sqr(1 - alpha) * cycle[2], (price - 2 * price[1] + price[2]) / 4); plot CCO = cycle; plot ZeroLine = 0; plot plus1 = pthree; plot minus1 = nthree
-
Hi I'm trying to do some translation between thinkscript and easylanguage. Does anyone know the equivalent of CompoundValue in easylanguage? CompoundValue function in TOS_thinkscript: Syntax: compoundValue(int length, IDataHolder visible data, IDataHolder historical data); Description: Calculates a compound value according to following rule: if a bar number is bigger than length then the visible data value is returned, otherwise the historical data value is returned. This function is used to initialize studies with recursion. Thanks a lot!
-
I rewrote the code..: #indicator "TestAsk", "Imported" vars: diff(0), Ask1(0), Ask2(0); Ask1 = InsideAsk of Data1; Ask2 = InsideAsk of Data2; diff = Ask1 - Ask2; Plot1(diff); ...and it started to work.
-
Hi, Everyone! This is the indicator that calculates the difference between Ask prices of two contracts. Here is the code: #indicator "TestAsk", "Imported" inputs: Ask1(InsideAsk of Data1), Ask2(InsideAsk of Data2); vars: diff(0); diff = Ask1 - Ask2; Plot1(diff); The indicator successfully compiles in OEC platform. I tried to place this indicator on the chart of two overlaying instruments, for example "6EZ0" and "6EH1" and I've got this error message: Timestamp 14:37:46.296; Text Unknown name: insideaskData(Of(1), insideask); Sender TestAsk(6EZ0, Data(Of(2), insideask), Data(Of(1), insideask)); Chart 6EZ0: 5 min Can anyone help me explain what is wrong. Thanks!
-
Thank you Tams and Blow Fish!...
-
On OpenECry trading platform there aren't available spread charts. Does anyone can help me to create spread chart between two contracts (for example wheat contracts: zwu0/zwz0) using Easy Language or some other language for OEC? Spread is a difference between prices of two contracts. Thanks.