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.
veggen
Members-
Content Count
4 -
Joined
-
Last visited
Personal Information
-
First Name
TradersLaboratory.com
-
Last Name
User
-
City
asker
-
Country
Norway
-
Gender
Female
Trading Information
-
Vendor
No
-
-
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?
-
They do not offer T&S, which is a pitty I think because I think that is a must!
-
I would really like the possibility to include drawing objects when constructing custom indicators. There are many indicators that I am missing, which are written in EL codes for tradestation, but simply do not work in OEC. Indicators like dynamic support resistance lines, automatic labeling of HH/HL DT/DB and so on..
-
How is your trading going?
- 2024 replies
-
- automated trading
- beginner
-
(and 76 more)
Tagged with:
- automated trading
- beginner
- bethlehem pa
- binary options
- binary options trading
- capitalization
- charlie mckelvey
- commodity stock tips
- commodity tips
- contrarian positions
- currencies
- day trading
- daytrading
- equity tips
- es-emini
- etf
- finance
- first day
- foreign currency
- forex
- forex accounts
- forex analysis
- forex forecasting
- forex trading
- forex webinar
- fundamentals
- furniture
- futures
- futures trading course
- international trade
- intro
- introduce
- introduce yourself
- introducing myself
- introduction
- investment
- java trading at
- learn forex trading
- london
- market analysis
- market forecasting
- markets
- momentum postions
- money
- money trader
- money trading
- new member
- newbie
- news
- options stocks
- philippines
- price
- price action
- price action trading
- real time
- sierra chart
- start
- startegy
- starting
- starts
- stock analysis
- stock education
- stock market beginners
- stock tips
- stocks and options
- stocks to watch
- system
- trader
- traders lab
- trading
- trading analysis
- trading live
- trading plan
- trading strategy
- univeristy of texas
- vinayak trader
- volatility
- volume