《PowerLanguage语法字典》PDF下载

  • 购买积分:10 如何计算积分?
  • 作  者:MultiCharts中国技术顾问团队著
  • 出 版 社:北京:东方出版社
  • 出版年份:2013
  • ISBN:9787506066426
  • 页数:228 页
图书介绍:PowerLanguage是全世界最广为使用的程序化交易语言,语法构架自然通俗,指标和信号的书写近乎口语化英文,对没有编程背景的投资者更容易学习,也提供了复杂功能,满足不同客户需求。本书是国内关于PowerLanguage语法的中文版书籍。我们希望通过本书,帮助更多的程序化交易者快速熟悉PowerLanguage程序脚本的编写构架和方法。详细整理MultiCharts7.4及MultiCharts8.5版本的关键字的功能,并一一举例说明。章节依照公式编辑器的字典顺序而排,即按照功能和字母顺序,并标记不同颜色字体,便于快速查阅。关键字均经过测试验证,并标记测试结果或注意事项,便于使用者找到正确方法学习。了解和使用PowerLanguage的读者们,本书将是您爱不释手的工具字典。

第1章 Accounts and Position账户与部位 1

GetAccount 1

GetAccountID 1

GetNumAccounts 1

GetNumPositions 2

GetPositionAveragePrice 2

GetPositionOpenPL 2

GetPositionQuantity 3

GetPositionSymbol 3

GetPositionTotalCost 3

GetRTAccountEquity 3

GetRTUnrealizedPL 4

第2章 Alert警报 5

Alert 6

AlertEnabled 7

Cancel Alert 7

CheckAlert 8

第3章 Arrow Drawing画箭头 9

Arw_Delete 9

Arw_GetActive 9

Arw_GetColor 9

Arw_GetDate 10

Arw_GetDirection 10

Arw_GetFirst 10

Arw_GetNext 11

Arw_GetSize 11

Arw_GetStyle 12

Arw_GetText 12

Arw_GetTextAttribute 12

Arw_GetTextBGColor 13

Arw_GetTextColor 13

Arw_GetTextFontName 13

Arw_GetTextSize 14

Arw_GetTime 14

Arw_GetTime_s 14

Arw_GetVal 15

Arw_New 15

Arw_New_s 15

Arw_New_self 16

Arw_New_self_s 16

Arw_SetColor 16

Arw_SetLocation 17

Arw_SetLocation_s 17

Arw_SetSize 18

Arw_SetStyle 18

Arw_SetText 18

Arw_SetTextAttribute 19

Arw_SetTextBGColor 19

Arw_SetTextColor 20

Arw_SetTextFontName 20

Arw_SetTextSize 20

MC_Arw_GetActive 21

第4章 Attributes属性设定 22

IntraBarOrderGeneration 22

LegacyColorValue 23

第5章 Colors色彩 24

Black 24

GetBValue 25

GetGValue 25

GetRValue 25

GradientColor 25

LegacyColorToRGB 26

RGB 26

RGBToLegacyColor 26

第6章 Comparison and Loops比较和循环 28

Switch&case 28

Once 29

Above/Over 29

And 30

Begin 30

Below/Under 30

Break 31

Cross/Crosses 31

DownTo 32

Else 32

End 33

False 33

For 33

If 34

Not 35

Or 35

Then 36

To 36

True 36

While 37

第7章 Data Information/General数据信息/常规 38

Ago 38

Bar/Bars 38

BarInterval 39

BarStatus 39

BarType/DataCompression 39

BarType_ex 39

BigPointValue 40

BoxSize 40

Close/C 41

Category 41

CurrentBar 42

Date/D 42

DailyLimit 42

Data 42

Day/Days 42

DownTicks 43

ExpirationDate 43

GetExchangeName 43

GetSymbolName 44

High/H 44

Low/L 44

Open/O 44

Openint/I 45

IntervalType 45

IntervalType_ex 46

MinMove 46

Next 47

Point/Points 47

PointValue 47

PriceScale 47

RevSize 47

SessionLastBar 48

Time/T 48

Time_s 48

This 48

Ticks 49

Today 49

UpTicks 49

Volume/V 50

Yesterday 50

第8章 Date and Time Routines日期和时间 51

ComputerDateTime 51

CurrentDate 52

CurrentTime 52

CurrentTime_s 52

DateTime2ELTime 52

DateTime2ELTime_s 52

DateTimeToString 53

DateToJulian 53

DateToString 53

DayFromDateTime 53

DayOfMonth 54

DayOfWeek 54

DayOfWeekFromDateTime 54

EL_DateStr 54

EL_DateToDateTime/ELDateToDateTime 55

EL_TimeToDateTime/ELTimeToDateTime 55

EL_TimeToDateTime_s/ELTimeToDateTime_s 55

EncodeDate 55

EncodeTime 56

FormatDate 56

FormatTime 57

Friday 57

HoursFromDateTime 57

IncMonth 58

JulianToDate 58

LastCalcJDate 58

LastCalcMMTime 58

LastCalcSSTime 59

MilliSecondsFromDateTime 59

MinutesFromDateTime 59

Monday 59

Month 59

MonthFromDateTime 59

Saturday 60

SecondsFromDateTime 60

StringToDate 60

StringToDateTime 61

StringToTime 61

Sunday 61

Thursday 62

Time_s2Time 62

Time2Time_s 62

TimeToString 62

Tuesday 63

Wednesday 63

Year 63

YearFromDateTime 63

第9章 Declaration声明 64

Array/Arrays 64

Input/Inputs 65

IntraBarPersist 66

Numeric 66

NumericArray 66

NumericArrayRef 67

NumericRef 67

NumericSeries 68

NumericSimple 68

String 68

StringArray 69

StringArrayRef 69

StringRef 70

StringSeries 70

StringSimple 70

TrueFalse 70

TrueFalseArray 71

TrueFalseArrayRef 71

TrueFalseRef 72

TrueFalseSeries 72

TrueFalseSimple 73

Variable/Variables/Var/Vars 73

第10章 Dynamic Array动态数组 74

Array_Compare 74

Array_Copy 75

Array_GetMaxIndex 75

Array_GetType 75

Array_SetMaxIndex 76

Array_SetValRange 76

Array_Sort 76

Array_Sum 77

Fill_Array 77

第11章 Environment Information环境信息 78

BaseDataNumber 78

CurrentDataNumber 78

ExecOffset 78

GetAppInfo 78

GetCountry 79

GetCurrency 79

GetUserID 80

MaxBarsBack 80

MaxBarsForward 80

第12章 Execution Control执行控制 81

Abort 81

fpcExactAccuracy 81

fpcHighAccuracy 82

fpcLowAccuracy 82

fpcMedAccuracy 82

fpcVeryHighAccuracy 83

fpcVeryLowAccuracy 83

RaiseRunTimeError 83

RecalcLastBarAfter 83

SetFPCompareAccuracy 84

第13章 Math and Trig数学函数 85

Absvalue/Pos 85

Arctangent 85

AvgList 85

Ceiling 86

Cosine 86

Cotangent 86

ExpValue 86

Floor 86

FracPortion 87

IntPortion 87

Log 87

Maxlist 87

Maxlist2 87

Minlist 88

Minlist2 88

Mod 88

Neg 88

Nthmaxlist 88

Nthminlist 89

Power 89

Random 89

Round 89

Sign 89

Sine 90

Square 90

SquareRoot 90

SumList 90

Tangent 90

第14章 Output输出 91

ClearDebug 91

ClearPrintlog 91

File 92

FileAppend 92

FileDelete 92

MessageLog 92

PlaySound 93

Print 93

第15章 Plotting指标画线 95

Default 95

GetBackgroundColor 95

GetPlotColor 96

GetPlotWidth 96

NoPlot 96

Plot 97

PlotPaintBar/PlotPB 98

SetPlotColor 98

SetPlotBGColor 99

第16章 Portfolio Stragegy Performance投资组合策略绩效 100

Portfolio_GrossLoss 100

Portfolio_GrossProfit 101

Portfolio_InvestedCapital 101

Portfolio_MaxIDDrawdown 101

Portfolio_NetProfit 101

Portfolio_NumLossTrades 102

Portfolio_NumWinTrades 102

Portfolio_PercentProfit 102

Portfolio_StrategyDrawdown 102

Portfolio_TotalTrade 103

第17章 Portfolio Stragegy Position投资组合策略部位 104

Portfolio_CalcMaxPotentialLossForEntry 104

Portfolio_CurrentEntries 104

Portfolio_MaxOpenPositionPotentialLoss 105

Portfolio_OpenPositionProfit 105

Portfolio_SetMaxPotentialLossPerContract 105

第18章 Portfolio Stragegy Properties投资组合属性 107

Portfolio_GetMarginPerContract 107

Portfolio_GetMaxPotentialLossPerContract 107

Portfolio_MaxRiskEquityPerPosPercent 108

Portfolio_TotalMaxRiskEquityPercent 108

PortfolioEntriesPriority 108

第19章 Quote Fields报价字段 109

CurrentOpenInt/q_OpenInterest 109

DailyClose 109

DailyHigh 109

DailyLow 109

DailyOpen 110

DailyVolume/q_TotalVolume 110

Description 110

ExchListed/q_ExchangeListed 110

InsideAsk/q_Ask 110

InsideBid/q_Bid 111

Last/q_Last 111

PrevClose/q_PreviousClose 111

q_BigPointValue 111

SymbolName/Symbol 111

TradeDate/q_Date 111

TradeTime/q_Time q_Time_s 112

第20章 Sessions交易时段 113

AutoSession 114

RegularSession 114

Sess1EndTime 114

Sess1FirstBarTime 114

Sess1StartTime 114

Sess2EndTime 114

Sess2FirstBarTime 115

Sess2StartTime 115

SessionCount 115

SessionCountMS 115

SessionEndDay 115

SessionEndDayMS 116

SessionEndTime 116

SessionEndTimeMS 116

SessionStartDay 117

SessionStartDayMS 117

SessionStartTime 117

SessionStartTimeMS 118

第21章 Skip Words跳跃字 119

A An At Based By Does From Is Of On Place Than The Was 119

第22章 Strategy Orders策略委托 120

ALL 121

Buy 122

BuyToCover 123

Contracts/Contract/Shares/Share 124

Cover 124

Enrty 125

Higher 125

Limit 125

Lower 126

Market 126

Sell 126

SellShort 128

SetBreakEven 129

SetDollarTrailing 130

SetExitOnClose 130

SetPercentTrailing 131

SetProfitTarget 131

SetStopContract/SetStopShare 132

SetStopLoss 132

SetStopPosition 133

Short 133

Stop 133

Total 134

第23章 Strategy Performance策略绩效 135

AvgBarsEvenTrade 135

AvgBarsLosTrade 136

AvgBarsWinTrade 136

AvgEntryPrice/i_AvgEntryPrice 136

AvgEntryPrice_at_Broker 136

AvgEntryPrice_at_Broker_for_The_Strategy 136

GrossLoss 137

GrossProfit 137

i_AvgEntryPrice_at_Broker 137

i_AvgEntryPrice_at_Broker_for_The_Strategy 138

i_ClosedEquity 138

i_CurrentContracts/i_CurrentShares 138

i_MarketPosition/MarketPosition 138

i_OpenEquity 138

LargestLosTrade 139

LargestWinTrade 139

MaxConsecLosers 139

MaxConsecWinners 139

MaxContractsHeld/MaxSharesHeld 140

MaxIDDrawDown 140

NetProfit 140

NumEvenTrades 140

NumLosTrades 141

NumWinTrades 141

PercentProfit 141

TotalBarsEvenTrades 141

TotalBarsLosTrades/TotalBarsLosTrade 142

TotalBarsWinTrades/TotalBarsWinTrade 142

TotalTrades 142

第24章 Strategy Position策略部位 143

BarsSinceEntry 143

BarsSinceExit 144

ContractProfit 144

CurrentContracts/CurrentShares 144

CurrentEntries 144

EntryDate 145

EntryName 145

EntryPrice 145

EntryTime 146

ExitDate 146

ExitName 147

ExitPrice 147

ExitTime 147

MarketPosition 148

i_MarketPosition_at_Broker MarketPosition_at_Broker 148

i_MarketPosition_at_Broker_for_The_Strategy MarketPosition_at_Broker_for_The_Strategy 148

MaxContractProfit 149

MaxContracts/MaxShares 149

MaxEntries 149

MaxPositionAgo 149

MaxPositionLoss 150

MaxPositionProfit 150

OpenPositionProfit 150

PositionProfit 151

第25章 Strategy Position Synchronization策略部位同步 152

ChangeMarketPosition 152

PlaceMarketOrder 152

第26章 Strategy Position Trades策略部位交易 154

OpenEntriesCount 154

OpenEntryComission 154

OpenEntryContracts 155

OpenEntryDate 155

OpenEntryMaxProfit 155

OpenEntryMaxProfitPerContract 156

OpenEntryMinProfit 156

OpenEntryMinProfitPerContract 156

OpenEntryPrice 157

OpenEntryProfit 157

OpenEntryProfitPerContract 157

OpenEntryTime 158

PosTradeCommission 158

PosTradeCount 158

PosTradeEntryBar 159

PosTradeEntryCategory 159

PosTradeEntryDateTime 160

PosTradeEntryName 160

PosTradeEntryPrice 161

PosTradeExitBar 161

PosTradeExitCategory 161

PosTradeExitDateTime 162

PosTradeExitName 162

PosTradeExitPrice 163

PosTradeIsLong 163

PosTradeIsOpen 164

PosTradeProfit 164

PosTradeSize 164

第27章 Strategy Properties策略属性 166

Commission 166

GetStrategyName 166

Margin 166

Slippage 166

第28章 Text Drawing绘制文本 167

MC_Text_GetActive 168

Text_Delete 168

Text_GetActive 168

Text_GetAttribute 169

Text_GetBGColor 169

Text_GetBorder 169

Text_GetColor 170

Text_GetDate 170

Text_GetFirst 170

Text_GetFontName 171

Text_GetHStyle 171

Text_GetNext 171

Text_GetSize 172

Text_GetString 172

Text_GetTime 172

Text_GetTime_s 173

Text_GetValue 173

Text_GetVStyle 173

Text_New 174

Text_New s 174

Text_New_self 174

Text_New_self_s 175

Text_SetAttribute 175

Text_SetBGColor 175

Text_SetBorder 176

Text_SetColor 176

Text_SetFontName 177

Text_SetLocation 177

Text_SetLocation_s 177

Text_SetSize 178

Text_SetString 178

Text_SetStyle 178

第29章 Text Manipulation文本操作 180

DoubleQuote 180

InStr 180

LeftStr 181

LowerStr 181

MidStr 181

NewLine 181

NumToStr 182

RightStr 182

Spaces 182

StrLen 182

StrToNum 182

Text 183

UpperStr 183

第30章 Trendline Drawing趋势画线 184

MC_TL_GetActive 185

MC_TL_New 185

TL_Delete 185

TL_GetActive 185

TL_GetAlert 185

TL_GetBeginDate 186

TL_GetBeginTime 186

TL_GetBeginTime_s 187

TL_GetBeginVal 187

TL_GetColor 187

TL_GetEndDate 188

TL_GetEndTime 188

TL_GetEndTime_s 188

TL_GetEndVal 189

TL_GetExtLeft 189

TL_GetExtRight 189

TL_GetFirst 190

TL_GetNext 190

TL_GetSize 191

TL_GetStyle 191

TL_CetValue 191

TL_GetValue_s 192

TL_New 192

TL_New_s 192

TL_New_self 193

TL_New_self_s 193

TL_SetAlert 194

TL_SetBegin 194

TL_SetBegin_s 195

TL_SetColor 195

TL_SetEnd 196

TL_SetEnd_s 196

TL_SetExtLeft 197

TL_SetExtRight 197

TL_SetSize 197

TL_SetStyle 198

Tool_Dashed 198

Tool_Dashed2 198

Tool_Dashed3 199

Tool_Dotted 199

Tool_Solid 199

第31章 MultiCharts 8.5版本新增 201

31.1 Accounts and Positions 201

InitialCapital 201

31.2 Attributes 201

ProcessMouseEvents 201

31.3 Data Information/General 201

ScrollToBar 202

Symbol_Close 202

Symbol_CurrentBar 203

Symbol_Date 203

Symbol_DownTicks 203

Symbol_High 204

Symbol_Length 204

Symbol_Low 204

Symbol_Open 205

Symbol_OpenInt 205

Symbol_Ticks 206

Symbol_Time 206

Symbol_Time_S 207

Symbol_UpTicks 207

Symbol_Volume 208

31.4 Declaration 208

RecalcPersist 208

31.5 DOM 208

DOM_AskPrice 209

DOM_AsksCount 209

DOM_AskSize 210

DOM_BidPrice 210

DOM_BidsCount 210

DOM_BidSize 210

DOM_IsConnected 211

31.6 Dynamic Arrays 211

Array_GetBoolean Value 211

Array_GetFloatValue 211

Array_GetIntegerValue 212

Array_GetStringValue 212

Array_SetBooleanValue 212

Array_SetFloatValue 213

Array_SetIntegerValue 213

Array_SetStringValue 213

31.7 Environment Information 214

GetAppInfo 214

GetCDRomDrive 215

GetUserName 215

SetMaxBarsBack 215

31.8 Execution control 215

#Return 215

ReCalculate 216

31.9 ExpertCommentary 216

#BeginCmtry 216

AtCommentarybar 217

CheckCommentary 218

Commentary 218

Commentarycl 218

CommentaryEnabled 219

31.10 MouseClickEvents 219

MouseClickBarNumber 219

MouseClickCtrlPressed 219

MouseClickDataNumber 220

MouseClickDateTime 220

MouseClickPrice 220

MouseClickShiftPressed 220

31.11 Strategy Performance 220

SetCustomFitnessValue 220

31.12 Strategy Position 221

BarsSinceEntry_Checked 221

BarsSinceExit_Checked 222

EntryDate_Checked 222

EntryPrice_Checked 223

EntryTime_Checked 224

ExitDate_Checked 224

ExitPrice_Checked 225

ExitTime_Checked 225

MarketPosition_Checked 225

MaxContractProfit_Checked 226

MaxContracts_Checked/MaxShares_Checked 226

MaxEntries_Checked 227

MaxPositionsAgo 227

MaxPositionLoss_Checked 227

PositionProfit_Checked 228