Đang chuẩn bị liên kết để tải về tài liệu:
Ehlers, John - Cybernetics Analysis For Stock And Futures_8

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Tham khảo tài liệu 'ehlers, john - cybernetics analysis for stock and futures_8', tài chính - ngân hàng, đầu tư chứng khoán phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 182 CYBERNETIC ANALYSIS FOR STOCKS AND FUTURES aFiltArray O nCoefl nValuel nCoef2 aFiltArray l nCoef3 aFiltArray 2 nCoef4 aFiltArray 3 if currently flat look for a trade entry if nStatus 0 if nStatus 0 aFiltArray 0 0 aFiltArray 1 0 goLong 1 else if nStatus 0 aFiltArray 0 0 aFiltArray 1 0 goShort else in a long trade if nStatus 1 if stop hit sell long if low nStop if open nStop closeliong open else closeLong nStop check for reversal signal else if aFiltArray 0 0 aFiltArray 1 0 goShort in a short trade else if nStatus -1 FIGURE 12.5 Continued Adapting to the Trend 183 if stop hit cover short if high nStop if open nStop closeShort open else closeShort nStop check for reversal signal else if aFiltArray 0 0 aFiltArray 1 0 goLong gID function assigns unique identifier to graphic text routines function gID grID return grID Convert Degrees to Radians function DegToRad nValue var nTmp nTmp nValue Math.PI 180 return nTmp Convert Radians to Degrees function RadToDeg nValue var nTmp continued FIGURE 12.5 Continued 184 CYBERNETIC ANALYSIS FOR STOCKS AND FUTURES nTmp nValue 180 Math.PI return nTmp function Median nBars aArray var aTmp new Array var nTmp var result var X transfer elements to temp array X 0 while X nBars aTmpfx aArray x sort array in asc order aTmp.sort SortAsc if odd of elements just take middle if nBars 2 0 result aTmp nBars 1 2 aTmp null return result if even elements take average of two middle elements else nTmp nBars 2 result aTmptnTmp aTmp nTmp 1 2 aTmp null return result function SortAsc argl arg2 if argl arg2 return -1 FIGURE 12.5 Continued Adapting to the Trend . . . -. else return 1 enter a short trade function goShortO drawShapeRelatived high l Shape. DOWNARROW Color.maroon Shape.ONTOPI Shape.BOTTOM _ gID strategy.doShort Short Strategy.MARKET Strategy.NEXTBAR strategy.DEFAULT nEntryPrice. open l nstop nEntryPrice nSVal nPVal nStatus -1 close a short trade function closeShort nPrice drawShapeRelative 0 low Shape.UPARROW Color.blue Shape.ONTOPI .

crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.