31.07.2021 Views

Ultimate Algorithmic Trading System

Using automated systems for trading in stock markets

Using automated systems for trading in stock markets

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

■ Keywords

prevMarketPosition

marketPosition

entryPrice

executionCount

entryBar

intraDayTrdCnt

multiDayOrders

Buy

Sell

ExitLong

ExitShort

myTickValue

myMinTick

RampUp

symbol

totProfit

maxDD

perCentWins

numTrades

numWins

numLosses

commsn

equityPeak

dVal

dSloVal

signalName

orderKindArr(10)

trdPriceArr(10)

orderTypeArr(10)

sigNameArr(10)

barsLong

barsShort

tradeDays

numRecords

stp

lmt

mkt

moc

myTradeCollection

EquityClass

myEquityCollection

TradeInfo

302

EXCEL SYSTEM BACKTESTER

■ Functions and Subroutines

Here is a list of available functions and subroutines in this current version of the ESB.

Several of the indicators’ functions are ‘‘Data Length Dependent,’’ meaning that the

current value of the indicator is dependent on when it was first applied to the data.

This dependency does not have an impact if a large amount of data is used. The RSI

on a six-week crude chart read 59.77, whereas it read 56.77 on a one-year chart.

This dependency requires the last value to be carried over into the current indicator

calculation, and this is no big deal unless you call the indicator function/subroutine

multiple times on a single bar of data. Let’s say you want an RSI(14) and an RSI(30)

indicator calculated on the same bar; this requires a multiple function/subroutine

call where the last values of the respective RSI calculations need to be carried over.

Without the use of a class structure, the only way this can be handled is to pass

values back and forth to the subroutine. Here is an example of how to handle a

multiple subroutine call with different parameter values:

Call RSISub(myClose, 14, rsiVal1, upSumAvg1, dnSumAvg1, i, 1)

Call RSISub(myClose, 30, rsiVal2, upSumAvg2, dnSumAvg2, i, 1)

www.rasabourse.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!