Multi Charts Userguide
Multi Charts Userguide
com
MultiCharts 5.5
User Guide
August 2009
www.tssupport.com
Contents 5
Table of Contents
Part I Introduction 20
Part IV MultiCharts 23
1 MultiCharts ...................................................................................................................................
Work Area 23
2 Understanding
...................................................................................................................................
Chart Window 30
3 Creating Charts
................................................................................................................................... 32
4 Chart Settings
................................................................................................................................... 38
Symbol Settings
.......................................................................................................................................................... 38
Changing.........................................................................................................................................................
Symbols 38
Chart Resolution
......................................................................................................................................................... 41
Quote Field......................................................................................................................................................... 47
Sessions ......................................................................................................................................................... 48
Data Range ......................................................................................................................................................... 49
Time Zone ......................................................................................................................................................... 51
Data Numbers
......................................................................................................................................................... 52
Using SubCharts
......................................................................................................................................................... 53
Chart Style .......................................................................................................................................................... 57
Chart Style......................................................................................................................................................... 57
OHLC Bar.........................................................................................................................................................
Chart 59
HLC Bar Chart
......................................................................................................................................................... 61
Hollow Candlestick
.........................................................................................................................................................
Chart 63
Candlestick.........................................................................................................................................................
Chart 65
Dot On Close
.........................................................................................................................................................
Chart 67
Line On Close
.........................................................................................................................................................
Chart 69
Invisible Chart
......................................................................................................................................................... 71
Chart Scaling.......................................................................................................................................................... 73
Chart Scaling
......................................................................................................................................................... 73
Scale Range......................................................................................................................................................... 75
Margins ......................................................................................................................................................... 79
Scale Type ......................................................................................................................................................... 80
Scale Labels
......................................................................................................................................................... 82
Volume Profile
......................................................................................................................................................... 88
5 Using Charts
................................................................................................................................... 90
Reloading Charts
.......................................................................................................................................................... 90
Adjusting Chart
.......................................................................................................................................................... 91
Using Pointers
.......................................................................................................................................................... 94
Making Screenshots
.......................................................................................................................................................... 96
Changing Visual
..........................................................................................................................................................
Order 97
Printing Charts
.......................................................................................................................................................... 98
6 Chart Window
................................................................................................................................... 99
.......................................................................................................................................................... 99
Chart Appearance
Background.......................................................................................................................................................... 100
Chart Window.......................................................................................................................................................... 102
Price Scale .......................................................................................................................................................... 105
Time Scale .......................................................................................................................................................... 107
Status Line .......................................................................................................................................................... 110
Volume Profile
.......................................................................................................................................................... 113
Data Window .......................................................................................................................................................... 114
................................................................................................................................... 115
7 Drawing Tools
Understanding
..........................................................................................................................................................
Drawing Tools 115
Trend Line .......................................................................................................................................................... 118
Horizontal Line
.......................................................................................................................................................... 121
Time Line .......................................................................................................................................................... 124
Regression Channel
.......................................................................................................................................................... 126
Equidistant Channel
.......................................................................................................................................................... 130
Andrews' Pitchfork
.......................................................................................................................................................... 133
Fibonacci Retracement
..........................................................................................................................................................
Price Lines 135
Fibonacci Speed/Resistance
..........................................................................................................................................................
Fan 138
Fibonacci Speed/Resistance
..........................................................................................................................................................
Arcs 141
Fibonacci Time
..........................................................................................................................................................
Zones 144
Fibonacci Trend-Based
..........................................................................................................................................................
Time Lines 146
Gann Fan .......................................................................................................................................................... 149
Gann Square.......................................................................................................................................................... 152
Retracement..........................................................................................................................................................
Calculator 155
Text .......................................................................................................................................................... 156
Rectangle .......................................................................................................................................................... 158
Ellipse .......................................................................................................................................................... 160
Arc .......................................................................................................................................................... 162
Arrow Down.......................................................................................................................................................... 164
Arrow Up .......................................................................................................................................................... 166
8 Studies ................................................................................................................................... 168
Using Studies.......................................................................................................................................................... 168
Indicator Settings
.......................................................................................................................................................... 173
Signal Settings
.......................................................................................................................................................... 178
Indicator Scaling
.......................................................................................................................................................... 181
Alerts .......................................................................................................................................................... 188
Study Templates
.......................................................................................................................................................... 192
Volume Profile
.......................................................................................................................................................... 194
9 Strategy Trading
................................................................................................................................... 195
Strategies .......................................................................................................................................................... 195
Understanding
.........................................................................................................................................................
Strategies 195
Strategy.........................................................................................................................................................
Properties 196
Backtesting .......................................................................................................................................................... 199
Understanding
.........................................................................................................................................................
Backtesting 199
Intra-Bar.........................................................................................................................................................
Price Movement Assumptions 200
Using Performance
.........................................................................................................................................................
Report 201
Bar Magnifier
......................................................................................................................................................... 204
Order Linking
......................................................................................................................................................... 205
Understanding
.........................................................................................................................................................
Precise Back Testing 206
Using Precise
.........................................................................................................................................................
Back Testing 207
Optimization.......................................................................................................................................................... 209
Understanding
.........................................................................................................................................................
Optimization 209
Performing
.........................................................................................................................................................
Optimization 212
Using Optimization
.........................................................................................................................................................
Report 216
Walk Forward
.........................................................................................................................................................
Optimization 218
AutoTrading.......................................................................................................................................................... 220
Understanding
.........................................................................................................................................................
Automated Trade Execution 220
Getting Started
.........................................................................................................................................................
With Auto Trading 222
Working.........................................................................................................................................................
with Auto Trading 229
Auto Trading
.........................................................................................................................................................
Status Messages 232
................................................................................................................................... 234
10 Portfolio Backtesting
Understanding
..........................................................................................................................................................
Portfolio Backtesting 234
Operating Portfolios
.......................................................................................................................................................... 236
Configuring ..........................................................................................................................................................
Strategies 240
Portfolio Settings
.......................................................................................................................................................... 244
Backtesting ..........................................................................................................................................................
a Portfolio 245
Portfolio Performance
..........................................................................................................................................................
Report 246
Portfolio Optimization
.......................................................................................................................................................... 247
11 Real-Time Market
...................................................................................................................................
Scanner 250
..........................................................................................................................................................
Understanding Real-Time Market Scanner 250
Working with
..........................................................................................................................................................
Grid 252
Working with
..........................................................................................................................................................
Symbols 253
Working with
..........................................................................................................................................................
Studies 256
Zen-Fire......................................................................................................................................................... 292
................................................................................................................................... 293
6 Managing Data
Importing Data
.......................................................................................................................................................... 293
Exporting Data
.......................................................................................................................................................... 296
Editing Data.......................................................................................................................................................... 297
Mapping ASCII
.......................................................................................................................................................... 299
Online Mode..........................................................................................................................................................
Data Collection 301
Data Cache .......................................................................................................................................................... 302
Import Symbol
..........................................................................................................................................................
List 303
Arw_SetColor
......................................................................................................................................................... 363
Arw_SetLocation
......................................................................................................................................................... 364
Arw_SetLocation_s
......................................................................................................................................................... 365
Arw_SetSize
......................................................................................................................................................... 366
Arw_SetStyle
......................................................................................................................................................... 367
Arw_SetText
......................................................................................................................................................... 368
Arw_SetTextAttribute
......................................................................................................................................................... 369
Arw_SetTextBGColor
......................................................................................................................................................... 370
Arw_SetTextColor
......................................................................................................................................................... 371
Arw_SetTextFontName
......................................................................................................................................................... 372
Arw_SetTextSize
......................................................................................................................................................... 373
Attributes .......................................................................................................................................................... 374
IntrabarOrderGeneration
......................................................................................................................................................... 374
LegacyColorValue
......................................................................................................................................................... 375
Colors .......................................................................................................................................................... 376
Black ......................................................................................................................................................... 376
Blue ......................................................................................................................................................... 377
Cyan ......................................................................................................................................................... 378
DarkBlue......................................................................................................................................................... 379
DarkBrown......................................................................................................................................................... 380
DarkCyan ......................................................................................................................................................... 381
DarkGray ......................................................................................................................................................... 382
DarkGreen......................................................................................................................................................... 383
DarkMagenta
......................................................................................................................................................... 384
DarkRed......................................................................................................................................................... 385
DarkYellow
......................................................................................................................................................... 386
GetBValue......................................................................................................................................................... 387
GetGValue......................................................................................................................................................... 388
GetRValue......................................................................................................................................................... 389
GradientColor
......................................................................................................................................................... 390
Green ......................................................................................................................................................... 391
LegacyColorToRGB
......................................................................................................................................................... 392
LightGray......................................................................................................................................................... 393
Magenta......................................................................................................................................................... 394
Red ......................................................................................................................................................... 395
RGB ......................................................................................................................................................... 396
RGBToLegacyColor
......................................................................................................................................................... 397
White ......................................................................................................................................................... 398
Yellow ......................................................................................................................................................... 399
Comparison..........................................................................................................................................................
and Loops 400
Above ......................................................................................................................................................... 400
And ......................................................................................................................................................... 401
Begin ......................................................................................................................................................... 402
Below ......................................................................................................................................................... 403
Cross ......................................................................................................................................................... 404
Crosses......................................................................................................................................................... 405
Downto ......................................................................................................................................................... 406
Else ......................................................................................................................................................... 407
End ......................................................................................................................................................... 408
False ......................................................................................................................................................... 409
For ......................................................................................................................................................... 410
If ......................................................................................................................................................... 411
Not ......................................................................................................................................................... 412
Or ......................................................................................................................................................... 413
Yesterday......................................................................................................................................................... 467
Date and Time..........................................................................................................................................................
Routines 468
ComputerDateTime
......................................................................................................................................................... 468
CurrentDate
......................................................................................................................................................... 469
CurrentTime
......................................................................................................................................................... 470
CurrentTime_s
......................................................................................................................................................... 471
DateTime2ELTime
......................................................................................................................................................... 472
DateTime2ELTime_s
......................................................................................................................................................... 473
DateTimeToString
......................................................................................................................................................... 474
DateToJulian
......................................................................................................................................................... 475
DateToString
......................................................................................................................................................... 476
DayFromDateTime
......................................................................................................................................................... 477
DayOfMonth
......................................................................................................................................................... 478
DayOfWeek......................................................................................................................................................... 479
DayOfWeekFromDateTime
......................................................................................................................................................... 480
EL_DateStr
......................................................................................................................................................... 481
EL_DateToDateTime
......................................................................................................................................................... 482
......................................................................................................................................................... 483
EL_TimeToDateTime
EL_TimeToDateTime_s
......................................................................................................................................................... 484
ELDateToDateTime
......................................................................................................................................................... 485
ELTimeToDateTime
......................................................................................................................................................... 486
ELTimeToDateTime_s
......................................................................................................................................................... 487
EncodeDate
......................................................................................................................................................... 488
EncodeTime
......................................................................................................................................................... 489
FormatDate
......................................................................................................................................................... 490
FormatTime
......................................................................................................................................................... 492
Friday ......................................................................................................................................................... 494
HoursFromDateTime
......................................................................................................................................................... 495
IncMonth......................................................................................................................................................... 496
JulianToDate
......................................................................................................................................................... 497
LastCalcJDate
......................................................................................................................................................... 498
LastCalcMMTime
......................................................................................................................................................... 499
LastCalcSSTime
......................................................................................................................................................... 500
MillisecondsFromDateTime
......................................................................................................................................................... 501
MinutesFromDateTime
......................................................................................................................................................... 502
Monday ......................................................................................................................................................... 503
Month ......................................................................................................................................................... 504
MonthFromDateTime
......................................................................................................................................................... 505
Saturday......................................................................................................................................................... 506
SecondsFromDateTime
......................................................................................................................................................... 507
StringToDate
......................................................................................................................................................... 508
StringToDateTime
......................................................................................................................................................... 509
StringToTime
......................................................................................................................................................... 510
Sunday ......................................................................................................................................................... 511
Thursday ......................................................................................................................................................... 512
Time_s2Time
......................................................................................................................................................... 513
Time2Time_s
......................................................................................................................................................... 514
TimeToString
......................................................................................................................................................... 515
Tuesday......................................................................................................................................................... 516
Wednesday......................................................................................................................................................... 517
Year ......................................................................................................................................................... 518
YearFromDateTime
......................................................................................................................................................... 519
Declaration .......................................................................................................................................................... 520
Array ......................................................................................................................................................... 520
DailyClose
......................................................................................................................................................... 674
DailyHigh......................................................................................................................................................... 675
DailyLow......................................................................................................................................................... 676
DailyOpen......................................................................................................................................................... 677
DailyVolume
......................................................................................................................................................... 678
Description
......................................................................................................................................................... 679
ExchListed
......................................................................................................................................................... 680
InsideAsk......................................................................................................................................................... 681
InsideBid......................................................................................................................................................... 682
Last ......................................................................................................................................................... 683
PrevClose......................................................................................................................................................... 684
q_Ask ......................................................................................................................................................... 685
q_Bid ......................................................................................................................................................... 686
q_BigPointValue
......................................................................................................................................................... 687
q_Date ......................................................................................................................................................... 688
q_ExchangeListed
......................................................................................................................................................... 689
q_Last ......................................................................................................................................................... 690
......................................................................................................................................................... 691
q_OpenInterest
q_PreviousClose
......................................................................................................................................................... 692
q_Time ......................................................................................................................................................... 693
q_TotalVolume
......................................................................................................................................................... 694
SetPlotWidth
......................................................................................................................................................... 695
Symbol ......................................................................................................................................................... 696
SymbolName
......................................................................................................................................................... 697
TradeDate......................................................................................................................................................... 698
TradeTime......................................................................................................................................................... 699
Sessions .......................................................................................................................................................... 700
AutoSession
......................................................................................................................................................... 700
RegularSession
......................................................................................................................................................... 701
Sess1EndTime
......................................................................................................................................................... 702
Sess1FirstBarTime
......................................................................................................................................................... 703
Sess1StartTime
......................................................................................................................................................... 704
Sess2EndTime
......................................................................................................................................................... 705
Sess2FirstBarTime
......................................................................................................................................................... 706
Sess2StartTime
......................................................................................................................................................... 707
SessionCount
......................................................................................................................................................... 708
SessionCountMS
......................................................................................................................................................... 709
SessionEndDay
......................................................................................................................................................... 710
SessionEndDayMS
......................................................................................................................................................... 711
SessionEndTime
......................................................................................................................................................... 712
SessionEndTimeMS
......................................................................................................................................................... 713
SessionStartDay
......................................................................................................................................................... 714
SessionStartDayMS
......................................................................................................................................................... 715
SessionStartTime
......................................................................................................................................................... 716
SessionStartTimeMS
......................................................................................................................................................... 717
Skip Words .......................................................................................................................................................... 718
A ......................................................................................................................................................... 718
An ......................................................................................................................................................... 719
At ......................................................................................................................................................... 720
Based ......................................................................................................................................................... 721
By ......................................................................................................................................................... 722
Does ......................................................................................................................................................... 723
From ......................................................................................................................................................... 724
Is ......................................................................................................................................................... 725
Of ......................................................................................................................................................... 726
On ......................................................................................................................................................... 727
Place ......................................................................................................................................................... 728
Than ......................................................................................................................................................... 729
The ......................................................................................................................................................... 730
Was ......................................................................................................................................................... 731
Strategy Orders
.......................................................................................................................................................... 732
All ......................................................................................................................................................... 732
Buy ......................................................................................................................................................... 733
BuyToCover
......................................................................................................................................................... 735
Contract......................................................................................................................................................... 737
Contracts
......................................................................................................................................................... 738
Cover ......................................................................................................................................................... 739
Entry ......................................................................................................................................................... 740
Higher ......................................................................................................................................................... 741
Limit ......................................................................................................................................................... 742
Lower ......................................................................................................................................................... 743
Market ......................................................................................................................................................... 744
Sell ......................................................................................................................................................... 745
SellShort......................................................................................................................................................... 747
SetBreakeven
......................................................................................................................................................... 749
SetDollarTrailing
......................................................................................................................................................... 750
SetExitOnClose
......................................................................................................................................................... 751
SetPercentTrailing
......................................................................................................................................................... 752
SetProfitTarget
......................................................................................................................................................... 753
SetStopContract
......................................................................................................................................................... 754
SetStopLoss
......................................................................................................................................................... 755
SetStopPosition
......................................................................................................................................................... 756
SetStopShare
......................................................................................................................................................... 757
Share ......................................................................................................................................................... 758
Shares ......................................................................................................................................................... 759
Short ......................................................................................................................................................... 760
Stop ......................................................................................................................................................... 761
Total ......................................................................................................................................................... 762
Strategy Performance
.......................................................................................................................................................... 763
AvgBarsEvenTrade
......................................................................................................................................................... 763
AvgBarsLosTrade
......................................................................................................................................................... 764
AvgBarsWinTrade
......................................................................................................................................................... 765
AvgEntryPrice
......................................................................................................................................................... 766
GrossLoss
......................................................................................................................................................... 767
GrossProfit
......................................................................................................................................................... 768
i_AvgEntryPrice
......................................................................................................................................................... 769
i_ClosedEquity
......................................................................................................................................................... 770
i_CurrentContracts
......................................................................................................................................................... 771
i_CurrentShares
......................................................................................................................................................... 772
i_MarketPosition
......................................................................................................................................................... 773
i_OpenEquity
......................................................................................................................................................... 774
LargestLosTrade
......................................................................................................................................................... 775
LargestWinTrade
......................................................................................................................................................... 776
MaxConsecLosers
......................................................................................................................................................... 777
MaxConsecWinners
......................................................................................................................................................... 778
MaxContractsHeld
......................................................................................................................................................... 779
MaxIDDrawDown
......................................................................................................................................................... 780
MaxSharesHeld
......................................................................................................................................................... 781
NetProfit......................................................................................................................................................... 782
NumEvenTrades
......................................................................................................................................................... 783
NumLosTrades
......................................................................................................................................................... 784
NumWinTrades
......................................................................................................................................................... 785
PercentProfit
......................................................................................................................................................... 786
TotalBarsEvenTrades
......................................................................................................................................................... 787
TotalBarsLosTrades
......................................................................................................................................................... 788
TotalBarsWinTrades
......................................................................................................................................................... 789
TotalTrades
......................................................................................................................................................... 790
Strategy Position
.......................................................................................................................................................... 791
BarsSinceEntry
......................................................................................................................................................... 791
BarsSinceExit
......................................................................................................................................................... 792
ContractProfit
......................................................................................................................................................... 793
CurrentContracts
......................................................................................................................................................... 794
CurrentEntries
......................................................................................................................................................... 795
CurrentShares
......................................................................................................................................................... 796
EntryDate......................................................................................................................................................... 797
......................................................................................................................................................... 798
EntryPrice
EntryTime......................................................................................................................................................... 799
ExitDate......................................................................................................................................................... 800
ExitPrice......................................................................................................................................................... 801
ExitTime......................................................................................................................................................... 802
i_MarketPosition_at_Broker
......................................................................................................................................................... 803
i_MarketPosition_at_Broker_for_The_Strategy
......................................................................................................................................................... 804
MarketPosition
......................................................................................................................................................... 805
MarketPosition_at_Broker
......................................................................................................................................................... 806
MarketPosition_at_Broker_for_The_Strategy
......................................................................................................................................................... 807
MaxContractProfit
......................................................................................................................................................... 808
MaxContracts
......................................................................................................................................................... 809
MaxEntries
......................................................................................................................................................... 810
MaxPositionAgo
......................................................................................................................................................... 811
MaxPositionLoss
......................................................................................................................................................... 812
MaxPositionProfit
......................................................................................................................................................... 813
MaxShares......................................................................................................................................................... 814
OpenPositionProfit
......................................................................................................................................................... 815
PositionProfit
......................................................................................................................................................... 816
Strategy Properties
.......................................................................................................................................................... 817
Commission
......................................................................................................................................................... 817
GetStrategyName
......................................................................................................................................................... 818
Margin ......................................................................................................................................................... 819
Slippage......................................................................................................................................................... 820
Text Drawing.......................................................................................................................................................... 821
Text_Delete
......................................................................................................................................................... 821
Text_GetActive
......................................................................................................................................................... 822
Text_GetAttribute
......................................................................................................................................................... 823
Text_GetBGColor
......................................................................................................................................................... 824
Text_GetBorder
......................................................................................................................................................... 825
Text_GetColor
......................................................................................................................................................... 826
Text_GetDate
......................................................................................................................................................... 827
Text_GetFirst
......................................................................................................................................................... 828
Text_GetFontName
......................................................................................................................................................... 829
Text_GetHStyle
......................................................................................................................................................... 830
Text_GetNext
......................................................................................................................................................... 831
Text_GetSize
......................................................................................................................................................... 832
......................................................................................................................................................... 833
Text_GetString
Text_GetTime
......................................................................................................................................................... 834
Text_GetTime_s
......................................................................................................................................................... 835
Text_GetValue
......................................................................................................................................................... 836
Text_GetVStyle
......................................................................................................................................................... 837
Text_New ......................................................................................................................................................... 838
Text_New_s
......................................................................................................................................................... 839
Text_New_self
......................................................................................................................................................... 840
Text_New_self_s
......................................................................................................................................................... 841
Text_SetAttribute
......................................................................................................................................................... 842
Text_SetBGColor
......................................................................................................................................................... 843
Text_SetBorder
......................................................................................................................................................... 844
Text_SetColor
......................................................................................................................................................... 845
Text_SetFontName
......................................................................................................................................................... 846
Text_SetLocation
......................................................................................................................................................... 847
Text_SetLocation_s
......................................................................................................................................................... 848
Text_SetSize
......................................................................................................................................................... 849
......................................................................................................................................................... 850
Text_SetString
Text_SetStyle
......................................................................................................................................................... 851
Text Manipulation
.......................................................................................................................................................... 852
DoubleQuote
......................................................................................................................................................... 852
InStr ......................................................................................................................................................... 853
LeftStr ......................................................................................................................................................... 854
LowerStr......................................................................................................................................................... 855
MidStr ......................................................................................................................................................... 856
NewLine......................................................................................................................................................... 857
NumToStr ......................................................................................................................................................... 858
RightStr......................................................................................................................................................... 859
Spaces ......................................................................................................................................................... 860
StrLen ......................................................................................................................................................... 861
StrToNum ......................................................................................................................................................... 862
Text ......................................................................................................................................................... 863
UpperStr......................................................................................................................................................... 864
Trendline Drawing
.......................................................................................................................................................... 865
TL_Delete......................................................................................................................................................... 865
TL_GetActive
......................................................................................................................................................... 866
TL_GetAlert
......................................................................................................................................................... 867
TL_GetBeginDate
......................................................................................................................................................... 868
TL_GetBeginTime
......................................................................................................................................................... 869
TL_GetBeginTime_s
......................................................................................................................................................... 870
TL_GetBeginVal
......................................................................................................................................................... 871
TL_GetColor
......................................................................................................................................................... 872
TL_GetEndDate
......................................................................................................................................................... 873
TL_GetEndTime
......................................................................................................................................................... 874
TL_GetEndTime_s
......................................................................................................................................................... 875
TL_GetEndVal
......................................................................................................................................................... 876
TL_GetExtLeft
......................................................................................................................................................... 877
TL_GetExtRight
......................................................................................................................................................... 878
TL_GetFirst
......................................................................................................................................................... 879
TL_GetNext
......................................................................................................................................................... 880
TL_GetSize
......................................................................................................................................................... 881
TL_GetStyle
......................................................................................................................................................... 882
TL_GetValue
......................................................................................................................................................... 884
TL_GetValue_s
......................................................................................................................................................... 885
TL_New......................................................................................................................................................... 886
TL_New_s
......................................................................................................................................................... 887
TL_New_self
......................................................................................................................................................... 888
TL_New_self_s
......................................................................................................................................................... 889
TL_SetAlert
......................................................................................................................................................... 890
TL_SetBegin
......................................................................................................................................................... 891
TL_SetBegin_s
......................................................................................................................................................... 892
TL_SetColor
......................................................................................................................................................... 893
TL_SetEnd
......................................................................................................................................................... 894
TL_SetEnd_s
......................................................................................................................................................... 895
TL_SetExtLeft
......................................................................................................................................................... 896
TL_SetExtRight
......................................................................................................................................................... 897
TL_SetSize
......................................................................................................................................................... 898
TL_SetStyle
......................................................................................................................................................... 899
Tool_Dashed
......................................................................................................................................................... 900
Tool_Dashed2
......................................................................................................................................................... 901
Tool_Dashed3
......................................................................................................................................................... 902
......................................................................................................................................................... 903
Tool_Dotted
Tool_Solid
......................................................................................................................................................... 904
1 Introduction
Introduction
This document is part of the MultiCharts™ software product. It is protected under the license agreement together with the
software.
Software Copyright© 1999-2008 TS Support, LLC. All rights reserved.
Document Copyright© 1999-2008 TS Support, LLC. All rights reserved.
Contact Information: www.tssupport.com
The R | API™ software is Copyright © 2009 by Rithmic, LLC. All rights reserved.
Engine by Rithmic™ is a trademark of Rithmic, LLC. All rights reserved.
The OMNE™ software is Copyright © 2009 by Omnesys, LLC and Omnesys Technologies, Inc. All rights reserved.
is a trademark of Omnesys, LLC and Omnesys Technologies, Inc. All rights reserved.
All other product names mentioned are trademarks of their respective holder companies.
Disclaimer 20
Past performance is not a guarantee of future results. Only risk capital should be used to trade futures, stocks, options on
futures or stocks, mutual funds or any other type of financial instruments. Whether this product is used in conjunction with
futures, stocks, stock indices or mutual funds, all involve a high degree of inherent financial risk and the possibility of loss is
great.
TS Support, LLC does not assume any responsibilities, make any guarantees whatsoever, or make any trading
recommendations in MultiCharts. All such investment vehicles carry risks and all trading decisions are ultimately made by
you. You are solely and individually responsible for those decisions and the results of those decisions.
2 Typographical Conventions
Typographical Conventions
· Page Referrer icon with page number is used to refer to the appropriate page
· Bold font is used for GUI elements, such as menu names, names of check boxes, etc.
· Key names and key combinations are capitalized and appear as follows: SHIFT, CTRL+S
· A monospaced font is used for PowerLanguage code examples
· An italic monospaced font is used for parameters in the PowerLanguage code examples
3 System Requirements
System Requirements
Before using the MultiCharts, make sure the PC meets the following system requirements:
Minimum
CPU 1 GHz
RAM 256 Mb
HDD 200 Mb of available hard-disk space
Monitor Resolution of 1024x768 or higher
OS Windows 2000, Windows XP SP2, Windows XP x64, Windows Vista, Windows Vista x64
Recommended
CPU Pentium 4 (3 GHz) or Dual Core
RAM 1 Gb
HDD 1 Gb of available hard-disk space
Monitor Multi-Monitor solution
OS Windows 2000, Windows XP SP2, Windows XP x64, Windows Vista, Windows Vista x64
Recommended for Power User*
CPU Quad Core
RAM 3 Gb
HDD 1 Gb of available hard-disk space
Monitor Multi-Monitor solution
OS Windows 2000, Windows XP SP2, Windows XP x64, Windows Vista, Windows Vista x64
* A power user is a person who uses 1 or more of the following: 5 or more tick charts, 10 or more interval charts, 15 or more
indicators or signals on a chart.
4 MultiCharts
4.1 MultiCharts Work Area
The application window consists of Toolbars, Workspaces, and Windows (Chart or/and Scanner). For detailed information
about Windows, click here 23 .
Understanding Workspaces 23
Workspaces help manage the working process. Several Workspaces can be open at the same time. It is possible to create,
save, open, close, rename, and delete Workspaces, as well as to switch between Workspaces that are open in the
application window. Each Workspace can contain multiple windows.
Names of all open Workspaces are shown in the tabs at the bottom of application window. The tab of the currently selected
(active) Workspace is highlighted. To switch to another open Workspace click the tab of the Workspace you wish to switch
to.
To achieve peak performance limit the number of simultaneously open workspaces to the ones you actually need.
Creating Workspaces 23
To create a new Workspace, click the New Workspace icon on the Main toolbar.
Workspaces can also be created by using the Ctrl + N hot key, or by selecting File in the main menu, then pointing
to New and clicking New Workspace.
Note: If there are no open Workspaces when a new Chart Window is created, a new Workspace for that
window will be created automatically.
Saving Workspaces 23
A Workspace, complete with Chart/Scanner Windows and all settings, is saved as a file with .wsp extension.
To save a Workspace, click the Save Workspace icon on the Main toolbar. Workspaces can also be saved by
using the Ctrl + S hot key, or by selecting File in the main menu and clicking Save Workspace.
If the Workspace has not yet been named, the Save As dialog box will appear, allowing to choose a file name for the
workspace.
In order to save an already named Workspace under a new name, select File in the main menu and click Save
Workspace As.
To save Workspaces automatically on application exit, see Workspaces Preferences 23 .
Opening Workspaces 23
Saved Workspaces can be opened by using Windows Explorer/File manager as well as from the application.
To open a Workspace from the application, click the Open Workspace icon on the Main toolbar; in the Open
dialog box that appears, navigate to and select the Workspace file (.wsp extension) and click the Open button.
Workspaces can also be opened by using the Ctrl + O hot key, or by selecting File in the main menu and clicking
Open Workspace.
Recently used Workspaces can be opened by clicking the down-arrow to the right of the Open Workspace
icon on the Main toolbar and then clicking a Workspace name, or by selecting File in the main menu, then pointing
to Recent Workspaces and clicking a Workspace name.
To open Workspaces automatically on application startup, see Workspaces Preferences 23 .
Closing Workspaces 23
To close a Workspace, click the Close Workspace icon on the Main toolbar. Workspaces can also be closed
by using the F4 key, or by selecting File in the main menu and clicking Close Workspace.
If any changes have been made to a Workspace since it was last saved, and: Do not show "Save Workspace"
dialog on Exit checkbox in Workspace Preferences 23 is not selected, the Save Workspace dialog box will
appear:
- click Yes to save the changes and close the Workspace;
- click No to discard the changes and close the Workspace;
- click Cancel to cancel the operation and keep the Workspace open.
To disable the dialog box and close workspaces without confirmation, see Workspaces Preferences 23 .
Important: If both the Do not show "Save Workspace" dialog on Exit checkbox and Do not save workspaces
option are selected in the Workspace 23 tab of the Preferences window then no changes to the
workspace will be saved on exit!
Renaming Workspaces 23
Deleting Workspaces 23
Use Windows Explorer or another program to delete the Workspace file as you would any other Windows file.
Deleting a Workspace does not delete the data or the studies.
Note: A Workspace that is open cannot be deleted. Close the Workspace prior to deleting it.
Workspaces Preferences 23
Workspaces preferences settings determine which workspaces, if any, will be opened on application startup, whether
changes to workspaces will be saved on application exit, and if a confirmation prompt will appear when Chart/
Scanner Windows are closed.
To set workspace preferences:
1. Open the Preferences window by selecting File in the main menu and then clicking Preferences; the
window can also be opened by using ALT+F, ALT+F keyboard shortcut sequence.
2. Select the Workspaces tab.
3. To open Workspaces on startup, select the Open Workspaces on Start checkbox; clear the checkbox
to not open any Workspaces on startup.
4. To show the Workspaces dialog box on startup, select the Show the dialog checkbox; clear the
checkbox to not display the dialog box.
5. Select the Workspaces to be opened on startup.
6. To show Save Workspace dialog box on exit, clear the Do not show "Save Workspace" dialog on
Exit checkbox; select the checkbox to not display the dialog box.
7. Select Save workspaces or Do not save workspaces to save or not to save the workspaces on exit,
respectively.
8. To prompt for a confirmation when a Chart/Scanner Window is closed (deleted), clear the Do not
prompt for confirmation when I want to close a window checkbox; check the checkbox to prompt for
a confirmation when a window is closed.
Chart Windows contain charts, studies, and drawings. The number of windows that can be added to Workspaces is limited
only by your computer's hardware configuration.
In Workspaces with multiple windows only one window at a time is active. The active window is the window to which any
changes will be applied, and is distinguished by the color of its title bar. Any one of the windows in a Workspace can be
selected as the active at any time.
Windows can be moved within a workspace or detached and positioned anywhere on your computer’s desktop, arranged in
any order, resized, maximized, minimized, and closed. Closing a window deletes it from the Workspace. Windows are
saved only as a part of the Workspace that contains them.
Creating Windows 23
A Chart Window is always created at the same time as the chart/grid that is placed in it. It is not possible to create an
empty window, without a chart/grid. A Chart/Scanner Window is always created in the currently selected Workspace.
Before making changes to a Window you should make sure that it is active. Only one window at a time can be active.
A Window can be selected as active by one of the following methods:
· Click anywhere on the window to make it active; or:
· Select Window in the main menu and click the name of the window.
Color change of the window's title bar will indicate that the window has become active.
By default, Windows are displayed within a Workspace. Windows can be detached from a Workspace and
positioned anywhere on your computer's desktop; on a multiple-monitor system, one or more Windows can be
displayed on each monitor.
A Window can be detached by one of the following methods:
· Click the Detach Window button on the title bar of the window; or:
· Select Window in the main menu and click Detach Window.
Note: Detached windows' last chosen positions are retained the next time that the application is started
A Window can be attached back to the Workspace by one of the following methods:
· Click the Attach Window button on the title bar of the window; or:
· Select Window in the main menu and click Attach Window.
To keep a detached Window displayed always on top of other windows click the Stick button on the title bar
To cancel the feature click the Unstick button again; the button will change to .
Note: Detached window's last chosen Always on Top status is retained the next time that the application is
started.
Arranging Windows 23
It is possible to arrange windows in any order. A Window can be positioned anywhere by placing the mouse pointer
over the window’s title bar, holding the left mouse button, and dragging the window to the desired position. Windows
within a workspace can also be arranged automatically:
· To arrange all open windows for convenient viewing select Window in the main menu and click Arrange All any
minimized windows will be placed at the bottom of the Workspace, below any open windows.
· To arrange all windows horizontally or vertically select Window in the main menu and click Arrange Horizontally
or Arrange Vertically, respectively.
· To arrange all open windows in a cascade select Window in the main menu and click Cascade; any minimized
windows will be placed at the bottom of the Workspace, below any open windows.
Note: Windows' last chosen positions are retained the next time that the application is started.
Deleting Windows 23
A window can be deleted from a Workspace. To close a Window means to delete it. It is possible to delete all of the
windows from a Workspace, leaving the Workspace empty.
To delete a Window from a Workspace click the Close button on the title bar of the window; in the dialog box that
appears, click Yes to delete the window, or click Cancel to cancel the operation and keep the window open.
To disable the dialog box and delete windows without confirmation, see Workspaces Preferences 23 .
Within a Workspace you can switch between the open windows by using the Ctrl + F6 hotkey combination, or by
Copying Windows 23
The active Chart/Scanner Window can be copied, complete with all settings, data series, and studies, and pasted to
any open Workspace.
Understanding Toolbars 23
Toolbars provide convenient access to commonly used functions. These functions can also be accessed by using the
menus, but the toolbars let you do it with just one click.
There are six toolbars: Chart Analysis, Command Line, Control, Drawing, Main, and Resolution. Any of the toolbars can be
made floating, allowing them to be positioned anywhere, or hidden if they are not needed.
The Resolution toolbar can also be hidden or redisplayed by clicking the Resolution icon.
By default, toolbars are displayed docked to the top of the application window. Any of the toolbars can be made
floating or docked. A floating toolbar has its own title bar and can be positioned anywhere on your computer’s
desktop.
Toolbars can be made floating by using one of the following methods:
· Double-click the move handle of a docked toolbar; or:
· Position the mouse pointer over the toolbar's move handle; hold the left mouse button and drag the toolbar to the
desired position.
A floating toolbar can be resized the same way as any other window.
Note: Toolbars' last chosen sizes are retained the next time that the application is started.
Control Toolbar
Zoom In Zooming In 91
Resolution Toolbar
Drawing Toolbar
Command Line
Command Line toolbar allows the active window's chart resolution or symbol to be changed simply by entering a text
command.
Type the appropriate command in the Command Line combo box and
press Enter. To select a previously used command use the drop-down function.
Examples: Type in: "5 minutes" to change the chart resolution to 5 minutes.
Type in: "AMD" to change the symbol to AMD.
Customizing Toolbars 23
With Custom Toolbars, the user can not only choose which toolbar to display, but also which buttons appear on the
toolbar. Adding more toolbars and buttons makes it easier to access certain functions. Consolidating the most
frequently used buttons onto one toolbar saves space and permits a larger display area in the workspace.
To customize the toolbars,
1. Select View from the main menu, then select Toolbars and Customize. The Customize window will
appear.
2. In the Toolbars pane, select the type of toolbar to customize. Check the selected toolbar’s check box to
display the toolbar. Uncheck the selected toolbar to remove the toolbar.
3. In the Commands pane, select which buttons will appear on the toolbar.
4. Select the Close button.
Where:
1 - Status Line Area
2 - Chart Area
3 - Subchart Divider
4 - Subchart Area
5 - Time Scale Area
6 - Price Scale Area
Each area intended for manipulation for its own set of objects.
Note: There can be several Subchart Areas in a Chart window.
Note: There can be one or two Price Scale Areas in a Chart window.
Chart Number Format 30
MultiCharts uses the Regional Settings of the Windows operating system to format numbers. The Regional Settings can
be edited by going to Customize Regional Options in the Windows operating system. The items that can be edited
include the following:
· Decimal symbol
· Digit grouping symbol
· Negative sign symbol
· Negative number format
· Display leading zeros
· List separator
· Measurement system
To access the Customize Regional Options, please refer to the help files from the Windows operating system.
The number of digits behind a decimal depends on whether the number is associated with a symbol or study. For symbols,
the number of digits after a decimal is defined in the Price Scale. For studies, the number of digits after a decimal is based
on the number of significant digits.
Creating Charts
A new chart can be created by entering the symbol parameters into the Command Line toolbar:
By default, the Command Line toolbar is displayed docked to the top of the application window. If the toolbar is not
displayed, it may have been hidden. To learn how to redisplay the toolbar, see Floating or Docking Toolbars 23
To learn more about toolbars, see Understanding Toolbars 23
Symbol parameters consist of the Symbol Name, Data Source, Category, and Exchange parameters. Depending on the
data source and the symbol category, one or more parameters are required on order to precisely identify the symbol to be
plotted.
MultiCharts simplifies the process of symbol selection by automatically selecting, whenever possible, any omitted
symbol parameters, by analyzing the Symbol Name.
Note: When symbol parameters are entered into the command line the first time that MultiCharts is used, the
Data Source must be specified. Automatic selection of omitted symbol parameters is based on both the
Symbol Name and on the Data Source. Once specified a single time, the Data Source will be selected
automatically if DataSource parameter is not specified.
Entering a symbol name alone is often sufficient to create a chart for a stock. For example, a plot for Google, Inc.
can be created by simply typing goog into the command line toolbar; all the other parameters will be selected
automatically. However, for some symbol categories and data sources, additional parameters may be required in
order to precisely identify the symbol to be plotted.
If the exact symbol name is not known, but only the symbol description or the symbol root, or if plotting the symbol
through the command line does not work, QuoteManager 259 can be used to search for and identify the correct
symbol.
Note: When symbol parameters are entered into the command line the first time that that MultiCharts is
used, the Data Source must be specified.
Please note that Data Source and Symbol Name are separated by a colon (:), while Symbol Name, Exchange
Name, and Category are separated by a semicolon (;).
· If DataSource parameter is not specified, SymbolName parameter does not have to be preceded by a colon.
· In neither Exchange nor Category parameters are specified, SymbolName does not have to be followed by a
semicolon.
· If Category parameter is not specified, Exchange parameter does not have to be followed by a semicolon.
· If Exchange parameter is not specified, and Category parameter immediately follows the SymbolName parameter,
two semicolons must separate SymbolName and Category parameters (SymbolName;; Category).
QuoteManager. To open the Data Sources window in QuoteManager, click the Data Sources icon, or
select Tools in the main menu and click Data Sources.
· If DataSource is not specified, the most recently used Data Source will be used.
· If DataSource is not specified and cannot be selected automatically, a Format Symbol window will open.
ECNs window in QuoteManager, click the Exchanges & ECNs icon, or select Tools in the main menu and
click Exchanges & ECNs.
· If the specified exchange abbreviation is not in the Exchanges & ECNs list, a Format Symbol window will open.
· If Exchange parameter is not specified, a default exchange will be selected based on the data source and
category (category selection takes place prior to default exchange selection):
Data Source Category Exchange
Interactive Brokers Future GLOBEX
Cash/Forex IDEALPRO
Other SMART
OpenTick Future EM
Other Q
TransAct Futures All CME
GlobalServer Future CME
Cash/Forex CFOREX
Other NASDAQ
TradeStation Future CME
Cash/Forex FOREX
Bond AMEX
Other NASDAQ
All other data sources All UNDEF
· If the specified Category is not a valid category abbreviation, a Format Symbol window will open.
· If Category is not specified, the symbol name will be analyzed in order to select the symbol category
automatically;
Symbol category is automatically selected by evaluating the symbol name according to the following rules,
in the order that they are listed; once a symbol name satisfies any one rule, a category is assigned and
MultiCharts proceeds to exchange selection.
· Click the New Chart Window icon on the Main toolbar; or:
· Use the Insert key on the keyboard; or:
· In the main menu select File, then point to New and click New Chart Window.
In some instances real-time data and historical data must be obtained from two separate data sources. A real-time
data source and a historical data source can be merged into a single chart.
To create a new chart:
1. Open the Format Symbol window by one of the following methods:
· Click the New Chart Window icon on the Main toolbar; or:
· Use the Insert key on the keyboard; or:
· In the main menu select File, then point to New and click New Chart Window.
10.Double-click the symbol, or click OK, to create a chart with default settings.
To learn more about changing the symbol settings read the following:
Changing Symbols 38
Chart Resolution 41
Quote Field 47
Sessions 48
Data Range 49
Time Zone 51
Data Numbers 52
Using SubCharts 53
Chart Style 57
Chart Scaling 73
It is possible to add several symbols' data series to the same Chart Window. Each data series in a multi-symbol chart has a
unique Data Number. The Data Number is assigned according to the order in which the data series was added to the Chart
Window.
Important: Any data series can be deleted from the Chart Window, except for the data series that was added first (Data #1
52 ).
To insert an additional symbols’ data series into a Chart Window, click the Insert Symbol icon on the Chart
Analysis toolbar.
Additional data series can also be inserted by one of the following methods:
1. Use the F5 key; or:
2. Select Insert in the main menu and click Symbol; or:
3. Right-click on the chart area and then click Insert Symbol; or:
4. If the Chart Window already contains more then one data series, right-click on the chart area, then click
Format Symbols, and click the Add button.
Any of the symbols (data series) can be deleted from a multi-symbol Chart Window, except for the first symbol that
was added (the symbol with the Data # = 1).
To delete a symbol (data series), right-click on the chart area and then click Format Symbols; in the Format
Objects window that appears, select the data series that is to be deleted and click the Remove button.
Data series can also be deleted by one of the following methods:
· Position the mouse pointer over the data series that is to be deleted; once the Pointer changes into a Hand
· Position the mouse pointer over the data series that is to be deleted; once the Pointer changes into a Hand
, click on the data series and then press the Delete key on the keyboard.
In a multi-symbol Chart Window only one of the data series at a time is active. The active data series is the data
series to which any changes will be applied. Any one of the data series in a multi-symbol chart can be selected as
active at any time.
Before making changes to a particular symbol’s chart within a multi-symbol Chart Window you should first make sure
that it is the active symbol (data series).
The first symbol (data series) added to a multi-symbol Chart Window is the active symbol by default.
To select a symbol (data series) as active simply click on the data series.
Data server mode selection provides flexibility for working with data feeds. This feature makes it possible to overcome
limitations of some of the data feeds. If a data feed is available only on weekdays, the locally stored data can be used on
weekends. If a data feed makes gap filling impractical by forcing a lengthy download of 24 hours of data for any intraday
query, the gap filling feature can be disabled.
Three Data server modes are available:
On-Demand – First, the locally stored data is used for a historical chart. Then a check for the gaps is performed, and any
gaps found are filled by connecting to a historical data feed. Once the historical chart is completed, the real-time data will
be received from a real-time data feed.
Online – The locally stored data is used to for a historical chart. A check for gaps is not performed. Once the historical
chart is completed, the real-time data will be received from a real-time data feed.
Offline – Only the locally stored data is used. No connections to data feeds are made.
To change the Data server mode close all the Workspaces containing windows, or close all the windows in open
Workspaces. Once a new Data server mode has been set, all Chart Windows will function according to the new
mode, even if they were originally created under another Data server mode.
Note: The Data server mode can not be changed while there are any open Chart Windows in any of the open
Workspaces.
To set the Data server mode:
1. In the main menu select File and click Preferences.
2. Select the Data Server Mode tab.
3. Choose the data mode.
4. Check Show this dialog box on startup check box to display the Data Server Mode dialog box on
startup, or uncheck the box to simply use the last selected Data mode.
Changing Symbols
Symbols can be changed using either Command Line Toolbar or Format Symbol Window.
To learn more review Creating Charts Using the Command Line Toolbar 32
Symbols can be selected either by the symbol name or by the security description.
Only the symbols which have already been added to the Symbol List will be available. The 32 most common Futures
symbols are pre-loaded into the Symbol List; all other symbols must be added by the user.
N To learn more see Adding Symbols to Symbol List 260
ot
e:
To change a symbol by symbol name:
1. Open the Format Symbol window.
To open the Format Symbol window, click the Format Symbol icon on the Chart
Analysis toolbar; if the Format Objects window appears, select the symbol and click the
Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format
Objects window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears,
select the symbol and click the Format button.
2. Select the Symbol tab.
3. Select a data source in the Data Source drop-down list box.
Symbols can be selected by the security description as well as by the symbol name.
Only the symbols which have already been added to the Symbol List will be available. The 32 most common Futures
symbols are pre-loaded into the Symbol List; all other symbols must be added by the user.
Note: To learn more see Adding Symbols to Symbol List 260
To change a symbol by security description:
1. Open the Format Symbol window.
To open the Format Symbol window, click the Format Symbol icon on the Chart
Analysis toolbar; if the Format Objects window appears, select the symbol and click the
Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format
Objects window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears,
select the symbol and click the Format button.
2. Select the Symbol tab.
3. Select a data source in the Data Source drop-down list box.
260 .
Chart Resolution
A Tick is the information about each real trade (or each bid, or each ask, of a potential trade) received from a data vendor. A
tick consists of the price, time, and volume.
A Bar Chart is the most popular format for visually presenting a Data Series. Each Bar is a vertical line connecting the High
and the Low price points (ticks), and graphically represents the range of an instrument’s price movement over a defined
Interval. The price of the first tick of the group, on which the bar is based, is indicated on the left side of the line by a mark
known as the bar's Open component. The price of the last tick of the group, on which the bar is based, is indicated on the right
side of the line by a mark known as the bar's Close component.
Defining the Interval on which each of the chart's bars is based determines the Chart Resolution. Chart resolution is also
sometimes referred to as the Chart Compression.
Chart resolution can be based on a Time interval (seconds, minutes, hours, days, weeks, months, or years), or on a Count
interval (tick, volume, change, or range).
The choice of time- versus count-based charts depends on the user's preference and trading style. Daily or weekly bars can be
used to help identify long-term trends, while tick bars are better suited for day trading.
Count-based charts are becoming increasingly popular because they focus in on the price movement and filter out the periods
of low market activity.
Understanding Tick-Based Charts 41
Each bar in a tick-based chart is based on a tick group that consists of a defined number of successive ticks. The first tick
of the group forms the bar's Open component, the tick with the highest price forms the bar's High component, the tick with
the lowest price forms the Low component, and the last tick of the group forms the bar's Close component. The bar is
closed once the defined number of ticks has been reached. The first tick of the following group forms the next bar’s Open
component.
A 1-tick chart consists of the dots, representing the price values of each of the incoming raw ticks (quotes).
Note: If 1-Tick resolution is used, only the following chart types are available: Dot on Close, Line on Close, Invisible
Bar
You can elect to use the price data from Trades, Asks, or Bids by Setting Quote Field.
How to plot 41
Resolution of tick-based charts can be set from the Format Symbol window:
1. Open the Format Symbol window.
How? 41
To open the Format Symbol window, click the Format Symbol icon on the Chart
Analysis toolbar; if the Format Objects window appears, select the symbol and click the
Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format
Objects window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears,
select the symbol and click the Format button.
2. Select the Settings tab.
3. In the Chart section, in the Resolution Interval text box, enter the number of ticks to be used for each
bar.
4. In the Resolution Unit drop-down list box select Tick.
Note: The maximum number of ticks that can be used to create a single bar is 1,000,000.
Resolution of tick-based charts can also be set by one of the following methods:
- Click the Tick Bar icon on the Resolution toolbar; from the drop-down list select the number of ticks to be
used for each bar; or:
- Click the down-arrow to the right of the Resolution icon on the Command Line toolbar, then point to Tick
Bar and select the number of ticks to be used for each bar from the drop-down list;
or:
- Enter the appropriate command into the Command Line toolbar combo box. Click here 23 to find out how to use
the Command Line.
Each bar in a time-based chart is based on a tick group that consists of all ticks over a defined interval of time. The first tick
of the group forms the bar's Open component, the tick with the highest price forms the bar’s High component, the tick with
the lowest price forms the Low component, and the last tick of the group forms the bar's Close component. The first tick
with a time stamp past the original bar’s interval forms the next bar’s Open component.
You can elect to use the price data from Trades, Asks, or Bids by Setting Quote Field.
Resolution of time-based charts can be set from the Format Symbol window:
1. Open the Format Symbol window.
How? 41
To open the Format Symbol window, click the Format Symbol icon on the Chart
Analysis toolbar; if the Format Objects window appears, select the symbol and click the
Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format
Objects window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears,
select the symbol and click the Format button.
2. Select the Settings tab.
3. In the Chart section, in the Resolution Interval text box, enter the number of time periods to be used for
each bar.
4. In the Resolution Unit drop-down list box select the time period.
Note: The maximum interval values that can be used for each of the time period units are: 86400 seconds,
1440 minutes, 24 hours, 30 days, 52 weeks, 12 months, 4 quarters, or 10 years.
Resolution of time-based charts can also be set by one of the following methods:
- Click the Second Bar or the Minute Bar icon on the Resolution toolbar; from the drop-down list select
the number seconds or minutes, respectively, to be used for each bar; or:
- Click the Hourly Bar , the Daily Bar , the Weekly Bar , the Monthly Bar , the Quarterly Bar
, or the Yearly Bar icon on the Resolution toolbar to select a 1-hour, 1-day, 1-week, 1-month, 1-quarter,
or 1-year bar, respectively;
-or-
- Click the down-arrow to the right of the Resolution icon on the Command Line toolbar and select the time
period. For Second and Minute bars the number of time period units can also be selected from a drop-down list;
-or-
- Enter the appropriate command into the Command Line toolbar combo box. Click here 23 to find out how to use
the Command Line.
Each bar in a range-based chart is based on a tick group that consists of successive ticks over a defined price range. The
bar’s Open component is always one tick above or below the Close component of the previous bar, and the bar’s Close
component is always at the High or the Low of the bar. All the bars are of the same height, equal to the range. The next bar
is started once the tick with a price outside of the original bar's range has been received. If the price movement is greater
than the combined range of two consecutive bars, additional "virtual" bars are inserted between the bars to fill the gap.
You can elect to use the price data from Trades, Asks, or Bids by Setting Quote Field.
A range-based chart can only be created from tick data.
Note: The maximum period of the price data that can be used to create a single bar in a range-based chart is one
trading day, including all of the trading sessions on that day.
Resolution of range-based charts can be set from the Format Symbol window:
1. Open the Format Symbol window.
How? 41
To open the Format Symbol window, click the Format Symbol icon on the Chart
Analysis toolbar; if the Format Objects window appears, select the symbol and click the
Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format
Objects window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears,
select the symbol and click the Format button.
2. Select the Settings tab.
3. In the Chart section, in the Resolution Interval text box, enter the price movement, in points, that is to
trigger creation of the next bar.
4. In the Resolution Unit drop-down list box select Point.
Note: The maximum number of points that can be used to create a single bar is 10,000.
Resolution of range-based charts can also be set by one of the following methods:
- Click the Range Bar icon on the Resolution toolbar; from the drop-down list select the number of points to
be used for each bar;
-or-
- Click the down-arrow to the right of the Resolution icon on the Command Line toolbar, then point to Range
Bar and select the number of points to be used for each bar from the drop-down list;
-or-
- Enter the appropriate command into the Command Line toolbar combo box. Click here 23 to find out how to use
the Command Line.
Each bar in a volume-based chart is based on a tick group that consists of successive ticks for a defined number of
contracts. The first tick of the group forms the bar's Open component, the tick with the highest price forms the bar's High
component, the tick with the lowest price forms the Low component, and the last tick of the group forms the bar's Close
component. The bar is closed once a tick, bringing the current bar’s total to the defined number of contracts, has been
received. If the last tick’s volume is grater than is required to complete the current bar, the tick is split. The volume required
for the current bar is used for that bar, and the balance is used to start the next bar.
You can elect to base this chart on the actual volume of all transactions, or on the total number of transactions (ticks) only,
by using the Build Volume On selector.
You can elect to use the data from Trades, Asks, or Bids for this chart by Setting Quote Field.
Resolution of volume-based charts can be set from the Format Symbol window:
1. Open the Format Symbol window.
How? 41
To open the Format Symbol window, click the Format Symbol icon on the Chart
Analysis toolbar; if the Format Objects window appears, select the symbol and click the
Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format
Objects window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears,
select the symbol and click the Format button.
2. Select the Settings tab.
3. In the Chart section, in the Resolution Interval text box, enter the number of contracts to be used for
each bar.
4. In the Resolution Unit drop-down list box select Contract.
Note: The maximum number of contracts that can be used to create a single bar depends on the data vendor.
Resolution of volume-based charts can also be set by one of the following methods:
- Click the Volume Bar icon on the Resolution toolbar; from the drop-down list select the number of contracts
to be used for each bar; or:
- Click the down-arrow to the right of the Resolution icon on the Command Line toolbar, then point to
Volume Bar and select the number of contracts to be used for each bar from the drop-down list;
or:
- Enter the appropriate command into the Command Line toolbar combo box. Click here 23 to find out how to use
the Command Line.
You can elect to base a chart on the actual volume of all transactions, or on the total number of transactions
(ticks) only, by using the Build Volume On selector.
Build Volume On selector is set from the Format Symbol window:
1. Open the Format Symbol window.
2. Select the Settings tab.
3. In the Chart section, in the Build Volume On drop-down list box, select Trade Volume or Tick
Count to base the chart on the actual volume, or on the number of ticks, respectively.
Each bar in a change-based chart is based on a tick group that consists of successive ticks over a defined number of price
changes. The first tick of the group forms the bar's Open component, the tick with the highest price forms the bar's High
component, the tick with the lowest price forms the Low component, and the last tick of the group forms the bar's Close
component. The bar is closed once the tick with a price, bringing the current bar's total number of price changes to the
defined number, has been received. The first tick of the following group forms the next bar’s Open component.
You can elect to base this chart on the Trades, on the Asks, or on the Bids by Setting Quote Field.
Resolution of change-based charts can be set from the Format Symbol window:
1. Open the Format Symbol window.
How? 41
To open the Format Symbol window, click the Format Symbol icon on the Chart
Analysis toolbar; if the Format Objects window appears, select the symbol and click the
Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format
Objects window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears,
select the symbol and click the Format button.
2. Select the Settings tab.
3. In the Chart section, in the Resolution Interval text box, enter the number of price changes to be used
for each bar.
4. In the Resolution Unit drop-down list box select Change.
Resolution of change-based charts can also be set by entering the appropriate command into the Command Line
toolbar combo box. Click here 23 to find out how to use the Command Line.
Quote Field
You can elect to use the data from the Trades only, from the Asks only, or from the Bids only, by setting the Quote Field.
Quote Field is set from the Format Symbol window:
1. Open the Format Symbol window.
How? 47
To open the Format Symbol window, click the Format Symbol icon on the Chart Analysis
toolbar; if the Format Objects window appears, select the symbol and click the Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into a
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format Objects
window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears, select the
symbol and click the Format button.
2. Select the Settings tab.
3. In the Chart section, in the Quote Field drop-down list box, select Ask, Bid, or Trade, to use ask, bid, or trade
data, respectively.
4.4.1.4 Sessions
Sessions
Trading sessions are the hours in which a contract is available for trading. The trading session for each contract varies
depending on the contract and the exchange.
A user may also want to only plot certain hours of the trading session instead of the entire session. Additionally, the user may
want to plot the same symbol using different trading sessions.
Setting Sessions 48
How? 48
To open the Format Symbol window, click the Format Symbol icon on the Chart Analysis
toolbar; if the Format Objects window appears, select the symbol and click the Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into a
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format Objects
window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears, select the
symbol and click the Format button.
2. Select the Settings tab.
3. In the Chart section, in the Sessions drop-down list box, select an applicable trading session.
Tip: To create custom session templates, see Setting Custom Session Templates 267
Data Range
Data Range is the entire period of data that is covered by the chart. Data Range can be defined by two different methods:
· By defining the number of bars, or days, back from a particular date; or:
· By defining the start and end dates.
How? 49
To open the Format Symbol window, click the Format Symbol icon on the Chart Analysis
toolbar; if the Format Objects window appears, select the symbol and click the Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into a
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format Objects
window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears, select the
symbol and click the Format button.
2. Select the Settings tab.
3. In the Data Range section click the top radio button.
4. In the text box enter the number of bars or days back to be used.
5. In the drop-down list box choose Bars Back or Days Back.
6. In the …Back From combo box, your computer's system date is set up by default; if required, enter another
date or use the drop-down calendar.
How? 49
To open the Format Symbol window, click the Format Symbol icon on the Chart Analysis
toolbar; if the Format Objects window appears, select the symbol and click the Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into a
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format Objects
window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears, select the
symbol and click the Format button.
2. Select the Settings tab.
3. In the Data Range section click the bottom radio button.
4. In the From combo box enter the starting date or use the drop-down calendar; your computer's system date is
set up by default.
5. In the To combo box, your computer's system date is set up by default; if required, enter another date or use
the drop-down calendar.
Time Zone
You can elect for the Local Time or for the Exchange Time to be displayed on the chart's time scale, by setting the Time Zone.
Local Time is the system time of your computer, and the Exchange Time is the local time at the location where the exchange
is based.
Setting Time Zone 51
How? 51
To open the Format Symbol window, click the Format Symbol icon on the Chart Analysis
toolbar; if the Format Objects window appears, select the symbol and click the Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into a
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format Objects
window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears, select the
symbol and click the Format button.
2. Select the Settings tab.
3. In the Display section, in the Time Zone drop-down list box, choose Local or Exchange Time Zone.
Data Numbers
Each data series in a multi-symbol chart has a unique Data Number. Data Numbers are used to differentiate data series in
multi-symbol charts, and for the calculation of indicators that use several data series. The Data Number is automatically
assigned according to the order in which the data series was added to a Chart Window.
The Data Number can also be set manually while a series is being added, except for the very first series to be added to a Chart
Window, which is always Data #1. A Data Number can no longer be changed once the series has been plotted.
Important: Any data series can be deleted from a multi-symbol Chart Window, except for the data series with the Data # 1.
Data series # 1 can only be deleted by closing the Chart Window.
Setting Data Number 52
The Data Number can be set manually from the Format Symbol window only when the series is being added. Once the
series has been plotted, the Data Number can not be changed.
To manually set a Data Number to a data series:
1. Follow the instructions for inserting an additional data series into a Chart Window; to learn how insert an
additional series, see Inserting Additional Symbols into a Chart Window.
2. Before clicking OK select the Settings tab in the Format Symbol window.
3. In the Display section, in the Data Number drop-down list box, select a Data Number for the data series being
created.
Using SubCharts
When additional objects are inserted into a Chat Window, the window is divided horizontally into SubCharts. A single window
can contain up to 20 SubCharts.
SubCharts allow several data series or other objects to be synchronized and viewed alongside each other.
Each SubChart is assigned a sequential number according to its position in a Chart Window, starting from the top. A chart that
is the only chart in the Chart Window is SubChart number 1.
SubCharts can be Resized, Maximized, and Hidden. Each SubChart can contain a number of charts or studies, and objects
can be moved from one SubChart to another.
Resizing SubCharts 53
To Resize SubCharts, position the mouse pointer over the border line between two SubCharts; once the pointer changes
into a Splitter , hold the left mouse button and drag the border to the desired position.
Maximizing and Restoring SubCharts 53
A SubChart can be maximized to fill the entire Chart Window, and a maximized SubChart can be restored to its original
size.
Maximizing SubCharts 53
To maximize a SubChart, right-click on the chart area of the SubChart to be maximized and then click Maximize
SubChart.
Restoring SubCharts 53
To restore a maximized SubChart to its original size, right-click on the chart area and then click Restore SubChart.
Moving Data Series between SubCharts 53
A data series in one SubChart can be moved to an existing or a new SubChart within the same Chart Window. Each
SubChart can contain a number of objects.
How? 53
To open the Format Symbol window, click the Format Symbol icon on the Chart Analysis
toolbar; if the Format Objects window appears, select the symbol and click the Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into a
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format Objects
window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears, select the
symbol and click the Format button.
2. Select the Settings tab.
3. In the Display section, in the SubChart scrolling list box, select the SubChart # you wish to move the
series to.
changes into a Hand , hold the left mouse button and drag the pointer to another SubChart. Release the
mouse button to complete moving the series.
How? 53
To open the Format Symbol window, click the Format Symbol icon on the Chart Analysis
toolbar; if the Format Objects window appears, select the symbol and click the Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into a
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format Objects
window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears, select the
symbol and click the Format button.
2. Select the Settings tab.
3. In the Display section, in the SubChart scrolling list box, select Show On Top or Show On Bottom to
move the series to a new SubChart at the top or at the bottom of the Chart Window, respectively.
- Position the mouse pointer over the series or the Status Line of the series to be moved; once the Pointer
changes into a Hand , hold the left mouse button and drag the pointer to the upper or lower border of the Chart
Window, or of another SubChart. Once the pointer changes into the Create New SubChart symbol, release the
mouse button to create a new SubChart.
In some instances displaying a SubChart may not be necessary. A SubChart can be hidden by hiding all of the objects it
contains. Hidden objects retain their full functionality.
Hiding Subcharts 53
How? 53
To open the Format Symbol window, click the Format Symbol icon on the Chart Analysis
toolbar; if the Format Objects window appears, select the symbol and click the Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into a
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format Objects
window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears, select the
symbol and click the Format button.
2. Select the Settings tab.
3. In the Display section, in the SubChart scrolling list box, select Hide.
How? 53
Format Objects window will appear only if the active Chart Window contains multiple series;
otherwise, Format Symbol window will appear.
To open the Format Objects window, right-click on an empty area of the chart and then click Format
Symbols.
The Format Objects window can also be opened by one of the following methods:
4. In the Display section, in the SubChart scrolling list box, select Show On Top, Show On Bottom, or
SubChart #n, to redisplay the data series in a new SubChart at the top, a new SubChart at the bottom, or in
an existing SubChart, respectively, in the Chart Window.
Chart Style
Several types of charts can be created. Chart style can be customized for each type of a chart.
The following types of charts are available:
OHLC Bar Chart 59
HLC Bar Chart 61
Candlestick Chart 65
Dot On Close Chart 67
Line On Close Chart 69
Invisible Chart 71
Each chart type offers an alternative visual representation that has its own advantages.
The type and style of a chart are set in the Style tab of the Format Symbol window.
Chart Type is selected in the Chart Type section, and Chart Style settings can be customized in the Chart Style section.
Changes to Chart Type and Chart Style settings will be applied to the Chart Window in real time.
Last Price Marker 57
Last Price Marker is a special label displayed on the price scale that indicates the latest price value of the data series.
If multiple data series are plotted in different subcharts within the same chart window, then the marker is displayed for each
data series.
However, if multiple data series are plotted in the same subchart, then the marker is displayed only for the series that was
added first (Data #1 52 ).
To turn off/on Last Price Marker for a data series:
1. Open the Format Symbol window.
How? 57
To open the Format Symbol window, click the Format Symbol icon on the Chart Analysis
toolbar; if the Format Objects window appears, select the symbol and click the Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into a
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format Objects
window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears, select the
symbol and click the Format button.
2. Select the Style tab.
3. Under the Advanced group box, check or uncheck the Last Price Marker checkbox.
Chart's bars' Weight can be changed by clicking Increase Weight or Decrease Weight icons on the Control
toolbar, or by selecting Format in the main menu and clicking Increase Weight or Decrease Weight.
OHLC Bar Chart visually presents the data series as a sequence of bars.
Each OHLC bar is a vertical line connecting the High and the Low price points (ticks), and graphically represents the range of
an instrument's price movement over a defined interval. The price of the first tick of the group, on which the bar is based, is
indicated on the left side of the line by a mark known as the bar's Open component. The price of the last tick of the group, on
which the bar is based, is indicated on the right side of the line by a mark known as the bar's Close component.
An OHLC Bar has three components: Open, High/Low, and Close. The color and width of each of the bar's components can
be customized in the Chart Style section.
Selecting OHLC Chart Type 59
How? 59
To open the Format Symbol window, click the Format Symbol icon on the Chart Analysis
toolbar; if the Format Objects window appears, select the symbol and click the Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into a
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format Objects
window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears, select the
symbol and click the Format button.
2. Select the Style tab.
3. In the Chart Type list box select OHLC Bar.
OHLC Chart Type can also be selected by one of the following methods:
- Click the Bar Chart icon on the Chart Analysis toolbar; or:
- In the main menu select View and click Bar Chart.
Setting OHLC Chart Style 59
How? 59
To open the Format Symbol window, click the Format Symbol icon on the Chart Analysis
toolbar; if the Format Objects window appears, select the symbol and click the Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into a
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format Objects
window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears, select the
symbol and click the Format button.
2. Select the Style tab.
3. In the Chart Style section click on the component element to be changed.
4. From the drop-down list select a style.
5. To apply the most recently selected component's style of to all components, click the Apply to all components
button.
6. To display the Last Price Marker check the Last Price Marker check box, or uncheck the box to hide the
marker; the color of the marker is the same as of the Close component.
7. To use these style settings for all new charts of this type, check Use as Default check box.
To change bars' Weight, click Increase Weight or Decrease Weight icon on the Control toolbar,
or
select Format in the main menu and click Increase Weight or Decrease Weight.
HLC Bar Chart visually presents the data series as a sequence of bars.
Each HLC bar is a vertical line connecting the High and the Low price points (ticks), and graphically represents the range of
an instrument’s price movement over a defined interval. The price of the last tick of the tick group, on which the bar is based, is
indicated on the right side of the line by a mark known as the bar's Close component.
An HLC Bar has two components: High/Low and Close. The color and width of each of the bar's components can be
customized in the Chart Style section.
Selecting HLC Chart Type 61
How? 61
To open the Format Symbol window, click the Format Symbol icon on the Chart Analysis
toolbar; if the Format Objects window appears, select the symbol and click the Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into a
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format Objects
window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears, select the
symbol and click the Format button.
2. Select the Style tab.
3. In the Chart Type list box select HLC Bar.
How? 61
To open the Format Symbol window, click the Format Symbol icon on the Chart Analysis
toolbar; if the Format Objects window appears, select the symbol and click the Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into a
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format Objects
window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears, select the
symbol and click the Format button.
2. Select the Style tab.
3. In the Chart Style section click on the component element to be changed.
4. From the drop-down list select a style.
5. To apply the most recently selected component's style of to all components, click the Apply to all components
button.
6. To display the Last Price Marker check the Last Price Marker check box, or uncheck the box to hide the
marker; the color of the marker is the same as of the Close component.
7. To use these style settings for all new charts of this type, check Use as Default check box.
To change bars' Weight, click Increase Weight or Decrease Weight icon on the Control toolbar,
or
select Format in the main menu and click Increase Weight or Decrease Weight.
A Hollow Candlestick Chart plots the data series using a sequence of candlestick figures. A single candlestick consists of a
body and a wick. The entire length of the candlestick represents the distance from the high to the low.
The body represents the distance between the open price and the close price.
The wick can be on either end or both ends. A wick above the body represents the distance from the high to the open/close,
whichever is closer. A wick below the body represents the distance from the low to the open/close, whichever is closer.
On the chart, the body of a candlestick takes the form of a pillar-like rectangle. The wick is the line above and/or below the
body.
How? 63
To open the Format Symbol window, click the Format Symbol icon on the Chart Analysis
toolbar; if the Format Objects window appears, select the symbol and click the Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into a
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format Objects
window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears, select the
symbol and click the Format button.
Candlestick Chart Type can also be selected by one of the following methods:
· Click the Hollow Candlestick Chart icon on the Chart Analysis toolbar; or:
· In the main menu select View and click Hollow Candlestick.
How? 63
To open the Format Symbol window, click the Format Symbol icon on the Chart Analysis
toolbar; if the Format Objects window appears, select the symbol and click the Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into a
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format Objects
window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears, select the
symbol and click the Format button.
2. Select the Style tab.
3. In the Chart Style section click on the component element to be changed.
4. In the Color column select one of the standard 40 colors from the palette box, or click the Other button to
create custom colors.
5. From the Width drop-down list box select a width to change the thickness of the candlestick.
6. To apply the most recently selected component's style to all components, click the Apply to All Components
button.
7. To display the Last Price Marker select the Last Price Marker check box, or clear the box to hide the marker;
the color of the marker is the same as the color of the Down component.
8. To use these style settings for all new charts of this type, select Use as Default check box.
Candlestick Chart
How? 65
To open the Format Symbol window, click the Format Symbol icon on the Chart Analysis
toolbar; if the Format Objects window appears, select the symbol and click the Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into a
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format Objects
window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears, select the
symbol and click the Format button.
2. Select the Style tab.
3. In the Chart Type list box select Candlestick.
How? 65
To open the Format Symbol window, click the Format Symbol icon on the Chart Analysis
toolbar; if the Format Objects window appears, select the symbol and click the Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into a
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format Objects
window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears, select the
symbol and click the Format button.
2. Select the Style tab.
3. In the Chart Style section click on the component element to be changed.
4. In the Color column select one of the standard 40 colors from the palette box, or click the Other button to
create custom colors.
5. From the Width drop-down list box select a width of the body border and the wick.
6. To show candlestick borders, select Show Candlestick Border check box;clear the box to hide the border. The
style of the border is the same as of the Wick.
7. To apply the most recently selected component's style to all components, click the Apply to All Components
button.
8. To display the Last Price Marker select the Last Price Marker check box, or clear the box to hide the marker;
the color of the marker is the same as the color of the Down component.
9. To use these style settings for all new charts of this type, select Use as Default check box.
Dot On Close chart visually presents the data series as a sequence of dots that are not connected by a line.
Each dot graphically represents the Close (last tick's) price of each tick group.
The color and size of the dots can be customized in the Chart Style section.
Selecting Dot on Close Chart Type 67
How? 67
To open the Format Symbol window, click the Format Symbol icon on the Chart Analysis
toolbar; if the Format Objects window appears, select the symbol and click the Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into a
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format Objects
window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears, select the
symbol and click the Format button.
2. Select the Style tab.
3. In the Chart Type list box select Dot on close.
How? 67
To open the Format Symbol window, click the Format Symbol icon on the Chart Analysis
toolbar; if the Format Objects window appears, select the symbol and click the Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into a
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format Objects
window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears, select the
symbol and click the Format button.
2. Select the Style tab.
3. In the Chart Style section click on the component element to be changed.
4. From the drop-down list select a style.
5. To display the Last Price Marker check the Last Price Marker check box, or uncheck the box to hide the
marker; the color of the marker is the same as of the Close component.
6. To use these style settings for all new charts of this type, check Use as Default check box.
To change the Weight (size) of the dots, click Increase Weight or Decrease Weight icon on the Control
toolbar, or select Format in the main menu and click Increase Weight or Decrease Weight.
Line On Close chart visually presents the data series as a sequence of dots that are connected by a line.
Each dot graphically represents the Close (last tick's) price of each tick group.
The color and width of the line can be customized in the Chart Style section.
Selecting Line on Close Chart Type 69
How? 69
To open the Format Symbol window, click the Format Symbol icon on the Chart Analysis
toolbar; if the Format Objects window appears, select the symbol and click the Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into a
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format Objects
window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears, select the
symbol and click the Format button.
2. Select the Style tab.
3. In the Chart Type list box select Line on Close.
Line on Close Chart Type can also be selected by one of the following methods:
- Click the Line on Close Chart icon on the Chart Analysis toolbar; or:
- In the main menu select View and click Line on Close.
Selecting line on Close Chart Style 69
How? 69
To open the Format Symbol window, click the Format Symbol icon on the Chart Analysis
toolbar; if the Format Objects window appears, select the symbol and click the Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into a
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format Objects
window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears, select the
symbol and click the Format button.
2. Select the Style tab.
3. In the Chart Style section click on the component element to be changed.
4. From the drop-down list select a style.
5. To display the Last Price Marker check the Last Price Marker check box, or uncheck the box to hide the
marker; the color of the marker is the same as of the Close component.
6. To use these style settings for all new charts of this type, check Use as Default check box.
To change the line's Weight, click Increase Weight or Decrease Weight icon on the Control toolbar, or select
Format in the main menu and click Increase Weight or Decrease Weight.
Invisible Chart
In an Invisible Chart the data series is present, but not visually presented.
An invisible chart can be used when the data series is needed for a calculation, but the visual presentation of the data series is
not required.
Selecting Invisible Chart Type 71
How? 71
To open the Format Symbol window, click the Format Symbol icon on the Chart Analysis
toolbar; if the Format Objects window appears, select the symbol and click the Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into a
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format Objects
window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears, select the
symbol and click the Format button.
2. Select the Style tab.
3. In the Chart Type list box select Invisible Chart.
How? 71
To open the Format Symbol window, click the Format Symbol icon on the Chart Analysis
toolbar; if the Format Objects window appears, select the symbol and click the Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into a
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format Objects
window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears, select the
symbol and click the Format button.
2. Select the Style tab.
3. To display the Last Price Marker check the Last Price Marker check box, or uncheck the box to hide the
marker; the color of the marker is the same as the Dot on Close Chart's Close component.
4. To use this style setting for all new charts of this type, check Use as Default check box.
Chart Scaling
The Price Scale is located on the left and/or the right side of the chart, and consists of a vertical line with marks, indicating
values, and identified by Labels. The values on the scale are specific to the symbol or indicator plotted on the chart. The scale
represents the value range, within which the chart is plotted. To determine the value of a point on a chart, the vertical position
of the point is referenced to a value on the Price Scale.
The Range of the Price Scale and the chart's top and bottom Margins 79 can be set.
The Labels 82 , identifying scale's marks, can be customized.
Two Scaling Types are available (except for the Movement Size scaling mode):
Linear 80
Semi-Log 80
Each scale range setting and scaling type offers its own advantages.
If the price scale is based on the data series and an indicator is overlaid on the data series, the range of the price scale
may not be wide enough to capture all parts of the indicator. In this case, the parts of the indicator that fall outside of the
range of the price scale will not be displayed in the chart. To automatically expand the range of the price scale so that it will
capture all parts of the indicator
1. Open the Format Symbol window.
How? 73
To open the Format Symbol window, click the Format Symbol icon on the Chart Analysis
toolbar; if the Format Objects window appears, select the symbol and click the Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into a
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format Objects
window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears, select the
When two or more data series exist in the same subchart, it is possible to overlay the data series.
1. Open the Format Symbol window.
How? 73
To open the Format Symbol window, click the Format Symbol icon on the Chart Analysis
toolbar; if the Format Objects window appears, select the symbol and click the Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into a
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format Objects
window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears, select the
symbol and click the Format button.
2. Select the Scaling tab.
3. In the General section, select Overlay Data Series.
By default, the price scale of the first data series is shown. To change to the price scale of another data series,
1. Right-click on the price scale.
2. Select the data series in the window.
Tip: Two different Price Scales can be displayed at the same time by setting the left and right price scales.
Scale Range
Five types of Price Scale Range can be used: Screen, Entire Series, User Defined, Price Range, and Movement Size.
Screen Scale Range 75
The range of the price scale is equal to the range of the data series that's visible on the chart. The price scale will adjust
automatically if the user scrolls to another part of the data series.
How? 75
To open the Format Symbol window, click the Format Symbol icon on the Chart
Analysis toolbar; if the Format Objects window appears, select the symbol and click the
Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format
Objects window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears,
select the symbol and click the Format button.
2. Select the Scaling tab.
3. In the Scaling Range list box, select Screen.
4. Select the Use Margins check box to set a margin between the plot and the chart’s upper and lower
borders.
5. Enter numbers in the Top Margin % box and Bottom Margin % box to define the top margin and
bottom margins.
6. In the Scaling Type section select Linear 80 or Semi-Log 80 .
7. Select the Center Last Price check box to center the last price of the data series in the middle of the
price scale.
Note: To use these scaling settings for all new charts, check Use as Default check box.
Entire Series Scale Range 75
The range of the price scale is equal to the range of the entire data series, including parts of the data series not currently
shown on the chart. Since the range of the price scale is that of the entire data series, the range of the price scale will not
change if the user scrolls to another part of the data series.
How? 75
To open the Format Symbol window, click the Format Symbol icon on the Chart
Analysis toolbar; if the Format Objects window appears, select the symbol and click the
Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format
Objects window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears,
select the symbol and click the Format button.
2. Select the Scaling tab.
3. In the Scaling Range list box, select Entire Series.
4. Select the Use Margins check box to set a margin between the plot and the chart’s upper and lower
borders.
5. Enter numbers in the Top Margin % box and Bottom Margin % box to define the top margin and
bottom margins.
6. In the Scaling Type section select Linear 80 or Semi-Log 80 .
7. Select the Center Last Price check box to center the last price of the data series in the middle of the
price scale.
Note: To use these scaling settings for all new charts, check Use as Default check box.
User Defined Scale Range 75
The range of the price scale is defined manually. Any part of the data series that falls outside of the defined range will not
be displayed in the Chart Window.
How? 75
To open the Format Symbol window, click the Format Symbol icon on the Chart
Analysis toolbar; if the Format Objects window appears, select the symbol and click the
Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format
Objects window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears,
select the symbol and click the Format button.
2. Select the Scaling tab.
3. In the Scaling Range list box, select User Defined.
4. In the Maximum box, enter the maximum value of the range.
5. In the Minimum box, enter the minimum value of the range.
6. In the Scaling Type section select Linear 80 or Semi-Log 80 .
Note: User Defined scale range can not be used as a default.
Movement Size Scale Range 75
The range of the price scale is defined manually. The scale will be based on the number of points within a unit of length. For
example, the user can specify that each inch of the price scale represents 10 points.
How? 75
To open the Format Symbol window, click the Format Symbol icon on the Chart
Analysis toolbar; if the Format Objects window appears, select the symbol and click the
Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format
Objects window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears,
select the symbol and click the Format button.
2. Select the Scaling tab.
3. In the Scaling Range list box, select Movement Size.
The range of the price scale is defined manually. The range of the scale will be based on the number of points above and
below the Last Price Marker. For example, if the last price market is at 100, the user can specify that the range of the scale
will be 20 points above and 20 points below the Last Price Marker (i.e., 120 to 80)
How? 75
To open the Format Symbol window, click the Format Symbol icon on the Chart
Analysis toolbar; if the Format Objects window appears, select the symbol and click the
Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format
Objects window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears,
select the symbol and click the Format button.
2. Select the Scaling tab.
3. In the Scaling Range list box, select Price Range.
4. In the Above box, enter the number of points above the Last Price Marker. This is the maximum value of
the range.
5. In the Below box enter the number of points below the Last Price Marker. This is the minimum value of
the range.
Note: To use these scaling settings for all new charts, check Use as Default check box.
4.4.3.3 Margins
Margins
Margins are the extra spaces between the visual representation of a data series and the chart's upper and lower borders, and
are set as a percentage of the data series' price range. Margins can not be set for a chart with a User Defined price scale.
How to set 79
How? 79
To open the Format Symbol window, click the Format Symbol icon on the Chart Analysis
toolbar; if the Format Objects window appears, select the symbol and click the Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into a
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format Objects
window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears, select the
symbol and click the Format button.
2. Select the Scaling tab.
3. In Use Margins section, check the Use Margins check box to add margins; uncheck the box to not add
margins.
4. In the Top Margin text box enter the top margin as a percentage of the series price range.
5. In the Bottom Margin text box enter the bottom margin as a percentage of the series price range.
Note: To use these margin settings for all new charts, check Use as Default check box.
Scale Type
A Linear price scale is the conventional, absolute scale. A $10 change in price will always be represented by the same
displacement along the vertical axis, regardless of the base price from which the change took place.
How? 80
To open the Format Symbol window, click the Format Symbol icon on the Chart
Analysis toolbar; if the Format Objects window appears, select the symbol and click the
Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format
Objects window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears,
select the symbol and click the Format button.
2. Select the Scaling tab.
3. In the Scaling Type section, click the Linear radio button.
To center the last quote in the middle of the price scale, check the Center Last Price check box; the last quote can
not be centered for a chart with a User Defined price scale.
To use these scaling settings for all new charts, check Use as Default check box.
Semi-Log Scaling 80
A Semi-Log (percent-of-change) price scale is a percentage-based scale. A 10% change in price will always be represented
by the same displacement along the vertical axis, regardless of the absolute price change. A $5 price change from a $50
base price (10%) will be represented by the exact same vertical displacement as a $10 price change from a $100 base
price (10%), even though the absolute values of $5 and $10 are not equal.
Important: Margins should not be used with a Semi-Log price scale.
How? 80
To open the Format Symbol window, click the Format Symbol icon on the Chart
Analysis toolbar; if the Format Objects window appears, select the symbol and click the
Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format
Objects window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears,
select the symbol and click the Format button.
2. Select the Scaling tab.
3. In the Scaling Type section, click the Semi-Log radio button.
To center the last quote in the middle of the price scale, check the Center Last Price check box; the last quote can
not be centered for a chart with a User Defined price scale.
To use these scaling settings for all new charts, check Use as Default check box.
Scale Labels
Scale Labels are the numbers that appear next to the marks on the price scale that indicate what value the marks represent.
If a chart contains multiple objects, the object, for which the label values are displayed, can be selected. The object is selected
separately for the right and for the left price scales, making it possible to display different label values on the right than on the
left scale of the chart.
The numbers displayed on the labels can be abbreviated, and either the increment (step size) between the labels or the total
number of labels can be set.
Selecting Object for Label Values 82
The object, for which the label values on a price scale are displayed, can be selected by right-clicking on the price scale
and then clicking the #) Object Name, where # is the number, indicating the order in which the object has been added to
the chart.
Dividing Scale Label Values 82
The values of some indicators, for example volume, can be rather large, such as 25,000,000,000.
The numbers displayed on the labels can be abbreviated by dividing the values they represent by a set factor.
For example, a label for the value of 25,000,000,000, divided by a factor of 1,000,000,000, will read "25.00". Characters can
also be added to the end of the label, for example a "b", resulting in a label that reads "25.00 b" instead of the
"25,000,000,000".
Tip: Tip: You can elect to set the division factor automatically or manually.
The division factor with the corresponding characters is selected automatically. To change the characters, see
Dividing Label Values Manually.
Automatic selection of the division factor can be chosen from the Format Symbol window:
1. Open the Format Symbol window.
How? 82
To open the Format Symbol window, click the Format Symbol icon on the Chart
Analysis toolbar; if the Format Objects window appears, select the symbol and click the
Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format
Objects window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears,
select the symbol and click the Format button.
2. Select the Scaling tab.
3. In the Divide Scale Labels section, check Divide Scale Labels check box.
The division factor can be set manually, and the corresponding characters assigned, from the Format Symbol
window:
1. Open the Format Symbol window.
How? 82
To open the Format Symbol window, click the Format Symbol icon on the Chart
Analysis toolbar; if the Format Objects window appears, select the symbol and click the
Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format
Objects window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears,
select the symbol and click the Format button.
2. Select the Scaling tab.
3. In the Divide Scale Labels section, check Divide Scale Labels check box.
4. Select the Manual radio button.
5. In the drop-down list box select the division factor.
6. In the Displayed as text box enter the characters to be added to the end of the label for the selected
division factor; these characters will also be used when Dividing Label Values Automatically.
Tip: To use these scaling settings for all new charts, check Use as Default check box.
How? 82
To open the Format Symbol window, click the Format Symbol icon on the Chart
Analysis toolbar; if the Format Objects window appears, select the symbol and click the
Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format
Objects window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears,
select the symbol and click the Format button.
2. Select the Scaling tab.
3. In the Divide Scale Labels section, uncheck Divide Scale Labels check box.
Tip: To use these scaling settings for all new charts check Use as Default check box.
Setting Label Step 82
You can choose from three different settings that determine the increment (step size) between labels:
Automatic - the increment is optimized dynamically to aid the visual assessment of price levels
Set Step Size - the increment between labels is set manually
Set Number of Labels - a set number of labels is always displayed
Automatic 82
Increment between the labels is set from the Format Symbol window:
1. Open the Format Symbol window.
How? 82
To open the Format Symbol window, click the Format Symbol icon on the Chart
Analysis toolbar; if the Format Objects window appears, select the symbol and click the
Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format
Objects window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears,
select the symbol and click the Format button.
2. Select the Scaling tab.
3. In the Set Labels Manually section, uncheck Set Labels Manually check box.
Tip: To use these scaling settings for all new charts, check Use as Default check box.
Increment between the labels is set from the Format Symbol window:
1. Open the Format Symbol window.
How? 82
To open the Format Symbol window, click the Format Symbol icon on the Chart
Analysis toolbar; if the Format Objects window appears, select the symbol and click the
Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format
Objects window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears,
select the symbol and click the Format button.
2. Select the Scaling tab.
3. In the Set Labels Manually section, check Set Labels Manually check box.
4. Select the Set Step Size radio button.
5. In the Set Step Size text box enter the increment value (step size), in units displayed on the scale.
Note: A label at each step will only be displayed if there is enough room on the scale.
Tip: To use these scaling settings for all new charts, check Use as Default check box.
A fixed total number of labels can be set from the Format Symbol window:
1. Open the Format Symbol window.
How? 82
To open the Format Symbol window, click the Format Symbol icon on the Chart
Analysis toolbar; if the Format Objects window appears, select the symbol and click the
Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format
Objects window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears,
select the symbol and click the Format button.
2. Select the Scaling tab.
3. In the Set Labels Manually section, check Set Labels Manually check box.
4. Select the Set Number of Labels radio button.
5. In the Set Number of Labels text box enter the fixed number of labels desired.
Note: The set number of labels will only be displayed if there is enough room on the scale.
Tip: To use these scaling settings for all new charts, check Use as Default check box.
Using Fractional Price Scale Format 82
How? 82
To open the Format Symbol window, click the Format Symbol icon on the Chart Analysis
toolbar; if the Format Objects window appears, select the symbol and click the Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into a
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format Objects
window appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears, select the
symbol and click the Format button.
2. Select the Scaling tab.
3. In the General section, select No. of digits after decimal.
4. Select the number of digits in the drop-down list.
Volume Profile
Volume Profile displays a histogram of the transaction volume at each price level over a certain time period.
1. Open the Format Symbol window.
How? 88
To open the Format Symbol window, click the Format Symbol icon on the Chart Analysis toolbar; if
the Format Objects window appears, select the symbol and click the Format button.
The Format Symbol window can also be opened by one of the following methods:
- Position the mouse pointer over the symbol's data series; double-click once the Pointer changes into
a Hand ;
or:
- Position the mouse pointer over the symbol's data series; once the Pointer changes into a Hand
, right-click and then click Format 'Symbol Name';
or:
- Right-click on an empty area of the chart and then click Format Symbols; if the Format Objects window
appears, select the symbol and click the Format button;
or:
- Select Format in the main menu and click Symbol; if the Format Objects window appears, select the
symbol and click the Format button.
2. Select the Volume Profile tab.
3. Select the Data Type drop-down box to choose whether the volume for each bar will be plotted on the open, high,
low, close, or mid price of the bar. All of the volume for the bar will be aggregated and plotted on the chosen price.
4. In the Data Range section,
· Select Last Session to base the time period of the volume profile on the last session, or
· Select Screen to base the time period of the volume profile on the data shown on the screen, or
· Select Entire Series to base the time period of the volume profile on the entire data series, or
· Select Back to base the time period of the volume profile on the specified number of bars.
To open the Format Window window, click the Format Window icon on the Chart Analysis toolbar.
The Format Window window can also be opened by one of the following methods:
- Double-click on an empty area of the chart, or on the chart's Status Line; or:
- Right-click on an empty area of the chart and then click Format Window; or:
Reloading Charts
Occasionally a bad tick, an error, or a gap in the price data causes a chart to plot improperly.
Reloading will redraw the chart based on a fresh set of data from the data source. In the process of reloading, a new set of
data is downloaded from the data feed.
It is possible to reload the entire length of the data series or to reload only a certain number of days back. Any existing data, for
which no replacement data is available from the data source, is retained.
Reloading Charts 90
Global Reload
In addition to reloading the data for a single chart, all of the data, for some or all of the charts, can be reloaded by entering
a Global Reload command into the Command Line toolbar.
Usage
Where:
.rld – reload command
glob – an optional parameter; specifies a global reload
res – an optional parameter, limits the global reload to charts with the specified resolution only; must be preceded by
a comma
Resolution – an optional parameter, used in combination with the res parameter; specifies the resolution of the
charts that the global reload will be limited to.
Examples
.rld will reload the chart in the active window
.rld glob will reload all charts
.rld glob, res=1minute will reload all charts with a resolution of 1 minute
Note: After reloading charts with 1-Tick resolutions, it is necessary to exit and re-start the application. Make sure to
wait at least 30 seconds before restarting the application in order to make sure that all of its processes have
ended. You can also end the processes manually by using the Task Manager.
Note: In some instances it may be necessary to completely restart the computer in order to complete the process of
reloading a chart with a 1-Tick resolution.
Adjusting Charts
It is possible to scroll through charts horizontally, move the data series up or down vertically, adjust horizontal and vertical
scales, and zoom in and out.
Scrolling Horizontally through a Chart 91
Scrolling horizontally through a chart allows viewing the parts of a data series that extend outside the visible range of the
Chart Window. Make sure that the Chart Window, containing the chart to be scrolled through, is selected as the active
window. A chart can be scrolled through only if the data series extends beyond the visible range.
To scroll through a chart use the scroll bar at the bottom of the Chart Window: position the mouse pointer over the "bar" of
the scroll bar, click and hold the left mouse button, and drag the "bar" to the left or to the right, or click the left or the right
button on the scroll bar; please note that the scroll bar will not appear if it is hidden in the Appearance settings.
A chart can also be scrolled through horizontally by one of the following methods:
· Use the mouse wheel to scroll through the chart; or:
· Click the Scroll Left or the Scroll Right icon on the Control toolbar; or:
· Position the mouse pointer over a data series; once the Pointer changes into a Hand , hold the left mouse
button and drag the chart to the right or to the left; or:
· Position the mouse pointer over the chart area and press and hold the space bar; once the Pointer changes into a
Horizontal Double-Headed Arrow , hold the left mouse button and drag the chart to the right or to the left; or:
· Use the Arrow Left and Arrow Right keys on the keyboard; or:
· Select Format in the main menu and click Scroll Left or Scroll Right.
Make sure that the data series to be moved vertically is selected as the active series.
To move a series vertically in the chart click the Move Up or the Move Down icon on the Control toolbar.
A data series can also be moved vertically by one of the following methods:
· Position the mouse pointer over the price scale and press and hold the space bar; once the Pointer changes into
a Vertical Double-Headed Arrow , hold the left mouse button and drag the series up or down; or:
· Use the Arrow Up or the Arrow Down key on the keyboard; or:
· Select Format in the main menu and click Move Up or Move Down.
Horizontal chart scale can be adjusted by changing the bar spacing, and vertical scale by changing the price scale
compression.
Make sure that the Chart Window containing the chart, the bar spacing of which is to be changed, is selected as the
active window.
To change the chart's bar spacing click the Decrease Bar Spacing or the Increase Bar Spacing icon
on the Control toolbar.
The chart's bar spacing can also be changed by one of the following methods:
· Position the mouse pointer over the time scale; hold the left mouse button and drag the pointer to the right or to
the left (the pointer will change into an Increase Spacing or Decrease Spacing symbol); or:
· Use Ctrl + Plus and Ctrl + Minus hotkey combinations; the numeric pad keys as well as the regular keyboard
keys can be used; or:
· Select Format in the main menu and click Increase Bar Spacing or Decrease Bar Spacing; or:
· Set Bar Spacing, in pixels, in the X - Time Scale tab of the Format Appearance window.
To display the entire data series select Format in the main menu and click Display Entire Series.
Make sure that the data series, the price scale compression of which is to be changed, is selected as the active
series.
To change the compression of a series' price scale click the Compress Price Scale or the Expand Price
Resetting Scales 91
Chart scales can be reset, canceling any changes made to the time scale (bar spacing) or the price scale (compression and
series vertical position).
Scales can be reset individually or both at once.
Make sure that the Chart Window containing the chart, the scales of which are to be reset, is selected as the active
window.
To reset both scales of a Chart Window click the Reset Scales icon on the Control toolbar.
Tip: Both scales can also be reset by selecting Format in the main menu and clicking Reset Scales.
Make sure that the Chart Window containing the chart, the time scale of which is to be reset, is selected as the
active window.
To reset the time scale (bar spacing) of a Chart Window click the Reset Time Scale icon on the Control
toolbar.
The time scale (bar spacing) can also be reset by one of the following methods:
· Double-click on the time scale; or:
· Right-click on the time scale and then click Reset Scale; or:
· Select Format in the main menu and click Reset Time Scale.
Make sure that the Chart Window containing the chart, the price scale of which is to be reset, is selected as the
active window. Resetting cancels the price scale compression as well as any vertical displacement of the data
series.
To reset a Chart Window's price scale click the Reset Price Scale icon on the Control toolbar.
The compression of a chart's price scale can also be reset by one of the following methods:
· Double-click on the price scale; or:
· Right-click on the price scale and then click Reset Scale; or:
· Select Format in the main menu and click Reset Price Scale.
Zooming In 91
1. Click the Zoom In icon on the Control toolbar, or select Format in the main menu and click Zoom In;
There is no limit to the number of times a zoom-in can be performed within the same chart: to zoom in further, repeat steps
2 and 3; each zoom-in constitutes a "Zoom Step".
Zooming Out 91
To zoom out one "Zoom Step" click the Zoom Out icon on the Control toolbar, or select Format in the main menu
and click Zoom Out.
Each zoom-out reverses a single zoom-in step; to zoom out a step further, repeat the zoom-out again.
Note: The Zoom Out icon is enabled only if the chart is zoomed in.
Using Pointers
A pointer is a movable marker that indicates a position on the screen and follows the movement of the mouse. Commands and
options can be selected by positioning the pointer over the desired choice and clicking a mouse button.
Two kinds of markers can be chosen: Conventional (Arrow) Pointer and Cross Pointer.
The pointers can be used in three modes: Hint, Cross, and Tracking.
Pointer 94
To choose the conventional mouse pointer, click the Pointer icon on the Chart Analysis toolbar.
The conventional mouse pointer can also be chosen by selecting View in the main menu and clicking Pointer.
Cross Pointer 94
Cross Pointer looks like the crosshairs of a target sight and is preferred by some users.
To choose the Cross Pointer, click the Cross Pointer icon on the Chart Analysis toolbar.
The Cross Pointer can also be chosen by selecting View in the main menu and clicking Cross Pointer.
Understanding Hint Modes 94
Chart Hint 94
A Chart Hint window displays the time, price, and other data specific to the pointer's position on a chart.
To show the Chart Hint window temporarily, click and hold the left mouse button while the mouse pointer is
positioned or dragged over a chart; once the mouse button is let go, the hint window will disappear.
To toggle the Chart Hint window on and off, click the Show Chart Hint icon on the Chart Analysis toolbar.
The Chart Hint window can also be toggled on and off by selecting View in the main menu and clicking Show Chart
Hint.
To toggle Hint windows between transparent and opaque modes select View in the main menu and click
Transparent Hint.
Drawing Hint 94
A Drawing Hint window appears next to the mouse pointer during the drawing operations, and displays the drawing
tool data specific to the pointer's position on a chart.
To toggle the Drawing Hint window on and off select View in the main menu and click Show Drawing Hint.
To toggle Hint windows between transparent and opaque modes select View in the main menu and click
Transparent Hint.
Cross Mode 94
The Cross mode aids in determining the pointer's position. The perpendicular lines of the "cross" reference the pointer's
exact location in respect to the axes, with the corresponding values displayed in the Labels on each axis.
To toggle the Cross mode on and off click the Show Cross icon on the Chart Analysis toolbar. The Cross mode can
also be toggled on and off by selecting View in the main menu and clicking Show Cross.
To toggle the Cross mode Labels between transparent and opaque modes select View in the main menu and click Solid
Labels.
Tracking modes can only be used in combination with the Cross mode. Tracking modes replicate the Cross mode
lines in all of the Workspace's Chart Windows in which the lines fall within the range of the chart.
The Labels are displayed in the original window only. A Tracking mode is also known as the Global Cursor. The
Tracking Time and Price mode replicates both Time and Price lines, and the Tracking Time mode replicates only
the Time line.
In order to use a Tracking mode the Cross mode must first be enabled.
To toggle the Tracking Time and Price mode on and off click the Tracking Time and Price icon on the Chart
Analysis toolbar.
The Tracking Time and Price mode can also be toggled on and off by selecting View in the main menu, then
pointing to Tracking Settings and clicking Tracking Time and Price.
Note: The Tracking Time and Price icon is enabled only if the Cross mode is on.
Tracking Time 94
In order to use a Tracking mode the Cross mode must first be enabled.
To toggle the Tracking Time mode on and off select View in the main menu, then point to Tracking Settings and
click Tracking Time.
Note: Enabling the Tracking Time mode while the Tracking Time and Price mode is on will switch the mode
from Tracking Time and Price to Tracking Time.
Making Screenshots
An image of the active Chart Window can be copied to the clipboard for use in another application, saved as a file, or sent via
e-mail.
An image of the entire application window can also be saved as a file.
Copying Image to Clipboard 96
To save an image of the active Chart Window or the entire application window as a file:
1. Select File in the main menu and click Save as Image.
2. In the Save as Image window that appears, choose the Active Window or the Application Window radio
button.
3. In the Reduce Image to drop-down list box select the size of the image to be saved, in percent; reducing the
image lowers the resolution and decreases the image file size.
4. Check the Show Image check box to display the image file once it has been saved.
5. Click OK.
6. In the Save As dialog box that appears, choose the file name and the image format type, and click the Save
button.
7. If the Show Image check box has been checked, the saved image will be displayed.
When a number of objects are displayed in a single SubChart, the objects are displayed in "layers" – one object is in the
"front", the next is "behind" it, and so on. The order of the layers constitutes the Visual Order of the objects. The Visual Order
can be changed to prevent a thick line in the "front" layer from obscuring a thin line in the "back" layer.
The Visual order can be changed by two different methods:
Right-click on the chart area and then click Visual Order; in the Visual Order window that appears, select an object and use
the order buttons to change its visual order; or:
Position the mouse pointer over an object; once the Pointer changes into a Hand , right-click, then point to Visual
Order and use the shortcut menu order commands to change the visual order of the object.
Printing Charts
Chart Appearance
The appearance of the following Chart Window elements can be customized from the Format Appearance Window:
Background 100
4.6.2 Background
Setting Background
Chart Background consists of Background Color, Grid, and Session Break lines.
Setting Background Color 100
How? 100
To open the Format Window window, click the Format Window icon on the Chart Analysis
toolbar.
The Format Window window can also be opened by one of the following methods:
- Double-click on an empty area of the chart, or on the chart's Status Line; or:
- Right-click on an empty area of the chart and then click Format Window; or:
- Select Format in the main menu and click Window.
2. Select the Background tab.
3. In the Background Color section select one of the standard 40 colors from the palette box, or click the Other
button to create custom colors.
Tip: To use these background settings for all new charts, check Use as Default check box.
Setting Grid 100
Grid aids in the visual assessment of price levels and time increments. Grid Type and Color can be selected, or the Grid
can be hidden. The available Grid Types are: Point, Solid, Horizontal, Dotted, and Detailed Dotted.
Grid is set from the Format Window window:
1. Open the Format Window window.
How? 100
To open the Format Window window, click the Format Window icon on the Chart Analysis
toolbar.
The Format Window window can also be opened by one of the following methods:
- Double-click on an empty area of the chart, or on the chart's Status Line; or:
- Right-click on an empty area of the chart and then click Format Window; or:
- Select Format in the main menu and click Window.
2. Select the Background tab.
3. In Show Grid section check the Show Grid check box to display the Grid on the chart; uncheck the box to hide
the Grid.
4. Select Grid type in the Type drop-down list box.
5. Select Grid color in the Color drop-down palette box.
Tip: To use these background settings for all new charts, check Use as Default check box.
Setting Session Breaks 100
Session Breaks are indicated on the chart by vertical lines. The lines' Color, Style, and Weight can be selected, or Session
Break lines can be hidden.
Session Breaks are set from the Format Window window:
1. Open the Format Window window.
How? 100
To open the Format Window window, click the Format Window icon on the Chart Analysis
toolbar.
The Format Window window can also be opened by one of the following methods:
- Double-click on an empty area of the chart, or on the chart's Status Line; or:
- Right-click on an empty area of the chart and then click Format Window; or:
- Select Format in the main menu and click Window.
2. Select the Background tab.
3. In Show Session Breaks section check Show Session Breaks check box to display the lines on the chart;
uncheck the box to hide the Session Break lines.
4. Select line color in the Color drop-down palette box.
5. Select line style in the Style drop-down list box.
6. Select line weight in the Weight drop-down list box; line weight can only be selected for the solid line style.
Tip: To use these background settings for all new charts, check Use as Default check box.
Chart Window
The appearance of SubChart Dividers and of the Chart Window's Title Bar and Scroll Bar are set from the Format Window
window.
Setting SubChart Dividers 102
SubChart Dividers separate the SubCharts in the Chart Window. The Dividers' Style and Color can be selected, or Dividers
can be hidden.
How? 102
To open the Format Window window, click the Format Window icon on the Chart Analysis
toolbar.
The Format Window window can also be opened by one of the following methods:
- Double-click on an empty area of the chart, or on the chart's Status Line; or:
- Right-click on an empty area of the chart and then click Format Window; or:
- Select Format in the main menu and click Window.
2. Select the Chart Window tab.
3. In Show SubChart Dividers section, check Show SubChart Dividers check box to display the dividers;
uncheck the box to hide the dividers.
Tip: To use these settings for all new charts, check Use as Default check box.
Line SubChart Divider consists of a flat line. The Color and Style of the line can be selected.
SubChart Dividers are set from the Format Window window:
1. Open the Format Window window.
How? 102
To open the Format Window window, click the Format Window icon on the Chart Analysis
toolbar.
The Format Window window can also be opened by one of the following methods:
- Double-click on an empty area of the chart, or on the chart's Status Line; or:
- Right-click on an empty area of the chart and then click Format Window; or:
- Select Format in the main menu and click Window.
2. Select the Chart Window tab.
3. In Show SubChart Dividers section, check Show SubChart Dividers check box to display the Dividers.
4. Click the Line radio button.
5. Select line color in the Color drop-down palette box.
6. Select line style in the Style drop-down list box.
Tip: To use these settings for all new charts, check Use as Default check box.
3D SubChart Divider color and style are determined by the operating system appearance settings. SubChart Dividers
are set from the Format Window window:
1. Open the Format Window window.
How? 102
To open the Format Window window, click the Format Window icon on the Chart Analysis
toolbar.
The Format Window window can also be opened by one of the following methods:
- Double-click on an empty area of the chart, or on the chart's Status Line; or:
- Right-click on an empty area of the chart and then click Format Window; or:
- Select Format in the main menu and click Window.
2. Select the Chart Window tab.
3. In Show SubChart Dividers section, check Show SubChart Dividers check box to display the Dividers.
4. Click the 3D radio button.
Tip: To use these settings for all new charts, check Use as Default check box.
Setting Title Bar 102
A Title Bar is a horizontal bar, located at the top of a window and containing title text and maximize, minimize, and close
buttons. A window is moved by dragging its title bar with the mouse.
Chart Window Title Bar displays the name, resolution, and data source of the first data series that was added to the chart.
The Title Bar can be set to be hidden, displayed, or displayed only when the Chart Window is active (Auto-Hide).
Title Bar is set from the Format Window window:
1. Open the Format Window window.
How? 102
To open the Format Window window, click the Format Window icon on the Chart Analysis toolbar.
The Format Window window can also be opened by one of the following methods:
- Double-click on an empty area of the chart, or on the chart's Status Line; or:
- Right-click on an empty area of the chart and then click Format Window; or:
- Select Format in the main menu and click Window.
2. Select the Chart Window tab.
3. In the Title Bar section:
· Click the Off radio button to hide the Title Bar.
· Click the On radio button to display the Title Bar.
· Click the Auto-Hide radio button to auto-hide the Title Bar.
Tip: To use these settings for all new charts, check Use as Default check box.
Setting Scroll Bar 102
The Scroll Bar offers a fast and convenient method for viewing the parts of a data series that extend outside the visible
range of the Chart Window. The chart is scrolled through by positioning the mouse pointer over the “bar” of the Scroll Bar,
holding the left mouse button, and dragging the “bar” to the left or to the right, or by clicking move left or move right buttons
on the Scroll Bar.
The Scroll Bar can be set to be hidden, displayed, or displayed only when the Chart Window is active (Auto-Hide). Please
note that the Scroll Bar will only appear if the series actually extends beyond the visible range of the Chart Window.
Scroll Bar is set from the Format Window window:
1. Open the Format Window window.
How? 102
To open the Format Window window, click the Format Window icon on the Chart Analysis toolbar.
The Format Window window can also be opened by one of the following methods:
- Double-click on an empty area of the chart, or on the chart's Status Line; or:
- Right-click on an empty area of the chart and then click Format Window; or:
Price Scale
The Price Scale is located on the left or/and on the right side of the chart and consists of a vertical Line with marks, indicating
values, and identified by Labels. The values on the scale are specific to the symbol or indicator plotted on the chart. The scale
represents the value range, within which the chart is plotted. To determine the value of a point on a chart, the vertical position
of the point is referenced to a value on the Price Scale.
Price Scale Line and Label styles can be set, or Price Scale and Labels can be hidden completely.
Price Scale Position 105
Price scale position can be set from the Format Window window:
1. Open the Format Window window.
How? 105
To open the Format Window window, click the Format Window icon on the Chart Analysis
toolbar.
The Format Window window can also be opened by one of the following methods:
- Double-click on an empty area of the chart, or on the chart's Status Line; or:
- Right-click on an empty area of the chart and then click Format Window; or:
- Select Format in the main menu and click Window.
2. Select the Y - Price Scale tab.
3. In the Settings section, check Left or/and Right check boxes to display the scale on the left or/and on the right
side of the chart, respectively; uncheck both boxes to hide the Price Scale and Labels.
Tip: To use these appearance settings for all new charts, check Use as Default check box.
Price scale position can also be set by right-clicking on the price scale and then checking Left Price Scale or/and Right
Price Scale, to display the scale on the left or/and on the right side of the chart, respectively; uncheck both options to hide
the Price Scale and Labels.
Price Scale Style 105
How? 105
To open the Format Window window, click the Format Window icon on the Chart Analysis
toolbar.
The Format Window window can also be opened by one of the following methods:
- Double-click on an empty area of the chart, or on the chart's Status Line; or:
- Right-click on an empty area of the chart and then click Format Window; or:
- Select Format in the main menu and click Window.
2. Select the Y - Price Scale tab.
3. In the Style section, select scale line color in the Line Color drop-down palette box.
4. Select scale line style in the Line Style drop-down list box.
Tip: To use these appearance settings for all new charts, check Use as Default check box.
Price Scale Labels 105
Price Scale Labels are set from the Format Window window:
1. Open the Format Window window.
How? 105
To open the Format Window window, click the Format Window icon on the Chart Analysis
toolbar.
The Format Window window can also be opened by one of the following methods:
- Double-click on an empty area of the chart, or on the chart's Status Line; or:
- Right-click on an empty area of the chart and then click Format Window; or:
- Select Format in the main menu and click Window.
2. Select the Y - Price Scale tab.
3. In the Settings section, the Label Width is set for the Right or/and the Left scales individually:
· to determine label width automatically, click the Automatic radio button.
· to determine label width manually, click the Manual radio button and enter the desired width, in characters,
into the Characters textbox.
4. In the Style section, select label color in the Label Color drop-down palette box.
5. In the Font section, select label font in the Font drop-down list box.
6. In the Size section, select label font size in the Size drop-down list box.
7. In the Font Style section, check Bold, Italic, and/or Underline check boxes to select bold, italic, and/or
underline label font style.
Tip: To use these appearance settings for all new charts, check Use as Default check box.
Time Scale
The Time Scale is located at the bottom of the chart and consists of a horizontal Line with time stamp marks identified by
Labels. The increment (step size) between the labels is optimized dynamically to aid in the visual assessment of time stamp
data.
The values on the scale are specific to the resolution of the chart. The scale represents the data range, within which the chart
is plotted. To determine the time value of a point on a chart, the horizontal position of the point is referenced to a value on the
Time Scale. Chart's Bar Spacing, Right Margin, and Empty Periods settings affect the span of the scale displayed.
Bar Spacing and Right Margin can be set, and Empty Periods displayed or hidden. Time scale Line and Label styles can be
selected, or Time Scale and Labels can be hidden completely.
Setting Bar Spacing 107
How? 107
To open the Format Window window, click the Format Window icon on the Chart Analysis
toolbar.
The Format Window window can also be opened by one of the following methods:
- Double-click on an empty area of the chart, or on the chart's Status Line; or:
- Right-click on an empty area of the chart and then click Format Window; or:
- Select Format in the main menu and click Window.
2. Select the X - Time Scale tab.
3. In the Settings section, in the Bar Spacing text box, enter the bar spacing, in pixels.
Tip: To use these appearance settings for all new charts, check Use as Default check box.
The chart's bar spacing can also be changed by one of the following methods:
- Click the Increase Bar Spacing or the Decrease Bar Spacing icon on the Control toolbar; or:
- Use Ctrl + Plus and Ctrl + Minus hotkey combinations; the numeric pad keys as well as the regular keyboard keys can
be used; or:
- Select Format in the main menu and click Increase Bar Spacing or Decrease Bar Spacing.
Setting Right Margin 107
Studies that visualize the predicted price movement require a Right Margin on the chart.
Right Margin is set from the Format Window window:
1. Open the Format Window window.
How? 107
To open the Format Window window, click the Format Window icon on the Chart Analysis
toolbar.
The Format Window window can also be opened by one of the following methods:
- Double-click on an empty area of the chart, or on the chart's Status Line; or:
- Right-click on an empty area of the chart and then click Format Window; or:
- Select Format in the main menu and click Window.
2. Select the X - Time Scale tab.
3. In the Settings section, in the Right Margin text box, enter the right margin, in bars.
Tip: To use these appearance settings for all new charts, check Use as Default check box.
How? 107
To open the Format Window window, click the Format Window icon on the Chart Analysis
toolbar.
The Format Window window can also be opened by one of the following methods:
- Double-click on an empty area of the chart, or on the chart's Status Line; or:
- Right-click on an empty area of the chart and then click Format Window; or:
- Select Format in the main menu and click Window.
2. Select the X - Time Scale tab.
3. In the Settings section, check Show Empty Periods check box to display the empty periods on the chart;
uncheck the box to hide the empty periods.
Tip: To use these appearance settings for all new charts, check Use as Default check box.
Time Scale Line 107
How? 107
To open the Format Window window, click the Format Window icon on the Chart Analysis
toolbar.
The Format Window window can also be opened by one of the following methods:
- Double-click on an empty area of the chart, or on the chart's Status Line; or:
- Right-click on an empty area of the chart and then click Format Window; or:
- Select Format in the main menu and click Window.
2. Select the X - Time Scale tab.
3. In the Settings section, check Show Scale check box to display the scale; uncheck the box to hide the Time
Scale and Labels.
4. In the Style section, select scale line color in the Line Color drop-down palette box.
5. In the Style section, select scale line style in the Line Style drop-down list box.
Tip: To use these appearance settings for all new charts, check Use as Default check box.
Time Scale Labels 107
Time Scale Labels are set from the Format Window window:
1. Open the Format Window window.
How? 107
To open the Format Window window, click the Format Window icon on the Chart Analysis
toolbar.
The Format Window window can also be opened by one of the following methods:
- Double-click on an empty area of the chart, or on the chart's Status Line; or:
- Right-click on an empty area of the chart and then click Format Window; or:
- Select Format in the main menu and click Window.
2. Select the X - Time Scale tab.
3. In the Style section, select label text color in the Label Color drop-down palette box.
4. In the Font section, select label font in the Font drop-down list box.
5. In the Size section, select label font size in the Size drop-down list box.
6. In the Font Style section, check Bold, Italic, and/or Underline check boxes to select bold, italic, and/or
underline label font style.
Tip: To use these appearance settings for all new charts, check Use as Default check box.
Status Line
Status Line is located at the top of the chart and displays symbol information and market snapshots for the data series and
studies being plotted. Status Line Fields, Color, Font, and Style can be configured, or the Status Line can be hidden.
In Tracking Mode, Status Line tracks the position of the mouse pointer. The information is displayed for each series for only
the single bar, corresponding to the pointer’s current horizontal position along the time scale. If the mouse pointer is not
positioned over the chart, or if the Tracking Mode is not enabled, information displayed is for the series’ entire current trading
sessions.
In MultiLine Mode, a separate Status Line for each of the plotted series or studies is displayed at the top of the chart. If the
MultiLine Mode is not enabled, all information is displayed in a single Status Line.
Data series and studies can be Linked, Moved, and Deleted by using the Status Line Management Controls.
Status Line Mode 110
How? 110
To open the Format Window window, click the Format Window icon on the Chart Analysis
toolbar.
The Format Window window can also be opened by one of the following methods:
- Double-click on an empty area of the chart, or on the chart's Status Line; or:
- Right-click on an empty area of the chart and then click Format Window; or:
- Select Format in the main menu and click Window.
2. Select the Status Line tab.
3. In the Enable Status Line section:
· To enable the status line, check the Enable Status Line check box; uncheck the box to hide the status line.
· To enable the Tracking Mode, check the Enable Tracking Mode check box; uncheck the box to disable the
Tracking Mode.
· To enable the MultiLine Mode, check the Enable MultiLine Mode check box; uncheck the box to disable the
MultiLine Mode.
Tip: To use these appearance settings for all new charts, check Use as Default check box.
Status Line Fields 110
Status Line Fields are configured from the Format Window window:
3..1.Open the Format Window window.
How? 110
To open the Format Window window, click the Format Window icon on the
Chart Analysis toolbar.
The Format Window window can also be opened by one of the following methods:
- Double-click on an empty area of the chart, or on the chart's Status Line; or:
- Right-click on an empty area of the chart and then click Format Window; or:
- Select Format in the main menu and click Window.
3..2.Select the Status Line tab.
3..3.In the Enable Status Line section, select a field in the Status Line Fields scrolling list box.
· To display a field in the status line, check the check box next to the field’s name, or select the field and
click the Show button.
· To hide a field, uncheck the check box next to the field’s name, or select the field and click the Hide
button.
· To change the order in which fields are displayed in the status line, select a field and use the Move Up
or Move Down buttons.
Tip: To use these appearance settings for all new charts, check Use as Default check box.
Status Line Style 110
How? 110
To open the Format Window window, click the Format Window icon on the
Chart Analysis toolbar.
The Format Window window can also be opened by one of the following methods:
- Double-click on an empty area of the chart, or on the chart's Status Line; or:
- Right-click on an empty area of the chart and then click Format Window; or:
- Select Format in the main menu and click Window.
3..5.Select the Status Line tab.
3..6.In the Status Line Colors section, select a color for each text or value type in the Color drop-down
palette box.
3..7.In the Font section, select status line font in the Font drop-down list box.
3..8.In the Size section, select status line font size in the Sizedrop-down list box.
3..9.In the Font Style section, check Bold, Italic, and/or Underline check boxes to select bold, italic, and/or
underline status line font style.
Tip: To use these appearance settings for all new charts, check Use as Default check box.
Status Line Management Controls 110
It is possible to Delete, Move between SubCharts, and Link series and studies by using the Status Line.
A series or a study can be moved to another existing or new SubChart within the same Chart
Window.
3..11.To move a series to an existing SubChart, position the mouse pointer over the Status Line of the series
to be moved; once the Pointer changes into a Hand , hold the left mouse button and drag the
pointer to another SubChart. Release the mouse button to complete moving the series.
3..12.To move a series to a new SubChart, position the mouse pointer over the Status Line of the series to
be moved; once the Pointer changes into a Hand , hold the left mouse button and drag the
pointer to the upper or lower border of the Chart Window, or of another SubChart. Once the pointer
changes into the Create New SubChart symbol, release the mouse button to create a new
SubChart.
It is possible to Link charts in groups based on the symbol name or resolution. Each group is identified
by one of 14 different colors. When any one chart of the linked group is changed, the changes will
automatically be applied to the rest of the linked charts. Different Chart Windows as well as SubCharts
within the same window can be linked.
Linking can save a considerable amount of time when working with complex workspaces.
When the symbol for any one chart of the linked group is changed, the changes will automatically
be applied to the rest of the linked charts.
3..13.To link a chart by symbol, click the Symbol Link button on the Status Line of the series to be
linked; please note that the Symbol Link button will not appear if it is hidden in the Status Line settings.
3..14.To assign the series to a Link Group, select the Link Group Color Code from the drop-down list.
3..16.To link the series to all charts in all open Workspaces, select Linked to All .
Note: The resolution of the linked charts will not be affected. All studies or signals previously
applied to the chart will be recalculated for the new symbol. All manually placed drawing
objects will remain in their original location. Objects based on formula calculations (such
as signal arrows, etc.) may disappear if the new data series does not match the
calculation criteria.
When the resolution of any one chart of the linked group is changed, the changes will
automatically be applied to the rest of the linked charts.
Charts are linked from the Status Line:
3..17.To link a chart by resolution, click the Resolution Link button on the Status Line of the series to
be linked; please note that the Resolution Link button will not appear if it is hidden in the Status Line
settings.
3..18.To assign the series to a Link Group, select the Link Group Color Code from the drop-down list.
3..20.To link the series to all charts in all open Workspaces, select Linked to All .
Note: The symbols of the linked charts will not be affected. All studies or signals previously
applied to the chart will be recalculated for the new resolution. All manually placed
drawing objects will remain in their original location. Objects based on formula
calculations (such as signal arrows, etc.) may disappear if the new data series does not
match the calculation criteria.
Volume Profile
Data Window
The Data Window displays information about a specific bar on the chart. When the user points the mouse pointer at a bar on
the chart, the Data Window will automatically show data series information, strategy information, and indicator information.
The data series information will show the date and time stamp, price level of the mouse pointer, symbol name, open, high, low,
close, up volume, down volume, and bar number.
The strategy information will show the direction of the signal, quantity, and the entry/exit price.
The indicator information will show the indicator names and values.
Displaying Data Window 114
Drawing Tools
Drawing tools are the objects one can draw on the chart to assist in the market analysis process. These tools allow traders to
make visual clues on a market's movements.
There are two different types of drawing objects:
Non-analytical - such as the Arc, Ellipse, Rectangle and others used to highlight the particular segment of a chart, or enter the
text as with the Text drawing tool.
Analytical - such as the Fibonacci tools, Gann tools, trend line and others used to analyze the necessary price data.
All drawing tools can be applied, moved, and formatted directly on a chart. Many drawing tools can be extended the right or left
to help analyze or highlight a new data on a chart. Some drawing tools can be cloned.
Drawing tools will be saved with the symbol. If drawing tools are applied to a symbol and the symbol is changed to a different
symbol, then the drawing tools will be saved with the old symbol. The new symbol will not have any drawing tools automatically
applied. If the symbol is changed back to the old symbol, then the saved drawing tools will be automatically applied.
Note: If the data series or resolution is changed the drawing tools will be displayed on the chart with the same time and
price coordinates.
Note: If a drawing tool is applied to a data series and the data series is deleted, then the drawing tool will also be
deleted. If a drawing tool is applied to a data series and the data series is hidden, then the drawing tool will also
be hidden.
Inserting Drawing Tools 115
In MultiCharts it is possible to apply the several similar drawing tools to the same chart. In this case each instance of the
drawing tool has its own format settings.
There are 3 ways to insert a drawing tool:
1. In the menu select Insert, point to Drawing and select the desired drawing tool.
2. Click the arrow next to the Drawing tools icon on the Main toolbar and select the desired drawing tool
from the menu.
3. Click the icon of the desired drawing tool on the Drawing toolbar.
Read more about inserting in the corresponding topics devoted to each drawing tool.
Note:
To display or hide the Drawing toolbar click the Drawing tools icon.
Operating Drawing Tools 115
In MultiCharts it is possible to format, move, reshape, clone, remove, hide and redisplay (change the status) the drawing
tools.
Note: Moving, cloning, and reshaping can be performed directly from a chart ONLY.
Note: Hiding and redisplaying (changing the status) as well as getting information about drawing tools applied can be
performed in the Format Objects window ONLY.
Note: Formatting and removing can be performed directly from a chart as well as in the Format Objects window.
Note: It is easier to format or remove drawing tools from the Format Objects window in case many objects are
displayed in the chart.
Or
The general information about all drawing tools applied to the given Chart Window is displayed in the Format
Objects window:
Status: In the Status column the status of a drawing tool is displayed which can be either on (when the drawing tool
is displayed), or off (when the drawing tool is hidden).
Number: Each drawing tool has its own number that is shown in the Number column.
Name: In the Name column the names of all applied drawing tools are shown.
Base Data: The symbols to which the drawing tools are applied appear in the Base Data column.
Subchart: One can see to which subchart the particular drawing tool is applied in the Subchart column or, if the
subchart is hidden, there will be written that the drawing tool is hidden.
Each instance of a drawing tool has its own Format window. The title of a drawing tool and its number (if there are 2
or more similar drawing tools in the same Chart Window) are shown in the titlebar of each Format window.
Read more about formatting in the corresponding topics devoted to each drawing tool.
Or
1. In the Format Objects window select the Drawings tab.
2. Select the drawing tool that is to be removed and press the Remove button.
3. Press the Close button to close the Format Objects window.
Alerts 115
Alert is a visual or/and audio notification triggered when the market price touches the line of a drawing tool.
Alerts on Drawing Tools are set up in the same way as they are on Indicators.
Please refer to the Alerts 188 section to get more info.
E-mail alerts are available only for the following drawing tools:
· Andrew's Pitchfork
· Equidistant
· Fibonacci Retracement Price Lines
· Fibonacci Speed Resistance Fan
· Fibonacci Trend Based Price Extension Lines
· Gann Fan
· Horizontal Line
· Time Line
· Trend Line
· Regression Channel
If a drawing is applied to a symbol whose price scale is in fractional format, then the price values of the drawing will
also be in fractional format.
If a drawing is applied to a study whose price scale is in fractional format, then the price values of the drawing will
also be in fractional format.
Trend Line
A Trend Line is an analytical drawing tool used to indicate the direction of price movement. The upward trend line is called
bullish, the downward trend line is called bearish. A trend reversal may take place if a market moves away from its current
trend. The Trend Line can be represented as a Ray Line or as an Extended Line.
Ray Line - is a trend line that can be extended to the right only. It is an analytical drawing tool used to indicate the possible
future direction of the price movement.
Extended Line - is a trend line that is extended to the left and to the right. It is an analytical drawing tool used to indicate the
past and future direction of the price movement.
Inserting Trend Line 118
c) Click the arrow next to the Drawing tools icon on the Main toolbar and select Trend Line from the menu.
In MultiCharts one can change the settings of the Trend Line. All the changes are performed in the Format Trend Line
window.
Each instance of a Trend line has its own Format window. The number (if there are 2 or more Trend lines in the same
Chart Window) are shown in the titlebar of each Format Trend Line window.
One can change the style of the Trend line: its color, style and weight. One can choose any element of the Trend line to be
displayed or hidden. It is possible to extend the Trend line to the left or/and to the right. One can also select one of 4
calculation types available to compute a Trend line. It is also possible to change the time and price coordinates of the Trend
line.
How? 118
How? 118
How? 118
How? 118
Horizontal Line
A Horizontal Line is an analytical drawing tool used to indicate price levels as well as the support and resistance levels.
However, you should apply other analysis techniques to confirm price breakouts and make more precise decisions.
Inserting Horizontal Line 121
c) Click the arrow next to the Drawing tools icon on the Main toolbar and select Horizontal Line from the menu.
In MultiCharts one can change the settings of the Horizontal line. All the changes are performed in the Format Horizontal
Line window.
Each instance of a Horizontal line has its own Format window. The number (if there are 2 or more Horizontal lines in the
same Chart Window) are shown in the titlebar of each Format Horizontal Line window.
One can change the settings of the Horizontal line: its color, style and weight. One can also choose to show or not the
labels, select their font, style, size and the character set. It is possible to apply the strikeout or underline effects to the
labels. If shown the labels can be displayed to the left, to the right, or in the middle of the Horizontal line. It is also possible
to change the price coordinate of the Horizontal line.
How? 121
lines.
7. Click OK.
How? 121
How? 121
Time Line
A Time Line is a non-analytical drawing tool used to show on the time axis the desired moment of time, the beginning or the
end of the needed period of time.
Inserting Time Line 124
c) Click the arrow next to the Drawing Tools icon on the Main toolbar and select Time Line from the menu.
In MultiCharts one can change the settings of the Time Line. All the changes are performed in the Format Time Line
window.
Each instance of a Time line has its own Format window. The number (if there are 2 or more Time lines in the same Chart
Window) are shown in the titlebar of each Format Time Line window.
One can change the settings of the Time line: its color, style and weight. One can also choose to show or not the labels,
select their font, style, size and the character set. It is possible to apply the strikeout or underline effects to the labels. If
shown the labels can be displayed horizontally or vertically and placed at the top, center or bottom of the Time line. One
can also change the time coordinate of the Time line.
How? 124
7. Click OK.
How? 124
How? 124
Regression Channel
The Regression Channel is an analytical drawing tool used to precisely define a price trend and its boundaries with regard to
the support and resistance levels. To create the Regression Channel two parallel equidistant lines are drawn above and below
a linear regression regression channel that is based on a user specified price (High, Low, Open, Close). The bottom line is the
support level, and the top line - the resistance level. All these channels are based on the linear regression regression channel.
Prices may extend outside the channel for a short period of time. But if prices stay outside the Regression Channel for a long
period of time, a reversal trend may occur.
The distance of the channel lines from the median regression line is based on either:
1. The highest point among the peaks and lowest point among the troughs between the points upon which the median
regression line is drawn.
2. A user specified number of standard deviations above/below the median regression line.
3. The maximal upward or downward oscillation.
4. A user specified number of standard errors above/below the median regression line.
Markets tend to have a "balancing point" that is a point towards which prices tend to move. The Regression analysis allows you
to determine this "balancing point". On the other hand, the Standard Error analysis helps determine the "extreme points".
In MultiCharts there are 4 types of regression channels:
1. Segment High-Low.
2. Standard Deviation.
3. Raff Regression.
4. Standard Error.
Inserting Regression Channel 126
c) Click the arrow next to the Drawing tools icon on the Main toolbar and select Regression Channel from the
menu.
In MultiCharts one can change the settings of the Regression Channel. All the changes are performed in the Format
Regression Channel window.
Each instance of a Regression channel has its own Format window. The number (if there are 2 or more Regression
channels in the same Chart Window) are shown in the titlebar of each Format Regression Channel window.
One can change the settings of a Regression Channel: the color, style and weight of the Regression, Upper Channel and
Lower Channel lines. It is possible to extend the Regression Channel to the left or/and to the right. One can choose to show
or not the labels and select their font, its style and size, and the character set. It is possible to apply the strikeout or
underline effects. If shown the labels can be displayed to the left or to the right of the Upper Channel and Lower Channel
lines. One can also select one of 4 calculation types available to compute the Regression Channel and the price types to
compute the regression line. It is also possible to change the time coordinates of the Regression Channel.
How? 126
How? 126
How? 126
How? 126
6. Click OK.
How? 126
Equidistant Channel
The Equidistant Channel is an analytical drawing tool used to indicate the support and resistance levels for the price ranges
contained in it. The narrower the Equidistant Channel is, the less volatile is the market.
The Equidistant Channel is represented by parallel equidistant lines and may be of several variations:
Parallel Lines - are trend lines used to delineate the Equidistant Channel in which the market trades. The upper horizontal line
is the resistance line. The lower horizontal line is the support line. If either of these lines is penetrated there may occur a price
breakout.
Extended Parallel Lines - are the parallel trend lines extended to the left and to the right. They delineate the Equidistant
Channel in which the market trades and show the past and future direction of the price movement.
Ray Parallel Lines - are the parallel trend lines extended to the right only. They delineate the Equidistant Channel in which the
market trades and show the possible future direction of the price movement.
Horizontal Parallel Lines - are parallel lines used to delineate the Equidistant Channel in which the market trades, especially
when it is a sideway market and there is no significant price movements. The upper horizontal line is the resistance line. The
lower horizontal line is the support line. If either of these lines is penetrated there may occur a price breakout.
Inserting Equidistant Channel 130
c) Click the arrow next to the Drawing Tools icon on the Main toolbar and select Equidistant Channel from the
menu.
To move an Equidistant Channel without changing the distance between the equidistant lines or their slope:
1. Point the cursor at the Equidistant Channel that is to be moved.
To reshape an Equidistant Channel (change the distance between the equidistant lines or the slope of the Equidistant
Channel):
1. Point the cursor at the Equidistant Channel that is to be reshaped.
In MultiCharts one can change the settings of the Equidistant Channel. All the changes are performed in the Format
Equidistant Channel window.
Each instance of a Equidistant channel has its own Format window. The number (if there are 2 or more Equidistant
channels in the same Chart Window) are shown in the titlebar of each Format Equidistant Channel window.
One can change the settings of the Equidistant Channel: its color, style and weight. It is possible to extend the equidistant
lines to the left or/and to the right. One can also change the distance between the lines and their direction. Moreover, more
than 2 lines can be reflected. It is also possible to change the time and price coordinates of the Equidistant Channel.
How? 130
How? 130
How? 130
How? 130
Andrews' Pitchfork
This tool was developed by Alan Andrews. Andrews' Pitchfork consists of three parallel lines usually drawn from three
consecutive major peaks or troughs. The three parallel lines formed by Andrews' Pitchfork can help predict channels of support
and resistance in a trending market.
The three trend lines are drawn as follows:
1. The first centerline at the left-most point that you selected and it passes right between the right-most points. This centerline
is known as the handle of the pitchfork.
2. The second and the third trend lines begin at the right-most points and are drawn parallel to the centerline. These trend lines
are known as the tines of the pitchfork.
Inserting Andrews' Pitchfork 133
c) Click the arrow next to the Drawing Tools icon on the Main toolbar and select Andrews' Pitchfork from the
menu.
To reshape Andrews' Pitchfork (change its direction or the distance between its tines):
1. Drag the cursor to Andrews' Pitchfork that is to be reshaped.
In MultiCharts one can change the settings of Andrews' Pitchfork. All the changes are performed in the Format Andrews'
Pitchfork window.
Each instance of an Andrews' pitchfork has its own Format window. The number (if there are 2 or more Andrews' pitchforks
in the same Chart Window) are shown in the titlebar of each Format Andrews' Pitchfork window.
One can change the settings of Andrews' Pitchfork: the color, style and weight of the handle, base and the tines. One can
choose any element of the pitchfork to be displayed or hidden. It is also possible to change the time and price coordinates
of Andrews' Pitchfork.
How? 133
How? 133
Fibonacci Retracement Price Lines are an analytical drawing tool used to examine the support and resistance levels as well as
price breakouts. First, a trend line between two extreme points - a trough and opposing peak - is drawn. Then a series of
horizontal lines is drawn. These lines intersect the trend line at the Fibonacci levels or at the selected distance percentages
between the beginning and the end of this trend line. Some of the lines might not be visible, because of the scale limitations of
the chart window.
Inserting Fibonacci Retracement Price Lines 135
1. Select one of three ways to insert the Fibonacci Retracement Price Lines:
a) In the menu select Insert, point to Drawing and then to Fibonacci Tools and click Retracement Price Lines.
b) Click the Fibonacci Retracement Price Lines icon on the Drawing toolbar.
c) Click the arrow next to the Drawing Tools icon on the Main toolbar, point to Fibonacci Tools and select
Retracement Price Lines.
To move the Fibonacci Retracement Price Lines without changing the shape of the drawing tool:
1. Point the cursor at the Fibonacci Retracement Price Lines to move the drawing tool.
To reshape the Fibonacci Retracement Price Lines (change the trend line slope, the distance between the Retracement
Price Lines, or their length):
1. Point the cursor at the Fibonacci Retracement Price Lines to reshape the drawing tool.
In MultiCharts one can change the settings of the Fibonacci Retracement Price Lines. All the changes are performed in the
Format Fibonacci Retracement Price Lines window.
Each instance of a Fibonacci retracement price lines has its own Format window. The number (if there are 2 or more
Fibonacci retracement price lines instances in the same Chart Window) are shown in the titlebar of each Format Fibonacci
Retracement Price Lines window.
One can change the settings of the Fibonacci Retracement Price Lines: the color, style and weight of the trend line and the
Retracement Price lines (up to 12 lines are available). It is possible to specify the desired distance percentages on which
the Retracement Price lines are based or the Fibonacci percentages can be used. One can extend the Retracement Price
lines to the left or to the right. One can also choose to show or not the labels (price or/and value), select their font, style,
size and the character set. It is possible to apply the strikeout or underline effects to the labels. If shown the labels can be
displayed to the left, right or in the middle of the Fibonacci Retracement Price Lines. It is possible to specify the time and
price coordinates.
How? 135
How? 135
How? 135
Or
1. Drag the cursor to the Fibonacci retracement price lines instance that is to be formatted.
How? 135
Fibonacci Speed/Resistance Fan is an analytical drawing tool used to indicate the support and resistance levels of an existing
trend and the price level at which possible changes (rise or fall) in the trend may occur. First, a trend line between two extreme
points - a trough and opposing peak - is drawn. Then an invisible vertical line is drawn through the second extreme point. Lines
are drawn from the first extreme point and intersect the invisible vertical line at the selected time/price percentages of the
distance between the beginning and the end of this line. The most common percentages are 1/3 and 2/3, but you can draw up
to 11 lines based on any selected distance percentages as well as on the Fibonacci percentages. Some of the lines might not
be visible, because of the scale limitations of the chart window.
These lines can indicate the support and resistance levels of an existing trend. Usually the price remains above the higher
speed line. If the higher line is penetrated, prices generally fall to the lower speed line, which, in many cases, becomes the
support level. If prices break below the higher speed line, fall to the lower line, and then begin to rise, the lower speed line
becomes the resistance level.
Note. Fibonacci Arcs and Fibonacci Fan lines are sometimes used together to anticipate support and resistance as the
Fibonacci studies may intersect.
Inserting Fibonacci Speed/Resistance Fan 138
c) Click the arrow next to the Drawing Tools icon on the Main toolbar, point to Fibonacci Tools and select
Speed/Resistance Fan.
To reshape a Fibonacci Speed/Resistance Fan (change its size or slope of the lines):
1. Point the cursor at the Fibonacci Speed/Resistance Fan that is to be reshaped.
In MultiCharts one can change the settings of the Fibonacci Speed/Resistance Fan. All the changes are performed in the
Format Fibonacci Speed/Resistance Fan window.
Each instance of a Fibonacci speed/resistance fan has its own Format window. The number (if there are 2 or more
Fibonacci speed/resistance fan instances in the same Chart Window) are shown in the titlebar of each Format Fibonacci
Speed/Resistance Fan window.
One can change the settings of the Fibonacci Speed/Resistance Fan: the color, style and weight of the trend line, squares
and the fan lines (up to 8 fan lines are available). It is possible to specify the desired distance percentages on which the fan
lines are based or the Fibonacci percentages can be used. One can also choose to show or not the labels (price or/and
value), select their font, style, size and the character set. It is possible to apply the strikeout or underline effects to the
labels. It is possible to specify the time and price coordinates.
How? 138
How? 138
Speed/Resistance Fans.
10. Click OK.
How? 138
Fibonacci Speed/Resistance Arcs are an analytical drawing tool used to determine the direction and speed of the trend
reversal and indicate the support/resistance levels. First, a trend line between two extreme points - a trough and opposing peak
- is drawn. Then arcs are created and intersect the speed line at the selected distance percentages between the beginning and
the end of this trend line. The most common percentages are 1/3 and 2/3, but you can draw up to 11 arcs based on any
selected distance percentages as well as on the Fibonacci percentages. Some of the arcs might not be visible, because of the
scale limitations of the chart window.
The Fibonacci Speed/Resistance Arcs can indicate the support and resistance levels. Usually the price remains above the
higher arc. If the higher arc is penetrated, prices generally fall to the lower arc, which, in many cases, becomes the support
level. If prices break below the higher arc, fall to the lower arc, and then begin to rise, the lower arc becomes the resistance
level.
Inserting Fibonacci Speed/Resistance Arcs 141
c) Click the arrow next to the Drawing Tools icon on the Main toolbar, point to Fibonacci Tools and select
Speed/Resistance Arcs.
To reshape the Fibonacci Speed/Resistance Arcs (change the slope of the trend line or the arcs' radius):
1. Point the cursor at the Fibonacci Speed/Resistance Arcs to reshape the drawing tool.
In MultiCharts one can change the settings of the Fibonacci Speed/Resistance Arcs. All the changes are performed in the
Format Fibonacci Speed/Resistance Arcs window.
Each instance of a Fibonacci speed/resistance arcs has its own Format window. The number (if there are 2 or more
Fibonacci speed/resistance arcs instances in the same Chart Window) are shown in the titlebar of each Format Format
Fibonacci Speed/Resistance Arcs window.
One can change the settings of the Speed/Resistance Arcs: the color, style and weight of the trend line and the arcs (up to
12 arcs are available). It is possible to specify the desired distance percentages on which the arcs are based or the
Fibonacci percentages can be used. The Speed/Resistance Arcs can be extended to the shape of an ellipse or circle. One
can also choose to show or not the labels (price or/and value), select their font, style, size and the character set. It is
possible to apply the strikeout or underline effects to the labels.
How? 141
How? 141
How? 141
Fibonacci Time Zones are an analytical drawing tool represented by a series of vertical lines, which are used to indicate
significant price movement near them. These vertical lines are spaced according to the Fibonacci number sequence (1, 1, 2, 3,
5, 8, 13, 21, 34, 55, 89).
Inserting Fibonacci Time Zones 144
c) Click the arrow next to the Drawing Tools icon on the Main toolbar, point to Fibonacci Tools and select Time
Zones.
In MultiCharts one can change the settings of the Fibonacci Time Zones. All the changes are performed in the Format
Fibonacci Time Zones window.
Each instance of a Fibonacci time zones has its own Format window. The number (if there are 2 or more Fibonacci time
zones instances in the same Chart Window) are shown in the titlebar of each Format Fibonacci Time Zones window.
One can change the settings of the Fibonacci Time Zones: the color, style and weight of the base line and the time lines.
One can also choose to show or not the labels, select their font, style, size and the character set. It is possible to apply the
strikeout or underline effects to the labels. If shown the labels can be displayed at the top, bottom or in the middle of the
time lines. It is possible to specify the time coordinates of the base line.
How? 144
3. To display or hide any elements of the Fibonacci Time Zones check or uncheck the corresponding check boxes.
4. In the Color column, using the drop-down lists, select any of the preset 40 colors for the BaseLine and time lines
or click the Others… button to select the custom colors.
5. In the Style column, using the drop-down lists, select the desired styles for the lines.
6. In the Weight column, using the drop-down lists, select the desired weights for the lines.
Note. One can not change the weight of the BaseLine.
7. Check the Use as Default check box to use these settings as the default settings when creating the Fibonacci
Time Zones in future.
8. Click OK.
How? 144
How? 144
Fibonacci Trend-Based Time Lines is an analytical drawing tool used to predict the future price movements and examine the
support and resistance levels as well as price breakouts. It is represented by a series of vertical lines at date/time levels that
shows probable price corrections in an existing trend. First, a trend line is drawn. Depending on its length and direction, vertical
lines are drawn based on the selected distance percentages or on the Fibonacci percentages.
Support indicates a low or series of troughs where price activity has not penetrated. Resistance indicates a high or series of
peaks where price activity has not penetrated.
Inserting Fibonacci Trend-Based Time Lines 146
1. Select one of three ways to insert the Fibonacci Trend-Based Time Lines:
a) In the menu select Insert, point to Drawing and then to Fibonacci Tools and click Trend-Based Time Lines.
b) Click the Fibonacci Trend-Based Time Lines icon on the Drawing toolbar.
c) Click the arrow next to the Drawing Tools icon on the Main toolbar, point to Fibonacci Tools and select Trend-
Based Time Lines.
To move the Fibonacci Trend-Based Time Lines without changing the shape of the drawing tool:
1. Point the cursor at the Fibonacci Trend-Based Time Lines to move the drawing tool.
To reshape the Fibonacci Trend-Based Time Lines (change the slope of the trend line or the distance between the Trend-
Based Time lines):
1. Point the cursor at the Fibonacci Trend-Based Time Lines to reshape the drawing tool.
In MultiCharts one can change the settings of the Fibonacci Trend-Based Time Lines. All the changes are performed in the
Format Fibonacci Trend-Based Time Lines window.
Each instance of a Fibonacci trend-based time lines has its own Format window. The number (if there are 2 or more
Fibonacci trend-based time lines instances in the same Chart Window) are shown in the titlebar of each Format Fibonacci
Trend-Based Time Lines window.
One can change the settings of the Fibonacci Trend-Based Time Lines: the color, style and weight of the trend line and time
lines (up to 11 lines are available). It is possible to specify the desired distance percentages on which the Trend-Based
Time lines are based or the Fibonacci percentages can be used. One can also choose to show or not the labels (price or/
and value), select their font, style, size and the character set. It is possible to apply the strikeout or underline effects to the
labels. Labels can be oriented vertically or horizontally. If shown the labels can be displayed at the top, bottom or in the
middle of the Trend-Based Time lines, horizontally or vertically. It is possible to specify the time and price coordinates.
How? 146
How? 146
How? 146
Gann Fan
The Gann Fan was developed by the famous trader W. D. Gann who applied a combination of mathematical and geometric
principles to trading. He presupposed that there is a specific relationship between price and time that is some unit of price
equals some unit of time.
A Gann Fan is an analytical drawing tool used to indicate time and price movements from important highs and lows and identify
price breakouts.
To create a Gann Fan the middle line of time relative to price is drawn through two selected points. The first point is the one
from which a series of angled lines extends. And the second point is drawn to the right of the first and determines the rate of
equivalence between time and price. The middle line can be of any angle. The middle line which has a 45-degree angle is
known as the 1x1 price/time line. That is the price unit equals the time unit, so price and time are in perfect balance.
The angled lines drawn from the first point indicate a price to time relationship that may be relatively fast or relatively slow,
depending on the size of the Gann angle.
These angled lines, relative to an assumed horizontal line and the middle line, subdivide this horizontal line into eighths (or
thirds).
The direction of a Gann Fan should depend on the current trend. To evaluate an upward trend, the Gann Fan should be drawn
upward to the right, starting at a market low. To evaluate a downward trend, the Gann Fan should be drawn down from the
right, starting at a market high.
Inserting Gann Fan 149
c) Click the arrow next to the Drawing Tools icon on the Main toolbar, point to Gann Tools and select Gann Fan.
To reshape a Gann Fan (change its middle line slope or distance between the fan lines):
1. Point the cursor at the Gann Fan that is to be reshaped.
In MultiCharts one can change the settings of the Gann Fan. All the changes are performed in the Format Gann Fan
window.
Each instance of a Gann Fan has its own Format window. The number (if there are 2 or more Gann fan instances in the
same Chart Window) are shown in the titlebar of each Format Gann Fan window.
One can change the settings of the Gann Fan: the color, style and weight of the fan lines. One can select the time/price
relationship on which the fan lines are based. One can also choose to show or not the labels (price or/and value), select
their font, style, size and the character set. It is possible to apply the strikeout or underline effects to the labels. It is possible
to specify the time and price coordinates.
How? 149
How? 149
How? 149
Gann Square
The Gann Square is created by drawing a Gann Fan from each corner of a square. It is drawn to the right or left from the
selected point on a chart which is generally an important high or low.
Inserting Gann Square 152
c) Click the arrow next to the Drawing Tools icon on the Main toolbar, point to Gann Tools and select Gann
Square.
In MultiCharts one can change the settings of the Gann Square. All the changes are performed in the Format Gann
Square window.
Each instance of a Gann square has its own Format window. The number (if there are 2 or more Gann square instances in
the same Chart Window) are shown in the titlebar of each Format Gann Square window.
One can change the settings of the Gann Square: the color, style and weight of the price/time lines. One can choose the
price/time relationship on which the Gann lines are based. One can also choose to show or not the labels (price or/and
value), select their font, style, size and the character set. It is possible to apply the strikeout or underline effects to the
labels. It is possible to specify the time and price coordinates.
How? 152
How? 152
How? 152
Or
1. In the Format Objects window select the Drawings tab.
2. Select the Gann square instance that is to be formatted and press the Format… button.
2. Select the Properties tab.
3. In the Coordinates section enter the desired time coordinates in the Start Date and End Date fields or use the
drop-down calendars.
4. In the Coordinates section enter the desired price coordinates in the Start Value and End Value fields.
5. Click OK.
Cloning Gann Square 152
Retracement Calculator
The Retracement Calculator computes the price retracement in percents in order to anticipate future trading opportunities. To
calculate Percent Retracement three points are selected on a chart: a significant high or low, the opposite to the first point high
or low and an intermediate point between the first two for which the calculations will be performed. The price range between the
first two points is considered to be 100%.
Performing Retracement Calculation 155
c) Click the arrow next to the Drawing Tools icon on the Main toolbar and select Retracement Calculator from
the menu.
4.7.16 Text
Text
Text is a non-analytical drawing tool used to display text, the user's remarks and so on directly on a chart.
Inserting Text 156
c) Click the arrow next to the Drawing Tools icon on the Main toolbar and select Text from the menu.
To move a Text:
1. Point the cursor at the text that is to be moved.
In MultiCharts one can change the settings of the Text. All the changes are performed in the Format Text window.
Each instance of a Text has its own Format window. The number (if there are 2 or more Text instances in the same Chart
Window) are shown in the titlebar of each Format Text window.
One can select the font, its style, size and color of the text that should be entered as well as the character set and the font
back color. It is possible to apply the Strikeout, Underline, Transparent and Framed effects to the text. One can place the
text to the left, right or in the middle of the initial point at which the text is entered that is move the text along the time axis.
One can also move the text along the price axis and place it at the top, bottom or in the center.
How? 156
6. Enter the desired font size in the Size field or select it from the Size list.
7. In the Effects group check or uncheck the Strikeout, Underline, Transparent or/and Framed check boxes to
display the text struck out, underlined transparent or/and framed.
8. From the Character Set drop-down list select the desired character set.
9. From the Font Back Color drop-down list select any of the preset 40 colors or click the Other… button to select
the custom colors.
Note. The Font Back Color drop-down list is not available if the Transparent effect is applied.
10. From the Font Color drop-down list select any of the preset 40 colors or click the Other… button to select the
custom colors.
11. From the Horizontal Alignment drop-down list select the location of the text along the time axis from the initial
point.
12. From the Vertical Alignment drop-down list select the location of the text along the price axis from the initial
point.
13. Check the Use as Default check box to use these settings as the default settings when using the text as a
drawing tool in future.
14. Click OK.
How? 156
To clone a Text:
1. Drag the cursor to the Text that is to be cloned.
4.7.17 Rectangle
Rectangle
A Rectangle is a non-analytical drawing tool drawn for the purpose of highlighting the desired segment of a chart. For instance,
Rectangles can highlight a top, bottom, or a group of bars.
Inserting Rectangle 158
c) Click the arrow next to the Drawing Tools icon on the Main toolbar and select Rectangle from the menu.
In MultiCharts one can change the settings of the Rectangle. All the changes are performed in the Format Rectangle
window.
Each instance of a Rectangle has its own Format window. The number (if there are 2 or more Rectangles in the same
Chart Window) are shown in the titlebar of each Format Rectangle window.
One can change the settings of a rectangle: the color, style and weight of the border line as well as the color and pattern of
the fill. One can also change the time and price coordinates of the rectangle.
How? 158
Or
1. In the Format Objects window select the Drawings tab.
2. Select the Rectangle that is to be formatted and press the Format… button.
2. Select the Style tab.
3. In the Line section, using the Color drop-down list, select any of the preset 40 colors for the line or click the
Others… button to select the custom color.
4. In the Line section, using the Style drop-down list, select the desired style for the line.
5. In the Line section, using the Weight drop-down list, select the desired weight for the line (available only for the
solid line).
6. In the Fill section, using the Color drop-down list, select any of the preset 40 colors for the fill or click the
Others… button to select the custom colors.
7. In the Fill section, using the Pattern drop-down list, select the desired pattern for the fill.
8. Check the Use as Default check box to use these settings as the default settings when creating other Rectangles.
9. Click OK.
How? 158
To clone a Rectangle:
1. Drag the cursor to the Rectangle that is to be cloned.
4.7.18 Ellipse
Ellipse
An Ellipse is a non-analytical drawing tool drawn for the purpose of highlighting the desired segment of a chart. For instance,
Ellipses can highlight a top, bottom, or a group of bars.
Inserting Ellipse 160
c) Click the arrow next to the Drawing Tools icon on the Main toolbar and select Ellipse from the menu.
In MultiCharts one can change the settings of the Ellipse. All the changes are performed in the Format Ellipse window.
Each instance of an Ellipse has its own Format window. The number (if there are 2 or more Ellipses in the same Chart
Window) are shown in the titlebar of each Format Ellipse window.
One can change the settings of an ellipse: the color, style and weight of the border line as well as the color and pattern of
the fill. One can also change the time and price coordinates of the ellipse.
How? 160
How? 160
To clone an Ellipse:
1. Drag the cursor to the Ellipse that is to be cloned.
4.7.19 Arc
Arc
An Arc is a non-analytical drawing tool represented as an arched line and drawn for the purpose of highlighting the desired
segment of a chart. For instance, Arcs can highlight a top, bottom, or a group of bars. Arcs can be of any formations that is has
any inclination angle.
Inserting Arc 162
c) Click the arrow next to the Drawing Tools icon on the Main toolbar and select Arc from the menu.
In MultiCharts one can change the settings of an Arc. All the changes are performed in the Format Arc window.
Each instance of an Arc has its own Format window. The number (if there are 2 or more Arcs in the same Chart Window)
are shown in the titlebar of each Format Arc window.
One can change the settings of an arc: the color, style and weight of the arc and the trend line upon which the arc is based.
One can choose any element of the arc to be displayed or hidden. A full arc can be also displayed. It is possible to change
the time and price coordinates of the arc.
How? 162
Or
1. In the Format Objects window select the Drawings tab.
2. Select the Arc that is to be formatted and press the Format… button.
2. Select the Data tab.
3. To display or hide any elements of the Arc check or uncheck the corresponding check boxes.
4. In the Color column, using the drop-down lists, select any of the preset 40 colors for the trend line and the arc or
click the Others… button to select the custom colors.
5. In the Style column, using the drop-down lists, select the desired styles for the trend line and the arc.
6. In the Weight column, using the drop-down lists, select the desired weights for the trend line and the arc.
7. Check the Display Full Arc check box to extend the arcs to the shape of an ellipse or circle (depending on the
Divide Time/Price separately setting).
8. Check the Use as Default check box to use these settings as the default settings when creating other Arcs.
9. Click OK.
How? 162
To clone an Arc:
1. Drag the cursor to the Arc that is to be cloned.
Arrow Down
Up and Down Arrows are non-analytical drawing tools drawn for the purpose of highlighting the desired segment of a chart. For
instance, Arrows can highlight a specific bar, top or bottom.
Inserting Arrow Down 164
1. In the menu select Insert, point to Drawing and click Arrow Down.
To move an Arrow:
1. Point the cursor at the Arrow that is to be moved.
In MultiCharts one can change the settings of the Arrow Down. All the changes are performed in the Format Arrow Down
window.
Each instance of the Arrow Down has its own Format window. The numbers (if there are 2 or more Arrows in the same
Chart Window) are shown in the titlebar of each Format Arrow Down window.
One can change the settings of the Arrow: its color, style and weight. It is also possible to change the time and price
coordinates of the Arrow.
How? 164
How? 164
4.7.21 Arrow Up
Arrow Up
Up and Down Arrows are non-analytical drawing tools drawn for the purpose of highlighting the desired segment of a chart. For
instance, Arrows can highlight a specific bar, top or bottom.
Inserting Arrow Up 166
1. In the menu select Insert, point to Drawing and click Arrow Up.
To move an Arrow:
1. Point the cursor at the Arrow that is to be moved.
In MultiCharts one can change the settings of the Arrow Up. All the changes are performed in the Format Arrow Up
window.
Each instance of the Arrow Up has its own Format window. The numbers (if there are 2 or more Arrows in the same Chart
Window) are shown in the titlebar of each Format Arrow Up window.
One can change the settings of the Arrow: its color, style and weight. It is also possible to change the time and price
coordinates of the Arrow.
How? 166
How? 166
4.8 Studies
4.8.1 Using Studies
Using Studies
Studies are technical analysis tools based on trading concepts and formulas, and assist in evaluating market activity and
making trading decisions. Over 270 pre-built, customizable studies, covering the most popular trading concepts and indicators,
are already included with the platform, and additional studies can be imported from a variety of sources. Basic adjustments to
studies' logic can be made by simply changing the Input Values. Studies can be fully customized, or entirely new studies
created, using PowerLanguage® scripting in PowerLanguage Editor. To learn more see Creating Studies 314 .
Studies can be divided into Indicators and Signals:
An Indicator is a visual technical analysis tool, used to analyze market conditions and identify and forecast trends and market
patterns. An indicator is a visualization of a mathematical formula, and consists of one or more Plots – lines, histograms,
series of points or crosses, highs and lows, left and right ticks, or a combination of the above. Indicators are computed using
only price, volume, and (occasionally) open interest data.
A Signal is a mechanical technical analysis tool, used to systematically specify market entry or exit points according to a set of
trading rules implemented in the signal's algorithm. The trade points are indicated on a chart by ticks and arrows. Signals can
be viewed as the basic building blocks of strategies.
An indicator is applied to a particular data series, and can be displayed either in the same chart as the series or in another
SubChart. A signal can only be applied to the series with the Data #1 and is displayed in the same chart as the series. If a
parameter, such as symbol or resolution, of the data series on which the study is based, is changed, the study will be
recalculated and redrawn. If the series, on which a study is based, is deleted, the study will be turned off. Studies can be
Inserted (added) into, or Removed from a chart, and turned off and on. A list of all studies, inserted into a Chart Window, can
be viewed according to type. Indicators can be Hidden, Redisplayed, and Moved between SubCharts. The Visual Order in
which the indicators are displayed on the chart can be changed.
Inserting Studies 168
The number of studies that can be inserted into a chart is limited only by your computer's hardware configuration.
Studies can be inserted from the Insert Study window:
1. Open the Insert Study window.
Opening Insert Study Window 168
To open the Insert Study window, click the Insert Study icon on the Chart Analysis toolbar.
The Insert Study window can also be opened by one of the following methods:
- click the Insert Signal icon on the Chart Analysis toolbar; or:
- Right-click on an empty area of the chart and then click Insert Study; or:
- Use the F7 key; or:
- Select Insert in the main menu and click Study; or:
- Select Insert in the main menu and click Signal.
The Insert Study window can also be accessed from the Format Objects window by selecting the
Indicators or the Signals tab and clicking the Add button.
4. To format the selected studies prior to inserting them into a chart, check the Format check box; uncheck the
box to insert studies without formatting. To learn more see Default Studies Properties and Default Studies
Inputs.
5. Double-click the selected study or click OK.
How? 168
To open the Format Objects window, right-click on an empty area of the chart and then click Format
Signals.
The Format Objects window can also be opened by one of the following methods:
- Select Format in the main menu and click Signal; or:
- Double-click any one of the signal's labels on the chart; or:
- Position the mouse pointer over any one of the signal's labels on the chart; once the Pointer
changes into a Hand, right-click the label and then click Format Signals
2. Select the tab corresponding to the type of study to be removed.
3. Select the study to be removed and click the Remove button. Studies can also be removed by one of the
following methods:
- Position the mouse pointer over the study that is to be removed; once the Pointer changes into a Hand
- Position the mouse pointer over the study that is to be removed; once the Pointer changes into a Hand
, click on the study and then press the Delete key on the keyboard.
To remove all studies, inserted into a Chart Window, right-click on an empty area of the chart and then click Remove All
Studies.
Inserted Indicators List 168
A list of all indicators, inserted into a Chart Window, can be viewed under the Indicators tab in the Format Objects
window:
1. Open the Format Objects window.
How? 168
To open the Format Objects window, right-click on an empty area of the chart and then click Format
Signals.
The Format Objects window can also be opened by one of the following methods:
- Select Format in the main menu and click Signal; or:
- Double-click any one of the signal's labels on the chart; or:
- Position the mouse pointer over any one of the signal's labels on the chart; once the Pointer
changes into a Hand, right-click the label and then click Format Signals
2. Select the Indicators tab.
The indicators list can be sorted by any column, in ascending or descending order, by clicking on the column
header. The columns display the following information:
Name – name of the indicator
Input String – input parameters of the indicator; to learn more see Default Studies Inputs and Setting Studies
Inputs
Status – current status of the indicator: on – the indicator is turned on, or off – the indicator is turned off
SubChart – the SubChart, in which the indicator is plotted
Base Data # – the data series, to which the indicator is applied
A list of all signals, inserted into a Chart Window, can be viewed under the Signals tab in the Format Objects window:
1. Open the Format Objects window.
How? 168
To open the Format Objects window, right-click on an empty area of the chart and then click Format
Signals.
The Format Objects window can also be opened by one of the following methods:
- Select Format in the main menu and click Signal; or:
- Double-click any one of the signal's labels on the chart; or:
- Position the mouse pointer over any one of the signal's labels on the chart; once the Pointer
changes into a Hand, right-click the label and then click Format Signals
2. Select the Signals tab.
The signals list can be sorted by any column, in ascending or descending order, by clicking on the column
header. The columns display the following information:
Name – name of the signal
Input String – input parameters of the signal; to learn more see Default Studies Inputs and Setting Studies
Inputs
Status – current status of the signal: on – the signal is turned on, or off – the signal is turned off
An indicator in one SubChart can be moved to another existing or a new SubChart within the same Chart Window. Each
SubChart can contain a number of objects. To learn more see Using SubCharts. The indicator’s Base Data # will not be
affected by moving the indicator to another SubChart.
A signal can only be applied to the SubChart containing the data series with the Data# 1, and can not be moved to another
SubChart.
Moving Indicator to Existing SubChart 168
How? 168
To open the Format Indicator window, position the mouse pointer over the indicator; double-click once
- Position the mouse pointer over an indicator; once the Pointer changes into a Hand ,
right-click and then click Format ‘Indicator Name’; or:
- Open the Format Objects window; in the Indicators tab, select an indicator and click the Format
button. See Opening Format Objects Window.
Note: The Format Indicator window for the indicator being inserted will open automatically if the
Format check box in the Insert Study window is checked.
2. Select the Properties tab.
3. In the SubChart section, in the SubChart scrolling list box, select the SubChart# you want to move the
indicator to.
An indicator can also be moved by the following method:
- Position the mouse pointer over the over the indicator or the Status Line of the indicator to be moved; once
the Pointer changes into a Hand , hold the left mouse button and drag the indicator to another
SubChart. Release the mouse button to complete moving the indicator.
How? 168
To open the Format Indicator window, position the mouse pointer over the indicator; double-click once
The Format Indicator window can also be opened by one of the following methods:
- Position the mouse pointer over an indicator; once the Pointer changes into a Hand ,
right-click and then click Format ‘Indicator Name’; or:
- Open the Format Objects window; in the Indicators tab, select an indicator and click the Format
button. See Opening Format Objects Window.
Note: The Format Indicator window for the indicator being inserted will open automatically if the
Format check box in the Insert Study window is checked.
2. Select the Properties tab.
3. In the SubChart section, in the SubChart scrolling list box, select the Show On Top or Show On Bottom to
move the indicator to a new SubChart at the top or at the bottom of the Chart Window, respectively.
An indicator can also be moved by the following method:
- Position the mouse pointer over the indicator or the Status Line of the indicator to be moved; once the Pointer
changes into a Hand , hold the left mouse button and drag the pointer to the upper or lower border
of the Chart Window, or of another SubChart. Once the pointer changes into the Create New SubChart
symbol, release the mouse button to create a new SubChart.
In some instances displaying an indicator may not be necessary. Hidden indicators retain their full functionality and continue
running. Please note that a signal can not be hidden.
An indicator can be hidden using the Format Indicator window:
1. Open the Format Indicator window.
How? 168
To open the Format Indicator window, position the mouse pointer over the indicator; double-click once
- Position the mouse pointer over an indicator; once the Pointer changes into a Hand ,
right-click and then click Format ‘Indicator Name’; or:
- Open the Format Objects window; in the Indicators tab, select an indicator and click the Format
button. See Opening Format Objects Window.
Note: The Format Indicator window for the indicator being inserted will open automatically if the
Format check box in the Insert Study window is checked.
2. Select the Properties tab.
3. In the SubChart section, in the SubChart scrolling list box, select the Hide.
An indicator can also be hidden by one of the following methods:
How? 168
To open the Format Objects window, right-click on an empty area of the chart and then click Format
Signals.
The Format Objects window can also be opened by one of the following methods:
- Select Format in the main menu and click Signal; or:
- Double-click any one of the signal's labels on the chart; or:
- Position the mouse pointer over any one of the signal's labels on the chart; once the Pointer
changes into a Hand, right-click the label and then click Format Signals
2. Select the Indicators tab.
3. Select the indicator to be redisplayed and click the Format button to display the Format Indicator window.
4. Select the Properties tab.
5. In the SubChart section, in the SubChart scrolling list box, select Show On Top, Show On Bottom, or
SubChart #n, to redisplay the indicator in a new SubChart at the top, a new SubChart at the bottom, or in an
existing SubChart, respectively.
Studies may be turned off or on. A study that is turned off will stop running and become hidden. When the study is turned
back on, it will resume running and re-appear in the original SubChart.
An indicator, based on a data series that has been deleted, will be turned off, and can only be turned back on after it has
been reassigned to another, existing data series. To learn more see Setting Base Data Series.
A study can be turned off or on from the Format Objects window:
1. Open the Format Objects window.
How? 168
To open the Format Objects window, right-click on an empty area of the chart and then click Format
Signals.
The Format Objects window can also be opened by one of the following methods:
- Select Format in the main menu and click Signal; or:
- Double-click any one of the signal's labels on the chart; or:
- Position the mouse pointer over any one of the signal's labels on the chart; once the Pointer
changes into a Hand, right-click the label and then click Format Signals
2. Select the tab corresponding to the type of study you want to turn off or on.
3. Select the study that you want to turn off or on, and click the Status button.
4. The study's status, displayed in the Status column of the Format Objects window, will change.
The Visual Order in which the indicators are displayed can be changed. When a number of objects are displayed in a
single SubChart, the objects are displayed in "layers" – one object is in the "front", the next is "behind" it, and so on.
The order of the layers constitutes the Visual Order of the objects. The Visual Order can be changed to prevent a thick line
in the "front" layer from obscuring a thin line in the "back" layer.
The Visual Order can be changed by one of the following methods:
Right-click on the chart area and then click Visual Order; in the Visual Order window that appears, select an object and use
the order buttons to change its visual order; or:
Position the mouse pointer over an object; once the Pointer changes into a Hand , right-click, then point to
Visual Order and use the shortcut menu order commands to change the visual order of the object.
Visual Order commands/buttons:
Bring to Front – the object will be placed in the front of all other objects
Send to Back – the object will be placed behind all other objects
Bring Forward – the object will be moved one layer to the front
Send Backward – the object will be moved one layer back
Indicator Settings
An Indicator is a visual technical analysis tool, used to analyze market conditions and identify and forecast trends and market
patterns. An indicator is a visualization of a mathematical formula, and consists of one or more Plots – lines, histograms, series
of points or crosses, highs and lows, left and right ticks, or a combination of the above. Indicators are computed using the
price, volume, and (occasionally) open interest data.
Each indicator, applied to a chart, is set individually and has its own Format Indicator window. Indicator Title is displayed in the
title bar of the Format Indicator window. Multiple instances of the same indicator can be applied to the same chart; each
instance will have its own Format Indicator window, allowing different settings to be used for each of the instances.
Basic adjustments to the indicator's logic can be made by changing the Input Values. Indicator Style, Maximum Bars Back
value, and Base Data Series can be set, and the recalculation frequency selected.
Setting Input Values 173
An Input is a constant used in the indicator calculations. Indicators can have one or more inputs, or none at all. Each input
is assigned a name. There are three types of inputs: Numeric, True/False, and String. Indicators can be modified by
changing the input Values.
One of the main advantages of using the inputs is that basic adjustments to the study's logic can be made be simply
changing the input values, without the need to edit the studies' actual code.
Most, but not all, indicators use input values; to learn more see Default Studies Inputs.
The inputs can be modified before as well as after the indicator has been inserted.
Indicator Inputs can be set from the Format Indicator window:
1. Open the Format Indicator window.
To open the Format Indicator window, position the mouse pointer over the indicator; double-click once
- Position the mouse pointer over an indicator; once the Pointer changes into a Hand ,
right-click and then click Format 'Indicator Name'; or:
- Open the Format Objects window; in the Indicators tab, select an indicator and click the Format
button. See Opening Format Objects Window.
Note: The Format Indicator window for the indicator being inserted will open automatically if the
Format check box in the Insert Study window is checked.
2. Select the General tab.
3. In the Inputs section, in the Value column, click on the value of the input that you want to change and enter the
desired value.
Tip: To use these general settings as the default for the selected indicator, check Use as Default check box.
Setting Style 173
The Type, Color, Style, and Weight of the indicator's plot can be customized; if an indicator consists of multiple plots, each
plot can be set individually.
Changes to indicator style settings will be applied to the Chart Window in real time.
Indicator style can be set from the Format Indicator window:
1. Open the Format Indicator window.
To open the Format Indicator window, position the mouse pointer over the indicator; double-click once
- Position the mouse pointer over an indicator; once the Pointer changes into a Hand ,
right-click and then click Format 'Indicator Name'; or:
- Open the Format Objects window; in the Indicators tab, select an indicator and click the Format
button. See Opening Format Objects Window.
Note: The Format Indicator window for the indicator being inserted will open automatically if the
Format check box in the Insert Study window is checked.
2. Select the General tab.
3. In the Style section, in the Type column, select the plot type from the drop-down list box.
4. In the Color column select the plot color from the drop-down palette box.
5. In the Style column select the plot style from the drop-down list box.
6. In the Weight column select the plot weight from the drop-down list box; the weight can only be selected for the
solid line style.
Tip: To use these general settings as the default for the selected indicator, check Use as Default check box.
Setting Maximum Bars Back 173
All indicators based on past data use a certain number of bars for their calculations. The number of bars is called
Maximum number of bars a study will reference, or Maximum Bars Back. You can elect to set this value manually, or
to have it set automatically (Auto-Detect).
Automatic detection of the Maximum Bars Back value can be chosen from the Format Indicator window:
1. Open the Format Indicator window.
How? 173
To open the Format Indicator window, position the mouse pointer over the indicator; double-
- Position the mouse pointer over an indicator; once the Pointer changes into a Hand
Please note that in order for the indicator to be displayed, the number of bars in the data series on which the
indicator is based must be greater than the indicator's Maximum Bars Back setting.
Maximum Bars Back value can be set manually from the Format Indicator window:
1. Open the Format Indicator window.
How? 173
To open the Format Indicator window, position the mouse pointer over the indicator; double-
- Position the mouse pointer over an indicator; once the Pointer changes into a Hand
An indicator can be based on any one of the data series in a multi-symbol chart. When applied to a multi-symbol chart, an
indicator is based on the data series with the Data # 1 by default.
Indicator's base data series is selected from the Format Indicator window:
1. Open the Format Indicator window.
To open the Format Indicator window, position the mouse pointer over the indicator; double-click once
- Position the mouse pointer over an indicator; once the Pointer changes into a Hand ,
right-click and then click Format 'Indicator Name'; or:
- Open the Format Objects window; in the Indicators tab, select an indicator and click the Format
button. See Opening Format Objects Window.
Note: The Format Indicator window for the indicator being inserted will open automatically if the
Format check box in the Insert Study window is checked.
2. Select the Properties tab.
3. In the Base Study On section, select the data series that the indicator is to be based on from the drop-down list
box.
An indicator can be placed into a new or an existing SubChart in a chart window. To learn more, see SubCharts.
The SubChart to place the indicator into can be selected from the Format Indicator window:
1. Open the Format Indicator window.
To open the Format Indicator window, position the mouse pointer over the indicator; double-click once
- Position the mouse pointer over an indicator; once the Pointer changes into a Hand ,
right-click and then click Format 'Indicator Name'; or:
- Open the Format Objects window; in the Indicators tab, select an indicator and click the Format
button. See Opening Format Objects Window.
Note: The Format Indicator window for the indicator being inserted will open automatically if the
Format check box in the Insert Study window is checked.
2. Select the Properties tab.
3. In the SubChart section, in the scrolling list box, select Show On Top or Show On Bottom to place the
indicator into a new SubChart at the top or at the bottom of the Chart Window, respectively, or select a
SubChart# to place the indicator into an existing SubChart.
You can elect whether to recalculate an indicator every time a new tick is received, or only at the close of each bar. One or
the other may be more appropriate, depending on the indicator's algorithm. Update on Every Tick option is enabled by
default. Updating a large number of complex indicators on every tick will require substantial system resources.
Indicator's update rate is set from the Format Indicator window:
1. Open the Format Indicator window.
To open the Format Indicator window, position the mouse pointer over the indicator; double-click once
- Position the mouse pointer over an indicator; once the Pointer changes into a Hand ,
right-click and then click Format 'Indicator Name'; or:
- Open the Format Objects window; in the Indicators tab, select an indicator and click the Format
button. See Opening Format Objects Window.
Note: The Format Indicator window for the indicator being inserted will open automatically if the
Format check box in the Insert Study window is checked.
2. Select the Properties tab.
3. Check Update on Every Tick check box to recalculate the indicator on every tick; uncheck the box to
recalculate the indicator on bar close only.
Tip: To use these general settings as the default for the selected indicator, check Use as Default check box.
Setting Last Price Marker 173
Last Price Marker is a special label displayed on the price scale that indicates the latest value of indicators' plots.
If an indicator (study) has multiple plots then the markers can be displayed for each plot.
The color of each marker is the same as of the corresponding plot.
To turn on/off Last Price Marker for an indicator (study):
1. Open the Format Indicator window.
To open the Format Indicator window, position the mouse pointer over the indicator; double-click once
- Position the mouse pointer over an indicator; once the Pointer changes into a Hand ,
right-click and then click Format 'Indicator Name'; or:
- Open the Format Objects window; in the Indicators tab, select an indicator and click the Format
button. See Opening Format Objects Window.
Note: The Format Indicator window for the indicator being inserted will open automatically if the
Format check box in the Insert Study window is checked.
2. Select the General tab.
3. In the Style section, select or deselect the Marker checkboxes.
Tip: To use these general settings as the default for the selected indicator, check Use as Default check box.
Tip: The Last Price Marker can also be used to control how a study is displayed in the Scanner.
For example, the RSI study contains three plots, each with its own marker checkbox.
To display the data for only one of the three plots in the Scanner:
The next time this study is added to the Scanner, only the plot that was checked will be displayed in the Scanner.
For more information about displaying indicators' plots in Scanner please see Displaying Studies with Two or More Plots 256
Signal Settings
Signal is a mechanical technical analysis tool, used to systematically specify market entry or exit points according to a set of
trading rules implemented in the signal's algorithm. The trade points are indicated on a chart by ticks and arrows.
Signals can be viewed as the basic building blocks of strategies. Strategies can easily be constructed by simply applying a set
of signals to a chart window, without the need to combine signal code manually.
Market entry or exit points, specified by the signals, can be used to send orders electronically directly to a broker, fully
automating the trading process. To learn more, see Automated Trade Execution.
Each signal applied to a chart is set individually, and has its own Format Signal window. Signal Title is displayed in the title
bar of the Format Signal window. Multiple instances of the same signal can be applied to the same chart; each instance will
have its own Format Signal window, allowing different settings to be used for each of the instances. Signal settings are specific
to the particular signal, while Strategy Properties settings affect all the signals applied to a chart. To learn more, see Strategy
Properties.
In a multi-symbol chart, signals can only be applied to the series with the Data #1. Signals' execution priority is assigned
according to the order in which they were applied, with signals that were added first having higher priority.
Market entry or exit (buy or sell) points, specified by a signal, are visually indicated on the chart by Arrows Çor Èand Ticks |
or }. Arrows identify the time, and ticks identify the price value of each trade point. Labels, located above the sell arrows and
below the buy arrows, display the signal’s name and the number of contracts traded at each trade point.
Basic adjustments to the signal’s logic can be made by simply changing the Input Values. Signal's Arrow, Tick, and Label
Style can be set.
Setting Input Values 178
An Input is a constant used in the signal’s calculations. Signals can have one or more inputs, or none at all. Each input is
assigned a name. There are three types of inputs: Numeric, True/False, and String. Signals can be modified by changing
the input Values.
Most, but not all, signals use input values; to learn more see Default Studies Inputs 320 .
One of the main advantages of using the inputs is that basic adjustments to the study's logic can be made be simply
changing the input values, without the need to edit the studies' actual code.
Inputs are also used for Trading Strategy Optimization.
The inputs can be modified before as well as after the signal has been inserted.
Signal's Inputs can be set from the Format Signal window:
1. Open the Format Signal window.
To open the Format Signal window, position the mouse pointer over one of the signal's Arrows, Ticks,
or Labels; double-click once the Pointer changes into a Hand ; in the Format Objects
window that appears, select a signal and click the Format button.
The Format Signal window can also be opened by one of the following methods:
- Position the mouse pointer over one of the signal's Arrows, Ticks, or Labels; once the Pointer
changes into a Hand , right-click and then click Format Signals; in the Format Objects window
that appears, select a signal and click the Format button; or:
- Open the Format Objects window; in the Signals tab, select a signal and click the Format button.
Note: The Format Signal window for the signal being inserted will open automatically if the Format
check box in the Insert Study window is checked.
2. Select the Inputs tab.
3. In the Value column, click on the value of the input that you want to change and enter the desired value.
Tip: To use these inputs settings as the default for the selected signal, check Use as Default check box.
The market entry or/and exit (buy or/and sell) points are visually indicated on the chart by Arrows Çor Èand Ticks | or }.
Arrows identify the time, and ticks identify the price values of each trade point. Two Labels, located above the sell arrows
and below the buy arrows, display the signal’s name and the number of contracts for each trade point.
Color, Style, and Size of arrows and ticks can be selected. Color of labels can be selected, or labels can be hidden.
The style of each of the elements for each type of an entry or an exit point can be set individually.
Changes to signal style settings will be applied to the Chart Window in real time.
Signal's style can be set from the Format Signal window:
1. Open the Format Signal window.
To open the Format Signal window, position the mouse pointer over one of the signal's Arrows, Ticks,
or Labels; double-click once the Pointer changes into a Hand ; in the Format Objects
window that appears, select a signal and click the Format button.
The Format Signal window can also be opened by one of the following methods:
- Position the mouse pointer over one of the signal's Arrows, Ticks, or Labels; once the Pointer
changes into a Hand , right-click and then click Format Signals; in the Format Objects window
that appears, select a signal and click the Format button; or:
- Open the Format Objects window; in the Signals tab, select a signal and click the Format button.
Note: The Format Signal window for the signal being inserted will open automatically if the Format
check box in the Insert Study window is checked.
2. Select the Entries or the Exits tab, for entry or exit points, respectively.
3. In each section, in the Color column, select a color for each of the components from the drop-down palette box.
4. In the Style column select the component style from the drop-down list box.
5. In the Size column select the component size from the drop-down list box; only the size of arrows and ticks can
be set.
Tip: To use these style settings as the default for the selected signal, check Use as Default check box.
Intra-Bar Order Generation 178
You can elect whether to allow the signal to generate orders within a bar, or only at the close of each bar.
A signal contains one or more Order Commands that generate entry or exit orders. A limit to the number of orders that can
be generated within a single bar by each order command or by all of the signal’s order commands can be set.
Intra-Bar Order Generation is set from the Format Signal window:
1. Open the Format Signal window.
To open the Format Signal window, position the mouse pointer over one of the signal's Arrows, Ticks,
or Labels; double-click once the Pointer changes into a Hand ; in the Format Objects
window that appears, select a signal and click the Format button.
The Format Signal window can also be opened by one of the following methods:
- Position the mouse pointer over one of the signal's Arrows, Ticks, or Labels; once the Pointer
changes into a Hand , right-click and then click Format Signals; in the Format Objects window
that appears, select a signal and click the Format button; or:
- Open the Format Objects window; in the Signals tab, select a signal and click the Format button.
Note: The Format Signal window for the signal being inserted will open automatically if the Format
check box in the Insert Study window is checked.
2. Select the Intra-Bar Order Generation tab.
3. Check Enable Intra-Bar Order Generation check box to allow the signal to generate orders within a bar;
uncheck the box to allow the signal to generate orders only at the close of each bar.
4. Select required mode:
· To limit each order command in this signal to one entry and one exit per bar, click Limit each order
command in this signal to one entry and one exit per bar radio button.
· To limit the signal to only one entry in total and only one exit in total per bar, click Limit this signal to one
entry and one exit per bar radio button.
· To allow the signal multiple entries and exits per bar, click Allow unlimited entries and exits per bar radio
button.
Note: Allowing multiple same-direction entry orders in the Position Limits section of Strategy Properties window
will not override the above settings.
Indicator Scaling
The Scale is located on the left or/and on the right side of the chart, and consists of a vertical line with marks, indicating values,
and identified by Labels. The values on the scale are specific to the indicator plotted on the chart. The scale represents the
value range, within which the indicator is plotted. To determine the value of a point on a chart, the vertical position of the point
is referenced to a value on the scale.
The Range of the scale and the top and bottom Margins can be set. The Labels, identifying scale's marks, can be customized.
A Linear or a Semi-Log (percent-of-change) type of scaling can be chosen.
Setting Scale Range 181
Four types of the Indicator Scale Range can be selected: Screen, Entire Series, User Defined, or Same as Symbol.
The range of the Screen scale is equal to the range of the plot segment that is actually visible in the Chart Window.
Scrolling the chart along the time axis, so that another plot segment, with a different range, becomes visible, will
cause the range of the Screen scale to be adjusted accordingly.
Scale range can be set from the Format Indicator window:
1. Open the Format Indicator window.
How? 181
To open the Format Indicator window, position the mouse pointer over the indicator; double-
- Position the mouse pointer over an indicator; once the Pointer changes into a Hand
The range of the Entire Series scale is equal to the range of the indicator’s entire plot, including any part of the plot
that extends beyond the segment actually visible in the Chart Window. Scrolling the chart along the time axis will not
cause the range of the Entire Series scale to be adjusted.
Scale range can be set from the Format Indicator window:
1. Open the Format Indicator window.
How? 181
To open the Format Indicator window, position the mouse pointer over the indicator; double-
- Position the mouse pointer over an indicator; once the Pointer changes into a Hand
- Open the Format Objects window; in the Indicators tab, select an indicator and click the
Format button. See Opening Format Objects Window.
Note: The Format Indicator window for the indicator being inserted will open automatically if
the Format check box in the Insert Study window is checked.
2. Select the Scaling tab.
3. In the Scale Range section, click the Entire Series radio button.
Note: Entire Series scale range can not be used as a default.
The range of the User Defined scale is set by the user. A part of the plot that falls outside of the defined range will
not be displayed in the Chart Window.
Scale range can be set from the Format Indicator window:
1. Open the Format Indicator window.
How? 181
To open the Format Indicator window, position the mouse pointer over the indicator; double-
- Position the mouse pointer over an indicator; once the Pointer changes into a Hand
Scale increments will be determined automatically. The maximum and minimum values may be rounded off.
Note: User Defined scale range can not be used as a default.
The range of the Same as Symbol scale is equal to the range of the base symbol's data series price scale. Format
Indicator window:
1. Open the Format Indicator window.
How? 181
To open the Format Indicator window, position the mouse pointer over the indicator; double-
- Position the mouse pointer over an indicator; once the Pointer changes into a Hand
Margins are the extra spaces between the visual representation of an indicator and the chart's upper and lower borders, and
are set as a percentage of the range of the plot's scale. Margins can not be set for a chart with a User Defined scale.
Margins are set from the Format Indicator window:
1. Open the Format Indicator window.
How? 181
To open the Format Indicator window, position the mouse pointer over the indicator; double-click once
- Position the mouse pointer over an indicator; once the Pointer changes into a Hand ,
right-click and then click Format 'Indicator Name'; or:
- Open the Format Objects window; in the Indicators tab, select an indicator and click the Format
button. See Opening Format Objects Window.
Note: The Format Indicator window for the indicator being inserted will open automatically if the
Format check box in the Insert Study window is checked.
2. Select the Scaling tab.
3. In Use Margins section, check the Use Margins check box to add margins; uncheck the box to not add
margins.
4. In the Top Margin text box enter the top margin as a percentage of the series price range.
5. In the Bottom Margin text box enter the bottom margin as a percentage of the series price range.
Tip: To use these scaling settings as the default for the selected indicator, check Use as Default check box.
Setting Scaling Type 181
To open the Format Indicator window, position the mouse pointer over the indicator; double-click once
- Position the mouse pointer over an indicator; once the Pointer changes into a Hand ,
right-click and then click Format 'Indicator Name'; or:
- Open the Format Objects window; in the Indicators tab, select an indicator and click the Format
button. See Opening Format Objects Window.
Note: The Format Indicator window for the indicator being inserted will open automatically if the
Format check box in the Insert Study window is checked.
Scale Labels are the numbers that appear next to the marks on the scale that indicate what value the marks represent.
If a chart contains multiple objects, the object, for which the label values are displayed, can be selected. The object is
selected separately for the right and for the left scales, making it possible to display different label values on the right than
on the left scale of the chart.
The numbers displayed on the labels can be abbreviated, and either the increment (step size) between the labels or the
total number of labels can be set.
The object, for which the label values on the scale are displayed, can be selected by right-clicking on the scale and
then clicking the #) Object Name, where # is the number, indicating the order in which the object has been added to
the chart.
The values of some indicators, for example volume, can be rather large, such as 25,000,000,000.
The numbers displayed on the labels can be abbreviated by dividing the values they represent by a set factor. For
example, a label for the value of 25,000,000,000, divided by a factor of 1,000,000,000, will read "25.00". Characters
can also be added to the end of the label, for example a "b", resulting in a label that reads "25.00 b" instead of the
"25,000,000,000".
You can elect to set the division factor automatically or manually.
The division factor with the corresponding characters is selected automatically. To change the characters, see
Dividing Label Values Manually. Automatic selection of the division factor can be chosen from the Format Indicator
window:
1. Open the Format Indicator window.
How? 181
To open the Format Indicator window, position the mouse pointer over the indicator; double-
- Position the mouse pointer over an indicator; once the Pointer changes into a Hand
The division factor can be set manually, and the corresponding characters assigned, from the Format Indicator
window:
1. Open the Format Indicator window.
How? 181
To open the Format Indicator window, position the mouse pointer over the indicator; double-
- Position the mouse pointer over an indicator; once the Pointer changes into a Hand
How? 181
To open the Format Indicator window, position the mouse pointer over the indicator; double-
- Position the mouse pointer over an indicator; once the Pointer changes into a Hand
In MultiCharts 3 label increment types are available for studies: Automatic, Fixed Step Size and Fixed number of Labels:
Automatic - displays axis labels with default settings;
Fixed step size - displays axis labels with fixed step between labels;
Fixed number of labels - displays limited numbers of axis labels.
Automatic 181
Increment between the labels is set from the Format Indicator window:
1. Open the Format Indicator window.
How? 181
To open the Format Indicator window, position the mouse pointer over the indicator; double-
- Position the mouse pointer over an indicator; once the Pointer changes into a Hand
Increment between the labels is set from the Format Indicator window:
1. Open the Format Indicator window.
How? 181
To open the Format Indicator window, position the mouse pointer over the indicator; double-
- Position the mouse pointer over an indicator; once the Pointer changes into a Hand
A fixed total number of labels can be set from the Format Indicator window:
1. Open the Format Indicator window.
How? 181
To open the Format Indicator window, position the mouse pointer over the indicator; double-
The Format Indicator window can also be opened by one of the following methods:
- Position the mouse pointer over an indicator; once the Pointer changes into a Hand
To open the Format Indicator window, position the mouse pointer over the indicator; double-click once
- Position the mouse pointer over an indicator; once the Pointer changes into a Hand ,
right-click and then click Format 'Indicator Name'; or:
- Open the Format Objects window; in the Indicators tab, select an indicator and click the Format
button. See Opening Format Objects Window.
Note: The Format Indicator window for the indicator being inserted will open automatically if the
Format check box in the Insert Study window is checked.
3. Select the Scaling tab.
4. In the Scaling Range section, select Same as Symbol.
5. Click OK.
4.8.5 Alerts
Alerts
Alert is a visual or/and audio notification triggered when the market conditions meet the criteria specified in the indicator. Audio
and visual alerts can be enabled simultaneously.
Alerts can only be used with the indicators containing Alert Triggering Conditions code. Most, but not all, indicators contain
alerts. To learn how to add alerts to indicators' code refer to the PowerLanguage manual.
A check for the alert triggering conditions is performed whenever one of the following events occurs:
- Workspace is opened
- Data series (symbol) is replaced with another data series (symbol)
- A bar is closed or a new tick is received
Enabling Alerts 188
To open the Format Indicator window, position the mouse pointer over the indicator; double-click once
- Position the mouse pointer over an indicator; once the Pointer changes into a Hand ,
right-click and then click Format 'Indicator Name'; or:
- Open the Format Objects window; in the Indicators tab, select an indicator and click the Format
button. See Opening Format Objects Window.
Note: The Format Indicator window for the indicator being inserted will open automatically if the
Format check box in the Insert Study window is checked.
2. Select the Alerts tab.
3. Check the Enable Alerts check box to enable alerts; uncheck the box to disable the alerts.
Tip: To use these alert settings as the default for all indicators, check Use as Default check box.
Alert Conditions Check 188
You can elect whether to check for Alert Triggering Conditions every time a new tick is received, or only at the close of each
bar.
Alert Conditions Check can be set from the Format Indicator window:
1. Open the Format Indicator window.
To open the Format Indicator window, position the mouse pointer over the indicator; double-click once
- Position the mouse pointer over an indicator; once the Pointer changes into a Hand ,
right-click and then click Format 'Indicator Name'; or:
- Open the Format Objects window; in the Indicators tab, select an indicator and click the Format
button. See Opening Format Objects Window.
Note: The Format Indicator window for the indicator being inserted will open automatically if the
Format check box in the Insert Study window is checked.
2. Select the Alerts tab.
3. In the Alert Conditions Check section click the On Bar Close or the Every Tick radio button, to select the
alert triggering conditions to be checked at the close of each bar only, or every time a new tick is received,
respectively.
Tip: To use these alert settings as the default for all indicators, check Use as Default check box.
Audio Alerts 188
A PC speaker beep or a sound file played by the PCs sound card can be set as the audio alert type.
How? 188
To open the Format Indicator window, position the mouse pointer over the indicator; double-
- Position the mouse pointer over an indicator; once the Pointer changes into a Hand
Tip: To use these alert settings as the default for all indicators, check Use as Default check box.
How? 188
To open the Format Indicator window, position the mouse pointer over the indicator; double-
- Position the mouse pointer over an indicator; once the Pointer changes into a Hand
button on the right side of the text box for Open dialog box, navigate to and select a sound file, and click
the Open button.
6. Click the Test button to test the alert.
7. Click the Play Once or the Repeat radio button, for the alerts to be played once or repeatedly,
respectively.
Tip: To use these alert settings as the default for all indicators, check Use as Default check box.
Visual Alert 188
To open the Format Indicator window, position the mouse pointer over the indicator; double-click once
- Position the mouse pointer over an indicator; once the Pointer changes into a Hand ,
right-click and then click Format 'Indicator Name'; or:
- Open the Format Objects window; in the Indicators tab, select an indicator and click the Format
button. See Opening Format Objects Window.
Note: The Format Indicator window for the indicator being inserted will open automatically if the
Format check box in the Insert Study window is checked.
2. Select the Alerts tab.
3. In the Visual Alert section, check the Visual Alert check box to enable visual alerts; uncheck the box to disable
the visual alerts.
4. In the Display Notify Window for drop-down list box select the length of time that the alert notification window
is to be displayed for.
Tip: To use these alert settings as the default for all indicators, check Use as Default check box.
E-mail Alert 188
E-mail alerts can be sent when market conditions meet your defined criteria. This feature can be used to stay informed
about market conditions while away from the computer.
To add alert to study:
1. Make sure the study's PowerLanguage code contains alert code so that alerts will be triggered.
2. Open the Format Indicator window.
To open the Format Indicator window, position the mouse pointer over the indicator; double-click once
- Position the mouse pointer over an indicator; once the Pointer changes into a Hand ,
right-click and then click Format 'Indicator Name'; or:
- Open the Format Objects window; in the Indicators tab, select an indicator and click the Format
button. See Opening Format Objects Window.
Note: The Format Indicator window for the indicator being inserted will open automatically if the
Format check box in the Insert Study window is checked.
3. Select the Alerts tab.
4. Check Enable Alerts checkbox to enable alerts.
5. Check the E-mail Alert checkbox.
6. Press the Settings button. The E-mail Alert window will appear.
7. Enter the email addresses of the sender.
8. Enter the email address of the recipient. To send the email to multiple recipients, separate each email address
with a semi-colon.
9. Enter the SMTP Server Name or IP address, and Port number into the textboxes. Please get this information
from your email provider.
10.Check the SMTP Server authentication data checkbox if your SMTP server requires authentication to send
emails. Enter the User name and Password.
11.Press the Test button to send a test email.
If the sending process has been successful a message will appear in the pop-up window:
If the sending process has been unsuccessful a message will appear in the pop-up window:
Study Templates
Studies can be assembled into sets to create study Templates. Once a template is created, an entire set of studies can be
applied to any chart, at any time, with just one click. It is possible to switch between different templates and to apply several
templates at once. Study templates can include indicators as well as signals.
Templates can be Created, Applied, Renamed, and Deleted, set to be Auto-Applied to all new charts, as well as Exported to or
Imported from a file.
Creating Templates 192
A Template is created by saving a set of studies applied to a chart; to learn more see Applying Studies.
A template is saved using the Format Study Templates window:
1. Open the Format Study Templates window.
How? 192
To open the Format Study Templates window, right-click on an empty area of the chart and then click
Format Study Templates.
The Format Study Templates window can also be opened by selecting Format in the main menu and
clicking Study Templates.
How? 192
To open the Format Study Templates window, right-click on an empty area of the chart and then click
Format Study Templates.
The Format Study Templates window can also be opened by selecting Format in the main menu and
clicking Study Templates.
How? 192
To open the Format Study Templates window, right-click on an empty area of the chart and then click
Format Study Templates.
The Format Study Templates window can also be opened by selecting Format in the main menu and
clicking Study Templates.
How? 192
To open the Format Study Templates window, right-click on an empty area of the chart and then click
Format Study Templates.
The Format Study Templates window can also be opened by selecting Format in the main menu and
clicking Study Templates.
One or more templates can be set to be automatically applied to all new charts.
Auto-Apply is set from the Format Study Templates window:
1. Open the Format Study Templates window.
How? 192
To open the Format Study Templates window, right-click on an empty area of the chart and then click
Format Study Templates.
The Format Study Templates window can also be opened by selecting Format in the main menu and
clicking Study Templates.
2. Check the check box next to the name of each template to be automatically applied.
3. Click the Close button; checked templates will be automatically applied to all new charts.
A template can be exported to a file with a .tml extension by using the Format Study Templates window:
1. Open the Format Study Templates window.
How? 192
To open the Format Study Templates window, right-click on an empty area of the chart and then click
Format Study Templates.
The Format Study Templates window can also be opened by selecting Format in the main menu and
clicking Study Templates.
A template can be imported from a file by using the Format Study Templates window:
1. Open the Format Study Templates window.
How? 192
To open the Format Study Templates window, right-click on an empty area of the chart and then click
Format Study Templates.
The Format Study Templates window can also be opened by selecting Format in the main menu and
clicking Study Templates.
Volume Profile
To open the Format Indicator window, position the mouse pointer over the indicator; double-click once the
- Position the mouse pointer over an indicator; once the Pointer changes into a Hand , right-click
and then click Format 'Indicator Name'; or:
- Open the Format Objects window; in the Indicators tab, select an indicator and click the Format button.
See Opening Format Objects Window.
Note: The Format Indicator window for the indicator being inserted will open automatically if the Format
check box in the Insert Study window is checked.
2. Select the Volume Profile tab.
3. Select the Data Type drop-down box. Choose the study.
4. In the Data Range section,
· Select Last Session to base the time period of the volume profile on the last session, or
· Select Screen to base the time period of the volume profile on the data shown on the screen, or
· Select Entire Series to base the time period of the volume profile on the entire data series, or
· Select Back to base the time period of the volume profile on the specified number of periods.
To open the Format Window window, click the Format Window icon on the Chart Analysis toolbar.
The Format Window window can also be opened by one of the following methods:
- Double-click on an empty area of the chart, or on the chart's Status Line; or:
- Right-click on an empty area of the chart and then click Format Window; or:
- Select Format in the main menu and click Window.
8. Select the Volume Profile tab.
9. In the Settings section, select the Left checkbox to display the volume profile on the left side of the chart. Select
the Right checkbox to display the volume profile on the right side of the chart. Enter the width of the display after
selecting either the left or right side.
10.In the Style section, select the color of the volume profile.
11.Select OK.
Understanding Strategies
A strategy is a set of signals, applied to a chart. Signals systematically specify market entry or exit points according to a set of
trading rules implemented in the signals' algorithms, and can be viewed as the basic building blocks of strategies.
While signals can be based on the same formulas as indicators, signal calculations are substantially more complex and take in
to account a far greater number of factors, such as trading costs, order generation priorities, and strategy performance
measurements, that affect market entry and exit conditions. Signal algorithms utilize price action models and make use of
backtesting concepts. Signal logic can make assumptions about price movement within bars that allow appropriate market
entry and exit points to be determined when intra-bar data is not available. Signals compile strategy performance data and
support backtesting and Automated Trade Execution.
Over 100 pre-built, customizable signals, covering the most popular trading concepts, are already included with the platform,
and additional signals can be imported from a variety of sources.
Signals can be fully customized, or entirely new signals created, using PowerLanguage® scripting in PowerLanguage Editor.
Strategies are constructed by simply applying a set of signals to a chart window, without the need to combine signal code
manually.
To learn about applying signals to a chart, see Using Studies 168
Market entry or exit points, specified by the signals, can be used to send orders electronically directly to the broker, fully
automating the trading process.
To learn more, see Automated Trade Execution
Strategy Properties 196 , separate from the individual signals’ settings, regulate the actions of a group of signals as a whole.
An essential part of developing a trading strategy is Strategy Backtesting. To learn more about backtesting, see Backtesting
199
Strategy Properties
Strategy properties are separate from the individual signals' settings, affect all the signals applied to a chart, and regulate the
actions of a group of signals as a whole.
Strategy properties include Costs/Capitalization, Maximum bars back, Position limits, and Trade size sections.
Setting Costs/Capitalization 196
Cost/Capitalization section includes Commission, Slippage, and Initial Capital and Interest Rate settings.
Strategy properties are set from the Properties tab of the Strategy Properties window:
1. Open the Strategy Properties window.
To open the Format Objects window, right-click on an empty area of the chart and
then click Format Signals.
The Format Objects window can also be opened by selecting Format in the main
menu and clicking Signal.
1.7.In the Init Capital box, enter the Initial Capital, and in the Interest Rate box, enter the interest rate to be
used in the performance ratio calculations.
All signals based on past data use a certain number of bars for their calculations. The number of bars is
called Maximum number of bars a study will reference, or Maximum Bars Back.
Maximum Bars Back value is set from the Properties tab of the Strategy Properties window:
1.8.Open the Strategy Properties window.
Position limits section allows setting the maximum number same-direction entry orders and
maximum number of shares/contracts per position.
Strategy properties are set from the Properties tab of the Strategy Properties window:
· Open the Strategy Properties window.
· To prevent multiple same-direction entry orders, clear the Allow up to N entry orders in the same
direction as the currently held position checkbox.
1.8..6.In the Maximum shares/contracts per position box, enter the maximum position limit.
Trade size settings set the size of each trade, either by the number shares/
contracts or by currency value.
Trade size settings select the number shares/contracts or the currency value
per each trade.
Please note that these settings are ignored if trade size is specified by the
signal.
Trade size settings are set from the Properties tab of the Strategy
Properties window:
1.8..7.Open the Strategy Properties window.
4.9.2 Backtesting
4.9.2.1 Understanding Backtesting
Understanding Backtesting
A strategy is a set of Signals 178 applied to a chart. Each Signal 178 is a mechanical technical analysis tool, used to
systematically specify market entry or exit points according to a set of trading rules implemented in the signal’s algorithm.
Note: A strategy has separate Properties 196 , separate from signals' settings.
Once a strategy is applied to a chart, the backtesting process starts. During the backtesting process, the strategy places trades
where they would have occurred the past, according to the set of rules applied. The trades are placed throughout the entire
available period of historical data. If strategy is applied to real-time chart, the strategy continues to place new trades as the
real-time data is received.
A Performance Report 201 can be generated, based on the trades placed by the strategy and containing statistics and
performance measurements.
Note: New trades, placed by the strategy after the performance report has already been generated, will not be added to
the performance report in real time. To incorporate the new trades into the performance report should be
generated again.
Understanding Report-Chart Synchronization 199
MultiCharts allows the user to visually match the trades from a Strategy Performance Report with their signals on the chart.
For strategies that have hundreds of trades over a long data series, it may be cumbersome to manually match a trade in
the Strategy Performance Report to the chart.
The user would have to use the scroll button to find the trade in the data series. Report-Chart Synchronization simplifies this
process. Trades on the chart are automatically highlighted when the user hovers his mouse over a trade in the Strategy
Performance Report.
To learn more about this feature, see Setting Display Properties 201
In some cases it may be possible that both the entry and the exit orders will be executed based on the same bar.
For a detailed description see Order Execution Priority 308
Strategy Backtesting on historical data often requires making assumptions about price movement within bars.
In real-time trading, a strategy will monitor and respond to a data feed on tick-by-tick basis. However, the historical data
available for backtesting will, in most cases, be in the form of bars based on a group of ticks, with only Open, High, Low, and
Close prices available.
While it is not possible from these four values to infer the actual price movement within each bar, the Backtesting Engine
improves the backtesting accuracy by incorporating intra-bar price movement assumption logic:
1. An order could be executed at every valid price level throughout the entire range of the bar.
2. If the opening price is closer to the high of the bar than to the low, the intra-bar price movement is assumed to be
in the order of Open-High-Low-Close.
3. If the opening price is closer to the low of the bar than to the high, or if the opening price is exactly in between the
high and the low of the bar, the intra-bar price movement is assumed to be in the order of Open-Low-High-Close.
The first assumption implies that a Stop or a Limit order will execute at the Stop or the Limit price.
The second and third assumptions are significant when there are multiple orders active at the same time. If both a Stop Loss
and a Profit Target prices are reached within the same bar, the order of price movement within the bar will determine which one
of these orders will be executed.
For example, with a Stop Loss at 1340 and a Profit Target at 1360:
· In a bar with an Open of 1355, a High of 1360, a Low of 1340, and a Close of 1345, the Profit Target will be assumed to
have executed first (Assumption 2).
· In a bar with an Open of 1345, a High of 1360, a Low of 1340, and a Close of 1355, the Stop Loss will be assumed to have
executed first (Assumption 3).
Basing on the trades placed in the chart the performance report can be calculated to comprehensively analyze the strategy
performance measures as well as trades list and statistics. There over 100 performance indices are available for analysis
including about 30 charts.
Attention: The new trades occurred are not being included in the performance report in realtime. To include the new trades
occurred the performance report should be re-opened again.
Attention: In case signals were added or deleted the performance report should be re-opened again.
Note: Only one performance report can be opened at a time.
Accessing Performance Report 201
In MultiCharts the Performance Report features a tri-panel design. Left panel is a navigation structure while the upper right
one displays performance data.
Tip: Upon left-clicking on any performance index its description will appear in the lower right panel.
3. In the lower right panel a text description will appear. Click Close button to close the description
panel.
4. Use Back and Forward toolbar buttons to move between the Performance Report sections.
2. Click Zoom In or Zoom Out toolbar buttons for zooming charts in an out respectively. Click
3. Use Pan or Cross cursor modes for moving charts or precise reviewing chart values
respectively.
4. Use Back and Forward toolbar buttons to move between the Performance Report sections.
MultiCharts allows the user to visually match the trades from a Strategy Performance Report with their signals on the chart.
For strategies that have hundreds of trades over a long data series, it may be cumbersome to manually match a trade in
the Strategy Performance Report to the chart.
The user would have to use the scroll button to find the trade in the data series. Report-Chart Synchronization simplifies this
process. Trades on the chart are automatically highlighted when the user hovers his mouse over a trade in the Strategy
Performance Report.
To learn more about this feature, see Setting Display Properties 201
It is possible in MultiCharts to set financial and display settings for the Performance Report.
Financial settings allow to better analyze the strategy performance with different costs, statistic and risk level settings.
Display settings allow to configure visual setting for the report. It is possible to display the report figures in dollars or in a
regional currency, set number of decimals to use and smoothing for charts. It is also posiible to display trades with partial
exits basing on entries or on exits.
4. Click OK.
1. In the Strategy Performance Report window, click the Settings toolbar button.
2. Select the Display tab.
3. Select USD to display the report in U.S. dollars or select Regional Currency to display the report in
another currency. If Regional Currency is selected, enter the exchange rate in the USD/$ rate textbox.
4. Set No. of digits after decimal to the required precision level.
5. In the Performance & Quality section, select the appropriate smoothing.
6. Select the Enable Strategy Performance Report – Chart Synchronization check box to visually match
the trades in the performance report to the signals in the chart. Two additional options become available
if this checkbox is selected:
· Select the Entry-based radio button to match the trade in the performance report to its entry signal in
the chart.
· Select the Exit-based radio button to match the trade in the performance report to its exit signal in the
chart.
7. Select Recalculate the Report on each new order checkbox to update the Strategy Performance
Report in real-time with each new trade. If a new trade is made while the Strategy Performance Report is
open, the Strategy Performance Report will be updated immediately with the new trade.
If this checkbox is unchecked, then the Strategy Performance Report will be updated with the new trade
only after closing and reopening the Strategy Performance Report.
8. Click OK.
4. In the Type field select the file type. There are 2 types available: *.XLS (MS Excel) and *.XML (XML RINA).
5. Click Save.
Attention: To save data in an .XLS format a full version of Microsoft Excel must be installed on the computer. Once saved
the .XLS file may be read by any Excel compatible application.
Note: In the *.XLS file the entire report will be saved (including charts).
Printing Performance Report 201
or
1. In the left panel of the Strategy Performance Report select a section or a chart to be printed.
2. Click Print Preview toolbar button. The Print Preview dialog will appear.
3. Use Magnify Mode or Whole Page toolbar buttons to preview the page.
Bar Magnifier
The Bar Magnifier backtest feature is important for precise backtesting. Bar magnifier can be considered as a replay of the way
a bar was formed. The user can choose a replay frequency that is based on number of ticks or number of minutes.
There is a tradeoff between the level of precision in a replay and memory requirements. Tick-by-tick replay is the most precise,
but it also requires the most memory. If the strategy does not require high precision, then replays based on n-ticks or n-minutes
may be sufficient.
For example, Bar Magnifier is helpful when both the profit target and stop loss occurred on the same bar. In this situation, it is
unclear whether the profit target or the stop loss occurred first. With Bar Magnifier, MultiCharts is able to see how the bar was
formed to determine whether the profit target or the stop loss occurred first.
We suggest to use tick because most precise
To use the feature:
1. Open the Strategy Properties window.
How? 204
How? 204
To open the Format Objects window, right-click on an empty area of the chart and then
click Format Signals.
The Format Objects window can also be opened by one of the following methods:
- Select Format in the main menu and click Signal; or:
- Double-click any one of the signal's labels on the chart; or:
- Position the mouse pointer over any one of the signal's labels on the chart; once the
Pointer changes into a Hand, right-click the label and then click Format Signals
1.2.Select the Signals tab.
1.3.Click Properties button to open the Strategy Properties window.
3.2.Select the Intra-day radio button if the chart has minute resolution or daily resolution. Enter the number of
minutes for the lower resolution bars. The number of minutes must be at a lower resolution than the resolution of
the chart.
or
3.3.Select the Daily radio button if the chart has weekly resolution or higher. MultiCharts will break down each bar
into daily bars to see how the bar was formed.
4. Select the Skip ticks with identical prices checkbox for faster backtesting. MultiCharts will skip ticks with
identical prices when it constructs the lower resolution bars.
Note: If a strategy is based volume, then selecting this box may disrupt the volume calculations.
Order Linking
Strategy signals are visually shown on the chart using arrows. If a strategy uses several different entry signals, then it can be
difficult to see clearly which entry signal was exited.
Order Linking draws a line from the entry signal to the exit signal so that it is possible to visually match an entry signal with its
exit signal. Order linking also makes it clear which trades are profitable or not profitable on the chart.
The lines are color coded. The default colors for the lines are as follows:
Green: profitable trade
Red: unprofitable trade
To change the settings:
1. Open the Format Signal window.
How? 205
To open the Format Signal window, position the mouse pointer over one of the signal's Arrows, Ticks, or
Labels; double-click once the Pointer changes into a Hand ; in the Format Objects window that
appears, select a signal and click the Format button.
The Format Signal window can also be opened by one of the following methods:
- Position the mouse pointer over one of the signal's Arrows, Ticks, or Labels; once the Pointer changes
into a Hand , right-click and then click Format Signals; in the Format Objects window that appears,
select a signal and click the Format button; or:
- Open the Format Objects window; in the Signals tab, select a signal and click the Format button.
Note: The Format Signal window for the signal being inserted will open automatically if the Format check box
in the Insert Study window is checked.
2. Select the Signal tab.
3. Select the strategy and select the Format button. A window to format the strategy will appear.
4. Select the Connecting Line tab.
5. Check the Show Connecting Line checkbox to show the connecting lines.
6. In the drop-down lists, select the setting for the Line Style, Line Weight, Profitable Line Color, and Unprofitable
Line Color.
7. Select the OK button.
Depending on the strategy, Precise Strategy Back Testing can give the user a more realistic emulation during back testing. To
back test high frequency strategies like statistical arbitrage, the user may need take into account the historical bid/ask data in
addition to the historical trade data.
With Precise Back Testing, the user can load the historical bid data series and the historical ask data series into MultiCharts.
MultiCharts will use the ask data series to fill buy market orders and buy stop orders. Similarly, MultiCharts will use the bid data
series to fill sell market orders and sell stop orders.
Consider a situation where a market order to buy 1 contract and a market order to sell 1 contract are submitted at the same
time at the close of a bar. If the user only uses the trade data series, then there is only one price for the close. The back test
will show that these two orders were filled at the same price, and the profit/loss is zero. In reality, there’s a bid/ask spread. If
the price quote doesn’t move suddenly, then these two orders will undoubtedly generate an instantaneous loss due to the bid/
ask spread. That’s why it’s more precise to back test with a bid data series and an ask data series.
Consider another situation where the trade price doesn’t occur on either the bid or the ask. Due to liquidity or other reasons,
the historical data series may show that the trade price was either in between or outside the bid/ask. In this situation, the user
may want to be conservative and assume fills at the bid/ask instead of at the trade price.
Consider a third situation where there is sufficient liquidity and the trades do occur on the bid/ask. The strategy uses 10 minute
bars. The strategy buys 1 contract at 10:00am and exits the position at 11:00am. The PowerLanguage code for such a strategy
is as follows:
If Time=1000 Then Buy 1 Contract This Bar on Close;
If Time=1100 Then Sell 1 Contract This Bar on Close;
If this strategy was back tested on simply a data series of historical trade prices, then the back test will assume that the trades
were filled at the close prices of the bars. However, it’s unclear whether the trades would have been filled at the close prices,
because the close prices could have been on either the bid or the ask.
If the close price was an ask price and the strategy was buying, then the fill price was realistic. However, if the close price was
a bid price and the strategy was buying, then the fill price was unrealistic.
If the close price was a bid price and the strategy was selling, then the fill price was realistic. However, if the close price was an
ask price and the strategy was selling, then the fill price was unrealistic.
With Precise Back Testing, users can load two separate data series onto the chart. The first data series is for historical bid
prices. The second data series is for historical ask prices. MultiCharts will use these two data series to determine realistic fill
prices. The bar’s close will have a bid and an ask price associated with it. MultiCharts will use the ask price to fill a market buy
order and the bid price to fill a market sell order.
To open the Format Window window, click the Format Window icon on the Chart
Analysis toolbar.
The Format Window window can also be opened by one of the following methods:
- Double-click on an empty area of the chart, or on the chart's Status Line; or:
- Right-click on an empty area of the chart and then click Format Window; or:
- Select Format in the main menu and click Window.
3.2.Select the Settings tab.
3.3.In the Quote Field drop-down list, select Ask.
3.4.Select OK.
4. Add the same symbol into the same chart window. The chart window now has two charts.
5. Designate this chart (the second chart) as the Bid data series.
5.1.Open the Format Window window:
How? 207
To open the Format Window window, click the Format Window icon on the Chart
Analysis toolbar.
The Format Window window can also be opened by one of the following methods:
- Double-click on an empty area of the chart, or on the chart's Status Line; or:
- Right-click on an empty area of the chart and then click Format Window; or:
- Select Format in the main menu and click Window.
5.2.Select the Settings tab.
5.3.In the Quote Field drop-down list, select Bid.
5.4.Select OK.
6. Apply the strategy to the Ask data series, which is the first chart. It does not matter if the strategy is applied to the
Ask data series or the Bid data series. It only matters that the strategy is applied to the first chart.
6.1.Open the Strategy Properties window:
How? 207
To open the Format Objects window, right-click on an empty area of the chart
and then click Format Signals.
The Format Objects window can also be opened by one of the following
methods:
- Select Format in the main menu and click Signal; or:
once the Pointer changes into a Hand, right-click the label and then
click Format Signals
6.1.2.Select the Signals tab.
6.1.3.Click Properties to open the Strategy Properties window.
4.9.3 Optimization
4.9.3.1 Understanding Optimization
Understanding Optimization
A strategy is created by implementing trading concepts, ideas, and observations of historical market behavior, into a trading
system. The very idea of a trading system implies a degree of optimization to market behavior.
The process of strategy optimization further enhances and automates this process. Strategy optimization is the search for the
set of optimum parameters for the defined criteria. By testing a range of signal input values, optimization aids in selecting the
values that correspond, based on historical data, to the best strategy performance. Optimization aids in better understanding of
strategy's characteristics and in creating new criteria for entries and exits.
Different traders use different criteria to define strategy performance. Some traders use the highest net profit, while other
traders use the lowest drawdown. MultiCharts lets the trader define his own criteria.
Optimization can have detrimental effects if the user searches for the combination of inputs based solely on the best
performance over a period of historical data and focuses to much on market conditions that may never occur again. This
approach is known as over-optimization or curve-fitting. Performance will not be the same in real trading, since historical
patterns are highly unlikely to be repeated.
Optimization Methods
There are two optimization methods: Exhaustive Search and Genetic Algorithm.
Understanding Exhaustive Search Optimization 209
Exhaustive, also called Brute-Force, optimization systematically goes through all the potential combinations in search for
the best solution. The advantage of this approach is every single combination will be checked and the absolute optimum
solution identified.
The length of time required for Exhaustive optimization is proportional to the total number of all possible solutions. The
drawback of this approach is that, unless relatively few parameters are involved, the period of time required to reach a
solution may turn out to be unacceptably long. Thus, exhaustive optimization may only be suitable when there is a limited
number of possible solutions.
Understanding Genetic Algorithm Optimization 209
Genetic Algorithms optimization evaluates only the more promising combinations, finding near-optimum solutions in a
fraction of time that would be required by the brute-force approach, making Genetic Algorithms optimization powerful
enough to analyze strategies with hundreds of parameters. Genetic Optimizer settings add flexibility to this technique.
GA-based search algorithms utilize methods that mimic a biological evolution. The algorithms start by testing a number of
random combinations, select the combinations with the most potential, and then further combine and modify them to finally
arrive at the best input combinations. Instead of mechanically checking every conservable combination, genetic algorithms
quickly narrow down the number of potential winners, finding and focusing on the areas that are most profitable and most
stable. Thus, genetic algorithms avoid superfluous calculations in the lowest net profit potential zones. GA approach is well
known and accepted in many fields where optimization is required.
The drawback of the GA approach is that the solution found will be a solution approaching the absolute optimum solution,
but not necessarily the absolute optimum solution itself. This drawback, however, is handsomely offset by the processing
power and time savings in cases with a large number of possible solutions.
In general, GA's work is primarily about two abstracts: an Individual (or Genome) and an Algorithm (i.e. Genetic Algorithm
itself). Each Genome instance represents a single unique inputs combination, while GA itself defines how the evolution
should take place. The GA uses a given trading strategy to determine how 'fit' a genome is for survival, e.g. how much Net
Profit does an inputs combination generates in case Net Profit was selected as an Optimization Criteria.
Here are some GA definitions that help in understanding the process:
Fitness - the overall performance of an individual (e.g. Net Profit). Genome (Individual) - a unique combination of strategy
input values. Gene - one of the input variables of a given strategy. Chromosome - a set of genes, usually related in
function. Crossover - a procedure for generating a “child” from two “parent” genomes. Crossover involves multiple
genomes. Mutation - a process when a gene is changed and receives a value that is neither from the "mother" or the
"father". Mutation involves only a single genome each time. Generation (Population) - a group of individuals (genomes),
all “born” at about the same time. Convergence - the extent of improvement in the average fitness between two
consecutive generations; as the degree of improvement is decreasing, the generations are said to be converging.
In brief, the optimization process works as follows:
1. Based on a multitude of inputs combinations provided, a population of genomes is created.
2. The fitness of each individual is evaluated.
3. The fittest members are retained, and the least fit members gradually discarded.
4. A new population of individuals is generated from the remaining members of the previous population by
applying the crossover and mutation operations, as well as selection and/or replacement strategies (built into
the GA).
5. The fitness of these new individuals is evaluated, the fittest members retained, and the least fit members
gradually discarded
6. The process is repeated, until the specified degree of convergence or generation number is reached (depends
on GA setting selected).
5. The fitness of each individual is evaluated and the least fit individuals discarded.
6. The process is repeated, until the specified degree of convergence or generation number is reached
(depends on GA setting selected).
GA Convergence Type
Genetic Algorithms optimization process has no implicit final result and thus can proceed forever. Therefore, an
“ending-point” must be specified, indicating when the optimization process must come to an end.
Two GA optimization “ending-point” criteria types can be selected: Terminate-Upon-Generation and Terminate-
Upon-Convergence.
Terminate-Upon-Generation will stop the optimization process once the specified Maximum Number of
Generations is reached.
Terminate-Upon-Convergence will stop the optimization process once the defined Convergence Rate is reached,
or once the defined Maximum Number of Generations is reached.
GA optimization “ending-point” criterion is selected in the Conversion Type drop-down list. The desired Maximum
Number of Generations, Minimum Number of Generations, and Conversion Rate can be set in the corresponding
text boxes.
Convergence Rate
Convergence Rate of generations is the ratio between the Convergence value of the two most recent generations
and the Convergence value of the current generation and the generation N generations ago.
GA calculation is stopped after meeting С [x – N] / C [x] >= P condition where:
x – ordinal number of the current generation;
С[x] – convergence value of the two most recent generations;
N – defined minimal number of the generations;
P - convergence rate; values used are usually close to 1, with the default value of 0.99.
Note: Convergence Rate is not calculated for generations that have an ordinal number less than the defined
minimal number of the generations.
Further Reading
This is only a brief introduction to genetic algorithms.
We recommend that you learn more about GA on the Internet, e.g. Wikipedia
Performing Optimization
Once a strategy has been applied 195 to a chart, strategy optimization can be performed.
Running Exhaustive Search 212
To open the Format Objects window, right-click on an empty area of the chart and then click Format
Signals.
The Format Objects window can also be opened by one of the following methods:
- Select Format in the main menu and click Signal; or:
- Double-click any one of the signal's labels on the chart; or:
- Position the mouse pointer over any one of the signal's labels on the chart; once the Pointer
changes into a Hand, right-click the label and then click Format Signals
2. Select the Signals tab.
3. Click the Optimize button.
4. In the Select Optimization Method dialog box that appears, select Exhaustive Search.
5. In the Exhaustive Search Properties window that opens, select the Optimizable Inputs tab.
6. In the Start Value column, enter the desired starting values for each of the inputs.
7. In the End Value column, enter the desired ending values for each of the inputs.
8. In the Step column, enter the desired step size, for each of the inputs.
9. Select the Optimization Criteria tab.
10.Select the Use Limitation checkbox to limit the output to a defined number of the best results; unselect the
checkbox to list all the results in the optimization report.
11.Enter the desired number of best results in the Show N best results box.
12.Select the best results criteria in the best results for list box.
13.Select criteria:
13.1.Select Standard Criteria
13.2.Select the criteria from the drop-down list
or
13.3.Select Custom Criteria
13.4.Click Edit... button.
13.5.Write the script for the custom criteria and click OK.
It is also possible to add additional criteria such as number of trades and winning percentage. For
example, it is possible to specify that the result have more than 300 trades and a winning percentage
that's greater than 50%.
The scripting language is Javascript.
Code Example
The code below creates the net profit / max drawdown ratio.
if (StrategyPerformance.MaxStrategyDrawDown != 0)
{
return StrategyPerformance.NetProfit / (-
StrategyPerformance.MaxStrategyDrawDown);
}
Besides NetProfit and MaxStrategyDrawdown, there are many other properties that can be referenced.
The table below shows the available properties.
For example, to reference the number of trades, simply use StrategyPerformance.TotalTrades. To
reference winning percentage, simply use StrategyPerformance.PercentProfitable.
Name of property Description Available in Available in
in the object MultiCharts Portfolio
StrategyPerforma Optimization
nce
NetProfit Net Profit Yes Yes
GrossProfit Gross Profit Yes Yes
Gross Loss Gross Loss Yes Yes
TotalTrades Total Trades Yes Yes
Percent Profitable % Profitable Yes Yes
Winning Trades Winning Trades Yes Yes
LosingTrades Losing Trades Yes Yes
AvgTrade Avg Trade Yes No
AvgWinningTrade Avg Winning Trade Yes No
AvgLosingTrade Avg Losing Trade Yes No
WinLossRatio Win/Loss Ratio Yes No
MaxConsecWinner Max Consecutive Yes No
s Winners
MaxConsecLosers Max Consecutive Yes No
Losers
AvgBarsInWinningT Avg Bars in Winner Yes No
rades
AvgBarsInLosingTr Avg Bars in Loser Yes No
ades
MaxStrategyDrawD Max Intraday Yes Yes
own Drawdown
ProfitFactor Profit Factor Yes No
ReturnOnAccount Return on Account Yes No
14.Select Ascending or Descending option to sort the output in ascending or descending order, respectively.
15.Click OK to run the optimization and generate the Optimization Report.
To open the Format Objects window, right-click on an empty area of the chart and then click Format
Signals.
The Format Objects window can also be opened by one of the following methods:
- Position the mouse pointer over any one of the signal's labels on the chart; once the Pointer
changes into a Hand, right-click the label and then click Format Signals
2. Select the Signals tab.
3. Click the Optimize button.
4. In the Select Optimization Method dialog box that appears, select Genetic Algorithm.
5. In the Genetic Algorithm Properties window that opens, select the Optimizable Inputs tab.
6. In the Start Value column, enter the desired starting values for each of the inputs.
7. In the End Value column, enter the desired ending values for each of the inputs.
8. In the Step column, enter the desired step size, for each of the inputs.
9. Select the Algorithm-specific Properties tab.
10.Select criteria:
10.1.Select Standard Criteria
10.2.Select the criteria from the drop-down list
or
10.3.Select Custom Criteria
10.4.Click Edit... button.
10.5.Write the script for the custom criteria and click OK.
11.Select Ascending or Descending option to sort the output in ascending or descending order, respectively.
12.An optimum population size value is automatically placed into the Population Size box; if a different value is
desired, enter the value into the box.
13.In the Crossover Probability box, enter the desired crossover probability; value range is 0.95-0.99, with a
default of 0.95.
14.In the Mutation Probability box, enter the desired mutation probability; value range is 0.01-0.05, with a default
of 0.05.
15.In the Convergence Type drop-down list, select Number of Generations or Proximal Convergence.
16.In the Maximum Number of Generations box, enter the desired maximum number of generations.
17.If Proximal Convergence was selected, enter the desired minimum number of generations and convergence
rate into the respective boxes. A value, approaching 1 is usually selected for the convergence rate; the default
value is 0.990000.
18.In the Genetic Algorithm Subtype drop-down list, select Basic or Incremental algorithm subtype.
19.If Basic algorithm subtype was selected, select Yes or No for Use Elitism option.
20.If Incremental algorithm subtype was selected, select the Replacement Scheme and Offspring Number
(number of “children”).
21.Click OK to run the optimization and generate the Optimization Report.
After an optimization process is complete then a detailed Strategy Optimization Report is available for reviewing. The Strategy
Optimization Report allows to review the results of all the test combinations tested (in tabular view).
Columns represent 18 strategy performance fields as well as all the inputs which were optimized during the current run for
each inputs combination tested.
Each row represents a set of test results for a given inputs combination.
Tip: The data in any column can be selected as the optimization criteria.
Note: The Strategy Optimization Report contains the results of the last optimization run only.
Note: Only one optimization report can be opened at a time.
Accessing Optimization Report 216
It is possible to sort out the Optimization Report by any combination of 3 main criteria in either Descending or Ascending
order.
To modify the sorting order:
1. In the Optimization Report set the criterion and sorting order from the Sort by drop-down list.
2. Repeat for the second drop-down list.
3. Repeat for the third drop-down list.
It is possible to apply the inputs combination that produced the best results during the current optimization run to the
strategy.
To apply the best inputs combination:
1. Double-click required row in the report.
2. Click Yes in the confirmation window appeared.
It is possible to export the Optimization Report to a comma-separated file, which is preferred for importing into a
spreadsheet application for further analysis.
To export the Optimization Report:
1. In the Optimization Report click Export… button.
2. In the Save As dialog window appeared navigate to the required file location.
3. In the File Name field type in the file name.
Note: By default the file name includes date and time information.
4. Click Save.
Note: The entire report information will be saved to the file.
Walk Forward Optimization is an optimization process that addresses the issue of curve fitting in strategy development. Walk
Forward Optimization segregates the data series into multiple segments, and each segment is divided into an in-sample (IS)
portion and an out-of-sample (OOS) portion.
Parameter optimization for the strategy is performed using the IS portion of the first segment. The same parameters are then
used to back test the strategy on the OOS portion of the same segment. The process is repeated for the remaining segments.
The OOS performance results from each of the segments are considered "real" instead of "curve-fit" because the parameters
that produced the OOS results were generated from IS data.
Walk Forward Optimization (not anchored) 218
Suppose a data series has 220 bars, and it is divided into five segments of 100 bars per segment. The first 70 bars of each
segment are the IS portion and the remaining 30 bars are the OOS portion.
The table below shows the segmentation details.
Segment # of Bars
per
IS OOS Segment
Segment 1 1-70 71-100 100
Segment 2 31-100 101-130 100
Segment 3 61-130 131-160 100
Segment 4 91-160 161-190 100
Segment 5 121-190 191-220 100
Step 1: Parameter optimization is performed using Segment 1's IS data. These parameters are then used to back test the
strategy on Segment 1's OOS data.
Step 2: Parameter optimization is performed using Segment 2's IS data. These parameters are then used to back test the
strategy on Segment 2's OOS data.
Step 3: Parameter optimization is performed using Segment 3's IS data. These parameters are then used to back test the
strategy on Segment 3's OOS data.
Step 4: Parameter optimization is performed using Segment 4's IS data. These parameters are then used to back test the
strategy on Segment 4's OOS data.
Step 5: Parameter optimization is performed using Segment 5's IS data. These parameters are then used to back test the
strategy on Segment 5's OOS data.
The walk forward optimization is complete. There are OOS performance results for bars 71-220. Walk Forward Optimization
considers the OOS performance results “real” instead of “curve-fit” because the parameters that produced the OOS results
were generated from IS data.
As shown, the starting point of each subsequent segment begins 30 bars after the starting point of the previous segment.
The starting point of each segment steps forward. Hence, this type of walk forward optimization is said to be not anchored.
The reason the step is 30 bars is because that’s the length of the OOS portion.
Note: The significance of OOS results from Walk Forward Optimization is debatable. For more information, please
see additional literature about this subject.
Walk Forward Optimization (anchored) 218
Anchoring means the starting point of all segments is the same as the starting point of the first segment. The starting points
do not step forward. Hence, this type of walk forward optimization is said to be anchored. The effect is that the IS portion of
each subsequent segment is longer than IS portion of the previous segment, and therefore the total length of each
subsequent segment is also longer than the total length of the previous segment.
The table below shows the segmentation details.
Segment # of Bars
IS OOS per
Segment
Segment 1 1-70 71-100 100
Segment 2 1-100 101-130 130
Segment 3 1-130 131-160 160
How? 218
To open the Format Objects window, right-click on an empty area of the chart and then click Format
Signals.
The Format Objects window can also be opened by one of the following methods:
- Select Format in the main menu and click Signal; or:
- Double-click any one of the signal's labels on the chart; or:
- Position the mouse pointer over any one of the signal's labels on the chart; once the Pointer
changes into a Hand, right-click the label and then click Format Signals
2. Select the Signals tab and select the signal in the box.
3. Click the Optimize button. The Select Optimization Method box will appear.
4. Select either Exhaustive or Genetic radio button for the type of optimization. (Both will work with Walk
Forward Optimization.)
5. Select the Walk Forward check box.
6. Enter the number of bars/days for the IS portion of a segment into the IS textbox.
7. Enter the number of bars/days for the OOS portion of a segment into the OOS textbox.
8. Check the Anchored checkbox to use anchoring. Uncheck the Anchored checkbox to not use anchoring.
9. Click the OK button.
10.Select the Optimizable Inputs tab. Input start and end values for the inputs.
11.If performing an Exhaustive optimization, select the Optimization Criteria tab and complete inputs.
If performing a Genetic optimization, select the Algorithm-specific Properties tab and complete inputs.
For more information, see Performing Optimization
12.Click the OK button.
4.9.4 AutoTrading
4.9.4.1 Understanding Automated Trade Execution
After developing a strategy, the next step is to have the strategy actually send the orders. MultiCharts automated trading
platform can automate the trading process and seamlessly integrate with the following order execution gateways: FXCM,
Interactive Brokers, Patsystems, Rithmic Trader, Trading Technologies, and Zen-Fire.
Implementing automated trade execution involves using a program that serves as the order execution gateway on the
computer and configuring the link between MultiCharts and the gateway program. Orders, generated by a trading strategy in
MultiCharts, are passed to the gateway program for execution. The gateway program is also often used to provide the data
feed for MultiCharts, although it is possible and sometimes advantageous to use a different data source.
Automated trading has two primary benefits: convenience and speed. The trader can let his strategy trade automatically
without having to constantly monitor the strategy and enter the orders himself. Automated trading can also send the orders
much quicker. Certain strategies require orders to be sent as quickly as possible without delay. With auto trading, the trader
does not have to manually type the order into the gateway. The trades are submitted automatically and the chances of delay
are reduced.
In addition to the obvious advantages of convenience, automated trading makes possible the execution of high-frequency
trading strategies such as arbitrage, where the acceptable response time for placing orders is too quick for manual order
entries.
Both, Synchronous and Asynchronous auto trading modes are deployed in MultiCharts. These two modes are profoundly
different. Select the mode that better suits the strategy on the chart. Synchronous mode makes it possible to show a position
on the chart that matches the actual filled position. However there is no guarantee that the order will get filled. When using the
Asynchronous mode, every order generated on the chart is filled, although the actual execution time and price can be different
from the time and price shown on the chart.
Please choose the order execution gateway and follow the instructions.
4. Set signal and strategy properties. To learn more, see Signal Settings 178 and Strategy Properties 196 .
9. Select the Show order execution status check box to have a status message displayed every time an
order is sent, canceled, filled, or rejected, or any other informational message is received from the gateway
application.
10.Select the Audio Alert check box and choose a sound file to activate an audio alert every time a notification
window appears.
To learn more, see Selecting an Alert Sound File
11.In the Mode Selection section, there are two options: synchronous and asynchronous mode 220 .
11.1.Select Entries/Exits are based on the execution confirmation by the broker (Sync) option for
synchronous auto trading mode (SA).
11.2.Select Entries/Exits are independent of the execution confirmation by the broker (Async) option
in the Mode Selection section for Asynchronous auto trading mode (AA). If AA is selected, two group
boxes become available.
Unfilled Strategy Order Replacement
This feature gives the strategy the ability to automatically convert limit orders or stop orders into
market orders after a certain period of time.
· Select Convert unexecuted limit or stop entry orders to market orders check box to convert
unexecuted limit or stop entry orders to market after a specified number of seconds. Enter the number
of seconds in the list box.
· Select Convert unexecuted limit or stop exit orders to market orders check box to convert
unexecuted limit or stop exit orders to market after a specified number of seconds. Enter the number
of seconds in the list box.
Note: The waiting period for converting unfilled limit or stop orders to market orders must be
12.Choose the broker/gateway from the list box in the Select Broker Plug-in section.
13.Click Settings.
14.Input the settings for the appropriate broker/gateway.
All or None Execution settings for the orders. Time in Force determines the life span of the order
before the order is cancelled. The Settling Firm and Clearing Account fields are institutional
settings. Institutional account holders should contact the broker for the correct settings. All or
None Execution determines whether partial fills in entry and exit orders are permitted.
Example:
Symbol Underlyin Exchange Expiry Currency
g
ES #F ES GLOBEX 200806 USD
The above Symbol Dictionary example maps the eSignal ES #F (S&P E-mini Future Continuous
Contract) symbol to the ES June 2008 contract from Interactive Brokers TWS.
Important: Make sure that the format is YYYYMMDD. The format YYYYMM will not work for all
symbols.
To find the expiration date, right click on the symbol in TWS and select Contract Info.
14.6.Financial Advisor Settings Tab
Interactive Brokers TWS offers a possibility of trading multiple sub-accounts using a single main
account. Financial Advisor Settings are optional and can be left blank. Consult Interactive Brokers
for information on appropriate settings.
input the Exchange, Contract Name, and Contract Date in the format acceptable by Patsystems.
Click the Lookup button to find the correct information.
Rithmic Test is the test account for Rithmic Trader. The test account is on a different server, so it has
its own connectivity settings. The other settings are the same as Rithmic 01. Please see the
instructions for Rithmic 01 222 .
settings, input the symbol name, exchange, expiry date, and category in a format acceptable by
Trading Technologies. Click on the Lookup button to look up the info.
SA Mode 222
15.1.Select the Auto Trading Status Switch 229 and select Automate Order Execution.
15.2.Read the disclaimer and click Yes.
15.3.The button will turn green which means auto trading is on.
AA Mode 222
15.4.Select the Auto Trading Status Switch 229 and select Automate Order Execution.
15.5.Read the disclaimer and click Yes.
15.6.If Show the Assign the Initial Market Position at the Broker dialogue was selected earlier, then a
dialog box will appear. Enter the initial market position and average entry price. Then select Yes.
15.7.The button will turn green which means auto trading is on.
SA Mode 222
15.8.Select Format from the main menu.
15.9.Select Automate Order Execution.
15.10.Click on the switch and select Automate Order Execution.
15.11.Read the disclaimer and click Yes.
15.12.The button will turn green which means auto trading is on.
AA Mode 222
15.13.Select Format from the main menu.
15.14.Select Automate Order Execution.
15.15.Click on the switch and select Automate Order Execution.
15.16.Read the disclaimer and click Yes.
15.17.If Show the Assign the Initial Market Position at the Broker dialogue was selected earlier, then
the dialogue box will appear. Input the initial market position and average entry price. Then select Yes.
15.18.The button will turn green which means auto trading is on.
It is possible to manually confirm or reject strategy order transmission to the order execution gateway. Order Confirmation is
set in the Auto Trading tab of the Strategy Properties window.
To learn more, see Setting Up Auto Trading in MultiCharts 222
With Order Confirmation selected, each time that one or more orders are generated, a New Order dialog box displaying the
orders will appear in the center of the desktop. To confirm order transmission, click Transmit Orders, and to prevent order
transmission, click Ignore Orders.
· When more than one order is displayed in the New Order dialog box, it is not possible to transmit one order and ignore
another; ether all of the orders are transmitted, or all of the orders are ignored.
· If neither Transmit Orders or Ignore Orders is selected before a new Market order or set of Market orders is generated,
or before a new bar is started, the previous order or set of orders is ignored and not sent to the execution gateway.
Note: Order transmission confirmation affects only the transmission of the strategy order to the execution gateway;
once the order has been transmitted, execution of the order by the broker is subject to market conditions.
Order Replacement 229
In event that an order that has been transmitted is not filled before a bar is closed, and the same order is generated again,
by the same signal, on the close of the bar, the original order is not canceled but Replaced (modified). When an order is
Replaced, order parameters, for example, Limit Price, can change. New Order dialog box is not displayed for orders that are
replaced.
Note: Order Replacement can take place order if both orders are generated by the same signal.
Intra-Bar Order Generation 229
If strategy's signals have Intra-Bar Order Generation option enabled, orders may be generated more often; if Order
Confirmation option is selected, New Order dialog box may appear before a bar is closed.
Note: In cases of symbols with high market activity it may not be possible to generate orders on every tick.
To learn more about Intra-Bar Order Generation, see Intra-Bar Order Generation 178
MultiCharts supports one-cancels-other (also known as one-cancels-all) orders. An example of an OCO order would be a
bracket order. In a Bracket order, both the profit target and the stop loss orders are sent at the same time. If the profit target
order is filled, the stop loss order is cancelled. If the stop loss order is filled, then the profit target order is cancelled.
Interactive Brokers supports one-cancels-other orders natively. If Interactive Brokers is the broker, Interactive Brokers will
be responsible for cancelling the other orders.
Patsystems, Rithmic Trader, Trading Technologies, and Zen-Fire do not support one-cancels-other orders natively. If these
brokers/gateways are used, MultiCharts will send the cancel requests.
FXCM does not support one-cancels-other orders natively. If FXCM is the broker, MultiCharts will send the cancel requests.
In addition, due to FXCM’s restrictions, MultiCharts will not send limit or stop orders to FXCM. All limit or stop orders will be
sent as market orders.
Note: If the price target and stop loss are very close to each other, and the market is volatile, it is possible that the
other order will be filled before it is cancelled.
Automatic Termination of Auto Trading 229
If any orders are pending when Auto Trading is terminated, an Auto Trading Warning – Do you want to cancel the
order? window appears.
A list of pending orders is displayed in the window. To cancel some or all of the pending orders, select the check boxes to
the left of the orders that are to be canceled, and clear the check boxes to the left of the orders that are not to be canceled,
and click Cancel Order(s) . To not cancel any of the pending orders, click Do Not Cancel Order(s) .
Closing of Open Positions upon Termination of Auto Trading 229
If any positions are open when Auto Trading is terminated, an Auto Trading Warning – Do you want to close position?
window appears. A list of open positions is displayed in the window.
To close open positions, click Close Position. To leave the positions open, click Do Not Close Position.
Auto Trading the Same Symbol from Multiple Charts 229
If the same symbol is traded from multiple charts, market position for each chart is tracked separately.
Unfilled Strategy Order Replacement 229
A Limit or a Stop order, transmitted to the execution gateway and displayed on the chart, could still go unfilled by the broker
because of the market conditions. Unfilled Strategy Order Replacement option can be used to keep the strategy
synchronized with the actual trading position by converting, after a defined period of time, unexecuted Limit or Stop orders
to Market orders.
To learn more, see Setting up Auto Trading in MultiCharts 222
In auto-trading, there are certain circumstances which may cause the actual position and the position shown on the chart to
be different. MultiCharts gives the user the ability to set the initial position of the strategy so that the actual position and the
position on the chart will be synchronized.
For example, a strategy has long and short orders. The buy order reverses the short position, and the short order reverses
the long position. If the position is long 1 contract, then the strategy will sell 2 contracts to reverse the long position.
Conversely, if the position is short 1 contract, then the strategy will buy 2 contracts to reverse the short position. The
strategy is always either long 1 contract or short 1 contract. The problem arises when this strategy is initially turned on.
When this strategy is initially turned on, the actual position is flat. However, the chart will show, for example, that the
strategy is already long 1 contract. When the short signal fires, the strategy will think that it already has a long position and
therefore short 2 contracts to reverse the long position. This means the actual position is short 2 contracts instead of short 1
contract. Yet the chart shows that the strategy is only short 1 contract, and the actual position should only be short 1
contract.
MultiCharts can prevent such problems from occurring. Before turning on auto-trading, the user can specify the actual
position and MultiCharts will understand how to synchronize it with the strategy. In the example above, the user can specify
that the actual position is flat. When the short signal fires, MultiCharts will only short 1 contract instead of 2 contracts. The
actual position is now synchronized with the chart, and the actual position is correct. Both the actual position and chart
position are short 1 contract.
Auto Trading Status Switch 229
The Auto Trading Status Switch is a button on the chart that lets the user turn on auto trading quickly. The button will be
labeled either SA or AA depending on whether the user selected synchronous auto trading or asynchronous auto trading
mode for the strategy. By default, the location of this button is on the top left corner of the chart. However, it is possible to
move it to a different location by doing the following:
1. Select Format from the main menu.
2. Select Window.
3. In the Format Window dialogue box, select the Status Line tab.
4. In the list box, find Automate Order Execution Switch.
5. Click on Move Up or Move Down to change the order and the location. To remove it from the chart, deselect it.
Tracking Market Position from the Broker During Auto Trading 229
In auto trading, there can be a de-synchronization between the market position of the strategy and the actual filled position
from the broker. The de-synchronization is usually caused by orders that are submitted but not filled. In such cases, the
user may want to have the strategy adjust calculations based on the actual filled position instead of adjusting the
calculations manually.
PowerLanguage keywords are available to track the actual filled positions during auto trading. The user can use these
keywords to enable hands free trading.
The following keywords are available:
i_MarketPosition_at_Broker
i_MarketPosition_at_Broker_for_The_Strategy
MarketPosition_at_Broker
MarketPosition_at_Broker_for_The_Strategy
In auto trading, informational messages and order execution status messages are displayed in a pop-up window in the lower
right-hand corner of the screen. These messages can be generated by either MultiCharts or the execution gateway.
Order Execution messages only can be disabled in the Auto Trading tab of the Strategy Properties window.
Status Messages are displayed on following events:
· Connection to order execution gateway has been established
Note: If you get this message, please make sure that you have enabled API connections in your order execution
gateway. Please refer to your gateway's documentation.
Note: Once the connection to order execution gateway is restored, the Connection to order execution gateway has
been established message will be displayed.
Note: An order can be rejected if the symbol was not set up correctly in QuoteManager. If this message appears,
please verify that the Price Scale, Min Movement, and Big Point Value settings for the symbol are correct in
QuoteManager. To learn more, see Setting Properties 263
Note: Please see Automatic Termination of Auto Trading 229 for an explanation of when auto trading is automatically
turned off.
Note: This message is displayed when the last auto trading enabled chart is closed.
Portfolio Trading
Applying a trading strategy to a number of financial instruments simultaneously offers several advantages:
· Portfolio diversification will produce more consistent results
· Infrequent trading opportunities will be more common across a number of symbols
· Portfolio strategies can maximize profit and minimize risks by allocating the capital within a portfolio dynamically, based on
each instrument’s performance
· Portfolio strategies can enter, scale-in, scale-out, or exit positions based on the overall portfolio performance
· Portfolio strategies are generally more robust and less susceptible to over-optimization
Portfolio Backtesting
Portfolio backtesting offers a number of advantages:
· Backtesting a strategy on a single instrument may not produce enough trades to distinguish a pattern from a coincidence
· Backtesting a strategy on a number of instruments is more likely to reveal any shortcomings and helps to avoid over-
optimization
· A robust strategy is likely to demonstrate consistent profitability across various instruments
· By backtesting on a diverse portfolio, the instruments most suitable for the particular trading strategy can be selected
Batch Portfolio Backtesting, also known as Basket Backtesting, evaluates each strategy separately and then compiles the
results.
True Dynamic Portfolio Backtesting simulates the actions of a real trader by taking in to account the overall portfolio
considerations dynamically, during the evaluation of each bar.
Portfolio equity and the available capital are dynamically evaluated for every instrument, on every bar, in order to determine the
amount available to be invested.
When available capital is insufficient to enter all of the trading opportunities that arise simultaneously, the best opportunities
are selected according to user-customizable criteria.
In addition to the performance of a particular instrument, portfolio drawdown or other portfolio performance aspects can be
taken in to consideration when making entry and exit decisions.
Symbol Prioritization
If PortfolioEntriesPriority function is specified within a strategy, the sequence of the order sets is rearranged based on the
criteria specified.
This process is illustrated in the Symbol Prioritization section of the diagram: the resulting sequence of order sets begins with
the order set for the symbol 1, followed by the order set for symbol N, and ends with the order set for symbol 2. The position of
a set of orders in the sequence determines its relative priority: the set of orders for symbol 1 has the highest priority (3), set of
orders for symbol N has the second highest priority (2), and the set of orders for symbol 2 has the least priority (3).
Risk Control
At the risk control stage, the sequence of order sets is treated as one long sequence of orders. The orders are executed one-
by-one from the beginning of the sequence, until all orders are executed, or until the risk control limits defined in Portfolio
Settings of the Portfolio Backtester prevent the execution of remaining orders. Any remaining orders that could not be executed
are discarded.
This process is illustrated in the Risk Control section of the diagram: all of the orders for symbol 1 and symbol N are executed,
while only some of the orders for symbol 2, 100 shares Long @ 55, are executed, due to risk control limits preventing the
execution of the rest of the orders for symbol 2.
The entire process is repeated for the next bar of each of the portfolio symbol's data series.
Operating Portfolios
A Portfolio, complete with the strategy and all settings, is saved as a file with a .pws extension.
To save a Portfolio:
How? 236
Use Windows Explorer or another program to delete the Portfolio file as you would any other Windows file.
Understanding the Symbols Table 236
A table of portfolio symbols is displayed in the Symbols section. The symbols are displayed under two categories: Tradable
Symbols and Information Symbols.
Tradable Symbols
Tradable symbols are the symbols for which the orders are generated. Tradable symbols are listed in the first column of the
table, data1. Unless PortfolioEntriesPriority function is specified within a strategy, the order, in which the symbols are listed
in the Symbols Table, determines the entry priority for the symbols, with the symbols at the top of the table having a higher
priority.
Informational Symbols
Informational symbols are the symbols that may be required by the strategy's logic to make trading decisions. For example,
if the strategy's logic references S&P 500 Index to make trading decisions for 3M, the S&P 500 Index symbol must be listed
in as an Informational symbol, in addition to the 3M symbol being listed as a Tradable symbol. Up to four informational
symbols can be used for each tradable symbol; informational symbols must be listed in the data2 through data5 columns,
in the same row as the tradable symbol for which they are intended.
3. Select a data feed from the Data Source drop-down list box.
4. Select a symbol from the list of available symbols in the All Symbols tab, or use the category tabs to list
only a particular category of symbols. The list can be sorted by any column, in ascending or descending
order, by clicking on the column header.
If the symbol isn't in the list, please see Adding Symbols to Symbol List 260 for more information.
To delete a row,
1. Right-click on any cell in the row.
2. Select Delete Row.
To insert a row,
1. Right-click on the Data1 cell in the row above which the new row is to be inserted.
2. Select Move Down. A new row will be inserted.
A symbol can be copied from a cell using the CTRL+C keyboard shortcut, and pasted to a cell using CTRL+V
keyboard shortcut. The symbol can also be pasted to all cells of a column. To paste a symbol to all sells of a
column, select the entire column by clicking the column header, and then paste the symbol to any of the selected
cells.
Data Series Properties consists of Resolution, Field, Session, Build Volume On, and Time Zone settings.
Global settings consist of the Data Range and Time Zone settings.
To access global settings, select the Data tab in the main window.
Symbol specific settings consist of Resolution, Quote, Field, Sessions, and Build Volume On.
To access symbol specific settings,
1. Select the cell where the symbol is to be added.
2. Open the Select Symbol window by one of the following methods:
· Double-click the cell, and then click the button, or
· Right-click the cell, and then click Format Symbol.
Resolution 236
Resolution can be based on a Time interval (seconds, minutes, hours, days, weeks,
months, or years), or on a Count interval (tick, volume, change, or range).
To set resolution,
4. In the Resolution textbox, enter the number units for each bar.
5. In the Resolution drop-down list, select the desired units.
Sessions 236
To set sessions:
Select the trading session of the symbol from the drop-down list.
It is possible to perform backtesting using only locally stored historical data, or download any additional data that may be
required before beginning the backtesting process.
To download any additional historical data that may be required before beginning backtesting,
1. Select the Data tab in the main window.
2. Select the Download Data Before Backtesting checkbox.
To perform backtesting using only the locally stored historical data, clear the Download data before backtesting
checkbox.
Configuring Strategies
A strategy is a set of signals, applied to a chart. Signals systematically specify market entry or exit points according to a set
of trading rules implemented in the signals' algorithms, and can be viewed as the basic building blocks of strategies. Over
100 pre-built, customizable signals, covering the most popular trading concepts, are already included with the platform, and
additional signals can be imported from a variety of sources. Signals can be fully customized, or entirely new signals
created, using PowerLanguage® scripting in PowerLanguage Editor.
A portfolio can contain several strategies. Each strategy can have its own list of symbols and signals. It is possible apply
different strategies to different sets of symbols.
Basic adjustments to a signal's logic can be made by simply changing the Input Values. Signals can have one or more
inputs, or none at all. Multiple instances of the same signal can be used in the same strategy, and each instance can have
different input settings.
Strategies can be constructed by simply combining a number of signals. Signal settings are specific to each particular
signal, while Strategy Properties 196 regulate the actions of a group of signals as a whole.
Adding Strategies 240
The number of signals that can be added to a portfolio is limited only by your computer's hardware configuration.
To add a signal to a portfolio:
1. In the Portfolio Tree window, expand the Strategy for which the signal will be added.
To remove a signal:
1. In the Portfolio Tree window, expand the Strategy for which the signal will be removed.
Signals can be turned off or on. The script of a signal that is turned off will not be executed and will not generate orders.
To turn a signal off or on:
1. In the Portfolio Tree window, right-click on the strategy in which the signal resides.
If execution of all entries generated for a portfolio causes the capital limits to be exceeded, then the entries with the highest
priority will receive preference, while the entries with the lowest priority will not be executed.
The priority of a symbol is the order in which it is listed in the Symbol List of the Portfolio Backtester. Signal priority can also
be specified in PowerLanguage using the PortfolioEntriesPriority keyword.
Moving a Signal to a Different Strategy 240
An Input is a constant used in the signal's calculations. Signals can have one or more inputs, or none at all. Each input is
assigned a name. There are three types of inputs: Numeric, True/False, and String. Signals can be modified by changing
the input Values. One of the main advantages of using the inputs is that basic adjustments to the study's logic can be made
by simply changing the input values, without the need to edit the studies' actual code. Multiple instances of the same signal
can be used in the same strategy, and can have different input settings.
Inputs are also used for Trading Strategy Optimization.
To change a signal's inputs:
1. Right-click on the signal in the Portfolio Tree window.
2. Select Format Signal. The Format Signals window will appear. The table will show available inputs.
3. In the Value column, click on the value of the input to be changed and enter the desired value.
Strategy properties are separate from the individual signals' settings, affect all of the signals in a strategy, and regulate the
actions of a group of signals as a whole.
Strategy properties include Costs/Capitalization, Maximum bars back, Position limits, and Trade size sections.
Costs/Capitalization 240
5. In the Costs/Capitalization section, enter the slippage dollar amount in the Slippage textbox, and:
5.1.Select per Trade to specify that the dollar amount entered represents slippage per trade, or
5.2.Select per Share/Contract to specify that the dollar amount entered represents slippage per share/contract
6. In the Interest Rate textbox, enter the interest rate, to be used in performance ratio calculations.
All signals based on past data use a certain number of bars for their calculations. The maximum number of bars study
will reference must be greater than or equal to the number of bars that the signal uses.
For example, if the signal uses the past 10 bars to make its calculations, the maximum number of bars study will
reference must be greater than or equal to 10.
To change the maximum number of bars study will reference,
1. In the Portfolio Tree window, right-click on the strategy.
Position Limits settings control the maximum number entry orders in the same direction and the maximum number of
shares/contracts per position.
To enter position limits:
6. In the Maximum shares/contracts per position textbox, enter the maximum shares/contracts permitted.
Trade size settings set the size of each trade, either by the number shares/contracts or by currency value.
Trade size settings select the number shares/contracts or the currency value per each trade.
Note: These settings are ignored if trade size is specified by the signal.
To enter the trade size:
1. In the Portfolio Tree window, right-click on the strategy.
4.3.Select the Percent of Equity radio button to enter the trade size in terms of percent of equity.
Portfolio Settings
Portfolio settings define the conditions under which the strategy is executed. Portfolio Settings include Exposure, Max % of
Capital at Risk per Position, Initial Portfolio Capital, Margin per Contract and Potential Loss per Contract.
Portfolio Settings can be set from the Portfolio Settings tab in Portfolio Backtester application.
To use the Portfolio Settings tab:
1. Select the Portfolio Settings tab in the main window.
2. In the Exposure box, enter the maximum percentage of capital to be exposed to risk.
For example, with Exposure set to 50%, a maximum of 50% of the capital will be available for the sum of all
positions. If an additional position causes total exposure to exceed 50%, the position size will be reduced so that
the Exposure limit is not exceeded. Exposure is defined as follows: entry price * number of contracts. This is the
definition for both long and short positions.
3. In the Max % of Capital at Risk per Position box, enter the maximum percentage of capital that can be risked per
position.
For example, with Max % of Capital at Risk per Position set to 5%, a maximum of 5% of the capital will be
available for a single position. If an additional position risks more than 5% of capital, then the position size will be
reduced so that the Max % of Capital at Risk per Position limit is not exceeded. Max % of Capital at Risk per
Position is defined as follows: entry price * number of shares. This is the definition for both long and short
positions.
Note: Max % of Capital at Risk per Position cannot exceed the Exposure setting.
4. In the Initial Portfolio Capital box, enter the amount of the initial trading capital.
5. In the Required Capital Assumptions in Margin Trading section, choose to use either Margin per Contract
settings or Potential Loss per Contract settings.
Note: Do not use both.
Using Margin per Contract Settings 244
1. In the Margin per Contract section,
· Select Absolute Margin value (from QuoteManager symbol settings) to get the margin value from
QuoteManager. Each symbol has a margin setting in QuoteManager. If no margin setting was entered in the
QuoteManager symbol settings, then the margin value is assumed to be zero, or
· Select the Margin value % of contract cost radio button to enter a margin percentage that will be applied
to all contrats.
2. In the Potential Loss per Contract section, input “0.001” into the Absolute Max Potential Loss box. This
effectively disables the Potential Loss per Contract section.
Note: Only the initial margin will be taken into consideration. The maintenance margin will not be taken into
consideration.
Using Potential Loss per Contract Settings 244
1. In the Potential Loss per Contract section,
· Select Absolute Max Potential Loss to enter the max potential loss in absolute dollars, or
· Select Max Potential Loss to enter the max potential loss in percentages.
2. In the Margin per Contract section, set Margin value % of contract cost to “0.” This effectively disables the
Margin per Contract section.
In real trading, margin values and other portfolio settings may change depending on the circumstances. Portfolio Backtester
enables the user to calculate the margin values and change portfolio settings dynamically with PowerLanguage.
For more information, please see PowerLanguage portfolio-related keywords (prefixed with the word “Portfolio”).
Backtesting a Portfolio
Once a portfolio has been created, strategy configured, and portfolio settings selected, the portfolio can be backtested.
To backtest a portfolio:
Backtesting a portfolio will generate a Portfolio Performance Report 246 that will be displayed in a separate window.
The description for each performance measure is described in the report.
Once the portfolio backtesting is complete, a Portfolio Performance Report is displayed in a separate window on the desktop.
Reports can be displayed only one at a time.
The report is used to analyze, based on the historical data, the strategy's performance for the entire portfolio.
Performance Report features a two-panel design. Left panel is a "tree" navigation structure, while the right panel displays the
performance data. Each section of the report is accessed by clicking the appropriate section name in the left panel.
Performance measurements are organized into five categories: Strategy Analysis, Trade Analysis, Periodical Analysis,
Breakdown by Symbols, and Correlation Analysis. A description for each of the measurements within a group is available in the
group‘s root section.
Two of the five categories are unique to portfolio backtesting.
Breakdown by Symbols 246
The Breakdown by Symbols category shows the performance of each symbol in the portfolio.
The Overview node shows the net profit and total number of trades of each symbol.
The Ratios node shows the performance ratios of each symbol. The ratios available are Upside Potential, Sharpe Ratio,
Sortino Ratio, Fouse Ratio, Calmar Ratio, Sterling Ratio, Avg. win / Avg. loss, Profit Factor, and Percent Profitable.
The Equity Curve Analysis node shows equity curve statistics for each symbol. The performance statistics available are
Maximum Equity Drawdown, Maximum Equity Run-up, Avg. Monthly Return, and Standard Deviation of Returns.
Correlation Analysis 246
The Correlation Analysis category shows the equity correlation among the symbols in the portfolio.
The Based on Daily Equity node shows the daily equity correlation of the symbols in the portfolio.
The Based on Monthly Equity node shows the monthly equity correlation of the symbols in the portfolio.
The Based on Annual Equity node shows the annual equity correlation of the symbols in the portfolio.
The description for each performance measure is described in the report.
To show the description of the performance measure,
1. Hover the mouse pointer over the name of the performance measure. If there is a description, the pointer will
For a more information on using performance reports, see Using Performance Report 201 .
Portfolio Optimization
Understanding Optimization
A strategy is created by implementing trading concepts, ideas, and observations of historical market behavior, into a trading
system. The very idea of a trading system implies a degree of optimization to market behavior.
The process of strategy optimization further enhances and automates this process. Strategy optimization is the search for the
set of optimum parameters for the defined criteria. By testing a range of signal input values, optimization aids in selecting the
values that correspond, based on historical data, to the best strategy performance. Optimization aids in better understanding of
strategy's characteristics and in creating new criteria for entries and exits.
Optimization can have detrimental effects if the user searches for the combination of inputs based solely on the best
performance over a period of historical data and focuses to much on market conditions that may never occur again. This
approach is known as over-optimization or curve-fitting. Performance will not be the same in real trading, since historical
patterns are highly unlikely to be repeated.
Optimization Methods
There are two optimization methods: Exhaustive Search and Genetic Algorithm.
Exhaustive, also called Brute-Force, optimization systematically goes through all the potential combinations in search for the
best solution. The length of time required is proportional to the total number of all possible solutions. Unless relatively few
parameters are involved, the period of time required to reach a solution by this method may turn out to be unacceptably long.
Thus, exhaustive optimization may only be suitable when there is a limited number of possible solutions.
Genetic Algorithms optimization evaluates only the more promising combinations, finding near-optimum solutions in a fraction
of time that would be required by the brute-force approach, making Genetic Algorithm optimization powerful enough to analyze
strategies with hundreds of parameters. Genetic Optimizer settings add flexibility to this technique.
To learn more about optimization techniques, see Understanding Optimization 209
1. Click the Optimize button on the toolbar, or select Portfolio in the main menu and then click Run
Optimization.
2. In the Select Optimization Method dialog box that appears, select Exhaustive Search.
3. In the Exhaustive Search Properties window that appears, select the Optimizable Inputs tab.
4. In the Start Value column, enter the desired starting values for each of the inputs.
5. In the End Value column, enter the desired ending values for each of the inputs.
6. In the Step column, enter the desired step size, for each of the inputs.
7. Select the Optimization Criteria tab.
8. Select the Use Limitation checkbox to limit the output to a defined number of the best results; unselect the
checkbox to list all the results in the optimization report.
9. Enter the desired number of best results in the Show N best results box.
10.Select the best results criteria in the best results for list box.
11.Select Ascending or Descending option to sort the output in ascending or descending order, respectively.
12.Click OK to run the optimization and generate the Optimization Report.
1. Click the Optimize button on the toolbar, or select Portfolio in the main menu and then click Run
Optimization.
2. In the Select Optimization Method dialog box that appears, select Genetic Algorithm.
3. In the Genetic Algorithm Properties window that appears, select the Optimizable Inputs tab.
4. In the Start Value column, enter the desired starting values for each of the inputs.
5. In the End Value column, enter the desired ending values for each of the inputs.
6. In the Step column, enter the desired step size, for each of the inputs.
7. Select the Algorithm-specific Properties tab.
8. Select the best results criteria in the Criteria list box.
9. Select Ascending or Descending option to sort the output in ascending or descending order, respectively.
10.Set the Genetic Algorithm properties. For information on GA properties, see Understanding Genetic Algorithm
Optimization 209
11.Click OK to run the optimization and generate the Optimization Report.
After the optimization process is complete, a Strategy Optimization Report is generated and displayed in the Optimization
Report window. Only one Optimization Report window can be open at a time.
The report lists the results of all input combinations (subject to limitations options), arranged by the specified criteria in the
specified order. Each row lists a set of performance results for each combination of inputs. The report can be sorted by
values in any three of the criteria, in either ascending or descending order.
Sorting the Optimization Report 247
A combination of inputs listed in any row of the report can be applied directly to the portfolio strategy.
To apply an inputs combination:
1. Double-click the row with the desired inputs combination.
2. In the dialog box that appears, click Yes to apply the input combination, or click No to cancel.
Note: Once a new inputs combination is applied to the strategy, the portfolio will have to be backtested again.
3D Optimization Charts 247
3D Optimization Chart is a visual representation of how the strategy’s parameters affect its trading performance. The 3D
graph reveals the most robust parameter zones, and is a great tool for avoiding over-optimization (curve-fitting). Robust
parameter zones will appear to have gradual, rather then abrupt changes in the surface plot. Over-optimized zones will
appear to have radical changes or spikes in the surface plot.
To view the 3D Optimization Chart, click the View 3D Optimization Chart button at the bottom left of the report
window.
A 3D Chart will be displayed in the 3D Optimization Charts window.
Exporting Strategy Optimization Reports 247
Strategy Optimization Report can be exported to a standard .csv (comma-separated values) file. The .csv file can then be
imported into a spreadsheet application for further analysis.
To export the Optimization Report:
1. Click the Export button at the bottom left of the of the report window.
2. In the Save Strategy Optimization Report As dialog box that appears, navigate to the desired location, enter
the file name, and click the Save button.
The Real-Time Market Scanner (also known as "Screener" or "Quote Window") is a data grid (quote sheet) which can display
quotes, market data, and indicator data in spreadsheet format.
The Scanner is indispensable for monitoring, screening, searching, and organizing many symbols according to user defined
criteria. The Scanner can accept symbols from different data feeds. The Scanner can also plot charts automatically without
having to manually add the chart via a new chart window. Symbols can also be sorted by user-defined criteria.
Scanner features:
· 5,000 symbols per Scanner window
· 200+ built-in studies
· Multiple-core and multiple CPU support
· Symbol sorting either on a per-second basis or based on a timer
· Ability to mix different data feeds within the same Scanner window
· Ability to use different resolutions for each symbol
· Ability to use all resolutions available in MultiCharts
· Ability to handle both real-time and end-of-day data
· Access to locally stored data
· Ability to handle different custom sessions for different symbols
· Ability to link symbols within a Scanner to a chart
· Ability to create a chart directly from the Scanner with a mouse click
· Ability to choose the number of bars/days back for study calculations
· Visual, audio, and e-mail alerts
· Direct access to PowerLanguage Editor to view and modify study scripts
· Script-driven text generation in the Scanner cells
· Customizable text and background colors
· Dedicated market trend histogram
A Scanner window complete with all settings is always created and then being saved in a Workspace.
Note: When the window position is detached it can be visually located outside of the Workspace.
The number of windows that can be added to workspaces is limited only by computer's hardware configuration.
The Scanner is a data grid that can display quotes, market data, and indicator data in spreadsheet format. Each row always
includes the following columns:
Symbol (first column)
Resolution (second column)
Trend (third column)
The positions of the columns above are fixed and cannot be moved.
Ten additional data columns can be added. Each data column can have ten sub-columns. For example, the Data column
counts as one data column with seven sub-columns.
Selecting an Active Cell within the Scanner Window 252
It is possible to use the mouse or the keyboard to navigate an active cell within the Scanner window.
2. Double click when the pointer shape is changed to Horizontal Resize . The column width will be fitted to
the text in the column.
· Double-click on the symbol's Trend cell. A chart will be plotted in a new chart window.
Note: Indicators from the scanner will be applied to the new chart automatically.
Changing the Scanner Theme Colors 252
In the Scanner it is possible to add, format, and remove symbols. Symbols can be added from diverse data feeds and have
different settings.
Linking of the symbols to the chart or multiple charts makes it possible to plot charts in considerably small time period.
Symbols can be sorted according to the defined criteria with possibility to use a timer.
Adding a Symbol 253
Note: The order of the symbols in the scanner may be different from the order of the symbol selected in the Format
Symbol window if automated sorting is turned on.
Note: The maximum number of symbols per one Scanner window is 5,000.
Tip: Symbols can also be copied and pasted from a Microsoft Excel spreadsheet or text file to the Scanner.
Formatting Symbols 253
Symbols 38
Chart Resolution 41
Quote Field 47
Sessions 48
Build Volume On 41
Time Zone 51
Fractional Price Scale Format for Symbols 263
4. Click OK.
To change the custom data range for all the symbols at the same time:
1. Right-click on any cell in the Resolution column.
2. Select Format Resolution for All Symbols....
3. Select the Use Custom Data Range check box.
4. Enter a number in the text box (from 1 to 100000) and select either Bars Back or Days Back in the drop-down
list.
5. Select the most recent date from which to calculate Bars Back or Days Back range.
Note: By default, current date is set for the initial value.
Removing a Symbol 253
To remove a symbol from the Scanner use one of the following methods:
· Click on the symbol name and use the DELETE button, or
· Select Edit in the main menu and click on Remove Symbol, or
· Right-click on the symbol and select Remove Symbol.
Sorting makes it possible to quickly locate and monitor best trading opportunities defined by customizable criteria. The
market data lines in the Scanner can be sorted based on any column.
1. Double-click on the column header. The market data lines will be sorted based on ascending or descending
order.
Tip: Double-click on the same header will switch from the ascending to the descending order of sorting.
To sort automatically:
1. Select the Sort Data Every check box and enter the time period in seconds.
Symbols in the Scanner can be linked to a chart plot. After linking, the selected symbol in the Scanner can be easily plotted
by simply clicking on the symbol in the Scanner. The symbol will plot automatically in the chart.
3. Select the Symbol Link button on the Symbol column header in the Scanner. Select a color.
4. Select the Symbol Link button on the Status Line of the Chart window to be linked. Select the same color
as the color chosen in the Scanner.
Note:
The Symbol Link button will not appear if it is hidden in the Status Line settings.
5. In the Scanner window select a cell that contains a symbol’s ticker. The chart for the symbol will be plotted in
the Chart window.
Note: The symbol name is linked to the Chart window. The other settings, such as Resolution of the Chart,
Quote field, Time Zone, Build Volume on, and Sessions will not be affected.
1. Click the Symbol Link button on the chart and change it to Not Linked .
Note: All studies or signals previously applied to the chart will be recalculated after linking.
Note: All manually placed drawings will stay in their original locations.
Note: Objects based on formula calculations (e.g., signal arrows, etc.) may disappear if the formula calculation on
the new data series does not generate an object.
Studies can be added, formatted, removed, and customized. A study script can be accessed directly from the Scanner. It is
possible to change settings for multiple studies at once. Indicated plots of a study can be hidden or displayed when necessary.
Audio, visual and E-mail alerts can be enabled.
Adding Studies 256
1. Open the Insert Study window.
· Press the F7 button, or
· Select Insert in the main menu and select Study, or
· Right-click on any cell in the Scanner window and select Insert Study.
2. Select either an individual study or multiple studies. To select multiple studies, hold down the CTRL button and
select each study.
A study's color is defined in its PowerLanguage Script. To edit the colors, use the reserved words SetPlotColor and
SetPlotBGColor
Formatting Studies 256
To format a study:
· Double-click on the symbol's cell in the study's column, or
· Right-click on the symbol's cell in the study's column. Select Format Study.
The Format Study dialog window will appear. If a study has two or more plots, then formatting will be applied to all the plots
for that particular study.
An Input is a constant used in the study’s calculations. Studies can have one or more inputs, or none at all. Each
input is assigned a name.
There are three types of inputs: Numeric, True/False, and String. Studies can be modified by changing the input
Values. Most, but not all, studies use input values. Learn more about Default Studies Inputs 322 .
One of the main advantages of using inputs is that the study's logic can be changed by simply changing the input
values. Editing the study’s code is not required. The inputs can be modified before and after the study has been
inserted.
Study properties can be different for all symbols in the Scanner window. Study properties include Number Format
and Update On Every Tick sections. To define the number of decimals to display for all the study plots of the
specified symbol,
· Select Same as Symbol radio button to use the same number of decimals as the symbol, or
· Select Show radio button and enter the number of decimals.
To recalculate study on every tick, select the Update On Every Tick check box.
Note: Even with this check box checked, updates are still limited to two updates in one second.
Note: If the Use as Default check box is selected, then the current Properties settings will be used for every
newly added symbol.
Visual, audio, or e-mail alerts can be sent when market conditions meet the criteria specified in the study.
To enable alerts,
1. Select the Enable Alerts check box under the Alerts.
2. In the Alert Conditions Check section, select whether the alerts will be triggered On Bar Close or
Every Tick.
If the sending process has been unsuccessful a message will appear in the pop-up window:
It is possible to hide/display plots of studies, in case a study has more than one plot. To hide/display plots of a study,
1. Right-click on a cell in the study's column or on the study title.
2. Select Show Plots.
3. Select or deselect the plots to be displayed/hidden.
Formatting a Study for All Symbols makes it possible to modify settings for all symbols at the same time.
To format a Study for all symbols:
1. Right-click anywhere within the Study's column, excluding the header.
2. Select Format 'Study Title' Study for All Symbols. The Format Study window will appear.
The settings for all existing studies will be changed. However newly added symbols will not inherit these settings.
Learn more about Formatting Studies 256
To remove a study:
1. Right-click on any cell within the Study's column, excluding the header.
2. Select Remove 'Study Title' Study.
5 QuoteManager
5.1 Understanding QuoteManager
Understanding QuoteManager
To run QuoteManager click the New QuoteManager Window icon on the Main toolbar.
Symbol List is a list of commonly used financial instruments. Modern-day investors need easy access to any of the trading
vehicles.
QM has been developed based on those needs, the basic requirements being:
· The program must function with numbers of symbols in tens of thousands
· Rapid data access, which means powerful search, sorting, and selection capabilities
· Convenient adding and editing of data
· Simple data backup and restore
· Minimal setup and maintenance effort
To start working with a symbol, the symbol must be added to the symbol list. Adding can be done manually or from a list,
downloaded from the data vendor.
Adding symbols manually is appropriate when the exact symbol name is known and the list of symbols is not available from
the data vendor. For instance, with DDE there is no way to download a list, and the user is supposed to know the exact
name for the query.
In all other cases, adding symbols manually is not recommended, as parameters in addition to the symbol name may be
required by the data vendor. When a symbol is added from a list, provided by the data vendor, all required parameters are
set automatically.
For details on specific data vendor symbols, see Built-in Sources 274
To add a symbol:
1. On the Symbol menu, select Add Symbol, then click Manually, or
2. Select a Data Source from the list. If the desired data vendor is not listed, it could be that the vendor is
not installed. See Data Sources 271 for additional information.
3. Enter the Symbol name.
4. Select the Category from the list.
5. Select the Exchange from the list. If the desired exchange is not listed, see the Exchanges 269 section.
6. Click OK.
7. Enter the symbol Root.
Tip: Stock root is the same as the stock's name.
8. Click OK to add symbol with current properties or set Symbol Properties 263 .
To add a symbol:
1. On the Symbol menu, select Add Symbol.
2. Select From Data Source.
3. Choose a data source from the Data Source list; the Insert Symbols into Portfolio window will open.
If a data vendor is not in the list:
· data source does not support a symbol list (the symbol must be added manually 260 )
· data source is currently deactivated (the data source should be activated 271 )
The list is sorted based on the contents of one of the available columns. For example, text data is sorted alphabetically, but
months in calendar order.
For sorting:
1. On the View menu, click Sort By.
2. Select the column to sort by, i.e. Symbol.
3. Select the sorting direction - Sort Ascending or Sort Descending.
-or-
1. Click the corresponding column heading to sort by that column.
2. The arrow on the heading indicates the sorting direction; click the column to reverse the sorting direction.
3. Right-click a column heading to call up a context menu with sorting options. See Selecting Symbol(s) in Symbol
List 260 section.
Two types of a search can be performed: an Incremental search and a Full String search.
An Incremental search locates a symbol as the symbol name is typed. Please note that an incremental search can be
performed by the signal name only, and not by any other attributes.
To perform an Incremental search:
1. Select All Symbols in the left panel to search a list of all symbols, or select a particular symbol category.
2. Click on any symbol in the right panel.
3. Start typing the symbol name; as the name is being typed, the selection will move between symbols seeking for
a match.
Note: Each consecutive character in a symbol name must be typed with an interval of no more the one second; if you
pause for more then one second, a new search will be started, for a symbol name beginning with the first
character that was typed after a pause of more than a second.
To start a new search without waiting for the second to be over, simply press the ESC key.
Example: To search for AMD, type a m d with an interval of less than a second between each character; if you pause for
more than a second after typing a, once you type m, the first symbol, beginning with the character “m”, will be
located instead.
A Full String search can be used to find multiple symbols that satisfy the search criteria.
To perform a Full String search:
1. Select All Symbols in the left panel to search a list of all symbols, or select a particular symbol category.
2. Select Edit in the main menu, and then click Find, or use the CTRL+F keyboard shortcut; a Find dialog box will
open.
3. In the Find what text box, enter a string to search for.
4. In the In column list box, select the column to search in.
5. Click Find Next to begin the search.
6. To continue the search, click Find Next again.
A previously performed search can be repeated by simply pressing the F3 key, without opening the Find dialog box.
The program supports workspace customization. The user can select the data columns and set their widths, including:
Symbol, Description, Exchange Listed, Data Source, Contract Month, Price Scale, CUSIP, Root, Margin, Contract Year,
Expiation Date, Expiration Rule, Expiration Status, Daily Limit, Min. Movement, Big Point Value, Strike Price, and Option
Type.
To customize the Symbol List:
1. On the View menu, click Columns.
2. Select the checkboxes, corresponding to the columns to be displayed.
3. Use the Move Up and the Move Down buttons to change the order in which the columns are displayed.
4. Enter the desired width, in pixels, in to the The selected column should be N pixels box.
Note: Column width can also be resized by using the mouse.
Setting Properties
It is possible to modify symbol properties in QuoteManager. Every symbol has a set of properties. Data Source, Category,
Exchange & ECN, Symbol Name and Symbol Root are the mandatory properties.
In case the symbol was added from a list supplied by data vendor 260 all mandatory and most optional properties are already
set according to data vendor requirements.
It is possible to modify propeties only after the symbol is already added 263 to the symbol list.
In case the symbol was added manually 260 all mandatory (except Symbol Root) and some optional properties are already
set.
It is possible to modify propeties while creating a symbol 263 as well as after the symbol is already added 263 to the symbol
list.
Important: This information can be obtained from the exchanges where the symbol is listed or from a brokerage firm.
The properties are edited in the Edit Symbol 263 window:
Editing an existing symbol properties 263
1. Double-click the necessary symbol in the symbol list.
2. Select appropriate tab in the Edit Symbol window opened.
Note: First tab name dynamically changes according to the symbol category set.
3. Set necessary properties.
-or-
1. Select the necessary symbol (see Selecting Symbol(s) in Symbol list 260 section).
-or-
1. Select the necessary symbol (see Selecting Symbol(s) in Symbol list 260 section).
2. Under menu select Symbol and click Edit Symbol....
3. Select appropriate tab in the Edit Symbol window opened.
Note: First tab name dynamically changes according to the symbol category set.
4. Set necessary properties.
Or
1. Right-click on necessary symbol and select Edit Symbol....
2. Select appropriate tab in the Edit Symbol window opened.
Note: First tab name dynamically changes according to the symbol category set.
3. Set necessary properties.
After filling information in the Add Symbol 260 window the Edit Symbol window appears automatically making possible
setting properties.
Important: The Category property can not be changed for a symbol.
Important: It is required to set the Symbol Root property.
Tip: Symbol Root for stocks is the same as the Symbol Root property.
Property Tab Category Description
Applicable
Data Category All Data source to receive the data for the symbol from. It is possible to have
Source* several symbols with the same underlying asset (name) fed from different
data source.
Symbol Category All Symbol name is the abbreviation of the underlying asset name i.e. ticker
Name* name. Symbol names may vary for different data source. The same
underlying asset may have quite different symbol names for different
datas sources.
Symbol Category All Symbol root is a abbreviation of underlying' name. The same underlying
Root* asset may have quite different symbol names for different datas sources.
Description Category All Description is the full name for the asset. Usually it is a name of the
corporation, financial entity or instrument that the symbol is based on.
CUSIP Category Mutual Funds & CUSIP (Committee on Uniform Securities Identification Procedures) is a
Stocks unique nine-character identification number, for each class of security
approved for trading in the U.S., to facilitate clearing and settlement.
Margin Category Futures Amount of money exchange requires to reserve as a deposit for futures
trading (in percents).
Contract Category Bonds, Futures Delivery/expiration month of a security.
Month & Options
Contract Category Bonds, Futures Delivery/expiration year of a security.
Year & Options
Expiration Category Futures & Date future or option contract expires.
Date Options
Expiration Category Futures & Expiration rules are quite different for different types of futures and
Rule Options options.
Expiration Category Futures & Status displays if the contract is expired or not.
Status Options
Strike Price Category Options Option strike price.
Option Type Category Options Option type (Call or Put).
Price Scale Settings All Returns a numeric expression representing the fractional portion of a full
point move for a particular symbol. The PriceScale value is represented
by a whole number. For example; the PriceScale of the E-Mini S&P is100,
which represents the fractional portion of a full point move for the E-Mini
S&P. Any stock would also have a PriceScale of 100. 1 / PriceScale =
Minimum price increment.
Examples
MinMove / PriceScale returns the smallest increment between trades.
MinMove / PriceScale * BigPointValue returns the dollar value of the
smallest change in price.
Tip: MultiCharts can display prices in both decimal and fractional
format.
Displaying prices in decimal format 263
1. Double click on the symbol in QuoteManager. The Edit
Symbol window will appear.
2. Select the Settings tab.
3. In the Settings Details section, select the appropriate
Price Scale from the drop-down list. The following
selections are available for decimal format:
10000
1000
100
10
As is
1/10
1/100
1/1000
1/10000
1/100000
1/1000000
Fractions with
integer numerator
1/2
1/4
1/8
1/16
1/32
1/64
1/128
1/256
The numerator of the fraction may have a decimal:
10 23.25/32
10 23.5 /32
10 23.75/32
Fractions with
decimal numerator
1/32 and 10th of 32nd
1/10 and j of 10th
1/32 and j of 32nd
1/64 and 10th of 64th
1/32 and Ѕ of 32nd
1/64 and Ѕ of 64th
The "10th", "j", and "S" markings have special meaning. Their
definitions are laid out in the table below:
Marking Decimal Fractional
representation in Equivalent
numerator
10th 0, 0.1, 0.2, ... 0.9 1/10
j 0, 0.25, 0.5, 0.75 1/4
S 0, 0.5 1/2
As shown,
"10th" means the decimal in the numerator can be in increments of
0.1.
"j" means the decimal in the numerator can be in increments of 0.25.
"S" means the decimal in the numerator can be in increments of 0.5.
In a user defined price scale range, it is also possible to input
numbers in fractional format into the Maximum and Minimum fields.
The numbers will be converted to decimal format when the dialog box
is closed. However, the price scale on chart will still be in fractional
format.
Note: If the price scale of the symbol is already in decimal format
and it is changed to fractional format, the chart must be
reloaded for the fractional format to appear.
Daily Limit Settings All The maximum price movement allowed during a session (currently is not
used in MultiCharts).
Min. Settings All Returns a numeric expression representing the minimum movement
Movement allowed for a particular symbol.
The MinMove value is represented by a whole number.
For example: the MinMove of the E-Mini S&P is 25, which represents the
minimum price move of the E-Mini S&P which is .25.
Any stock would have a MinMove of 1, which represents the minimum
This tool allows creating templates for rapid access to the session configurations. This is especially useful for non-standard
sessions used with several symbols.
Create a template once and activate it for the desired symbol with just a few clicks.
Adding Session Templates 267
1. On the Tools menu, click Session Templates, or click the Session Templates icon on the toolbar.
2. Click Add.
3. Enter the Description (up to 50 characters long).
4. Select Session Time. This option indicates the time used for setting sessions.
5. Use the Add/Delete buttons to add or delete sessions.
1. On the Tools menu, click Session Templates, or click the Session Templates icon on the toolbar.
2. Click Edit.
1. On the Tools menu, click Session Templates, or click the Session Templates icon on the toolbar.
2. Click Delete.
The Symbol Dictionary in QuoteManager contains a list of futures symbol roots with pre-defined contract specifications and
session times. The user can use these pre-defined settings to add new symbols quickly without needing to manually complete
each field.
For example, if the user wants to add the ES#F symbol from eSignal and the Symbol Dictionary has the
ES symbol root defined, then QuoteManager will recognize the ES root symbol and automatically fill in the contract
specifications.
The contract specifications are important because the specifications are used to plot the chart and calculate dollar amounts. If
the contract specifications are not correct, then the chart may not plot properly and the strategy may not function properly.
It is also possible to add new symbol roots into Symbol Dictionary and edit existing symbol roots. Symbol Dictionary contains
symbol roots for most futures contracts. However, it is not possible for the list to be 100% complete, and contract specifications
may change.
Adding a Symbol Root to Symbol Dictionary 268
1. Click Tools in the main menu and select Symbol Dictionary, or click the Symbol Dictionary icon on the
toolbar.
2. Click the Add button. The New – Edit Root Settings window will appear.
3. Complete the Settings and Sessions sections on the form.
4. Click the OK button.
1. Click Tools in the main menu and select Symbol Dictionary, or click the Symbol Dictionary icon on the
toolbar.
2. Select the symbol root to edit. Click the Edit button. The Edit Root Settings window will appear.
3. Edit the fields.
4. Click the OK button.
How? 268
· Double-click the symbol in the symbol list, or
· Select the symbol in the symbol list, then select Symbol in the main menu and select Edit Symbol, or
· Right-click on the symbol and select Edit Symbol.
Note: Edit Symbol window is already open in Step 1. It is possible to leave it open and continue
working with it.
This tool allows adding/removing Exchanges/ECNs and editing their parameters. The Exchanges/ECNs parameters are
inherited by the symbols, so the better are the Exchanges/ECNs tuned in, the higher will be the overall quality of the system
performance.
Sometimes the Exchange/ECN settings aren't the same for all the symbols traded on a given Exchange/ECN. So the user is
able to edit settings on a symbol-by-symbol basis, although in the majority of cases the Exchange/ECN settings are exactly the
same as the individual symbol settings.
Adding an Exchange/ECN 269
1. On the Tools menu, click Exchanges & ECNs, or click the Exchanges & ECNs icon on the toolbar.
2. Click Add.
3. Enter the Exchange/ECN name. This name must be informative for convenience and consist of the full
exchange name, up to 50 characters long. This full name will not be used on the Symbol list and in the symbol
settings.
4. Enter the Abbr. This short name, up to 7 characters long will be used for exchange identification, use the
standard abbreviations as they will be used for symbol searches.
5. Select the Holiday List. See Holidays 270 section for more information; if you do not want to use the Holiday
List, select None.
6. Select a Price Scale corresponding to most symbols traded at the selected Exchange/ECN.
7. Enter the Daily Limit.
8. Enter the Min. Movement.
9. Enter Big Point Value.
10.Add the sessions in the Sessions section. Use the Add/Delete buttons to add or remove them; the sessions
must be set in the local time of the corresponding exchange.
11.On the Time Zone tab set the exchange's time zone. This can be done either using From System Options or
Custom options. Selecting From System Options will set the OS time zone settings, which is usually correct;
you might have to set the time zone and daylight savings settings by using Custom.
1. On the Tools menu, click Exchanges & ECNs, or click the Exchanges & ECNs icon on the toolbar.
2. Click Delete.
1. On the Tools menu, click Exchanges & ECNs, or click the Exchanges & ECNs icon on the toolbar.
2. Click Edit.
Setting Holidays
This tool is used to indicate the days when the exchanges do not work to avoid gaps on the charts. The holidays are divided
into groups so one select holidays by nation or other parameter.
Sometimes it makes sense to group the holidays into national and international to avoid double-listing. In other cases sorting
holiday by countries may be more convenient.
Adding Groups 270
1. On the Tools menu, click Holidays, or click the Holidays icon on the toolbar.
2. Click the Add Group button.
3. Enter the group name in the Description field (up to 15 characters).
4. Enter the Data Source Abbr (up to 3 characters).
1. On the Tools menu, click Holidays, or click the Holidays icon on the toolbar.
2. Click the desired group in the Date or Duration area or press Enter to open it so the sign to the left of the
group changes to sign.
3. Click the link or the Add Holiday button.
4. Enter the holiday name in the Description field (up to 15 characters).
1. On the Tools menu, click Holidays, or click the Holidays icon on the toolbar.
2. Click the desired group in the Date or Duration area or press Enter to open it so the sign to the left of the
group changes to sign.
3. Select the desired holiday.
4. Click the Remove Holiday button.
1. On the Tools menu, click Holidays, or click the Holidays icon on the toolbar.
2. Click Remove Group.
3. Select the desired group.
4. Click the Remove Group button.
This tool is used for managing data sources. It allows adding/removing data sources, editing their settings, names and
abbreviations, receiving data source information, their states and versions.
Adding Data Sources 271
Data sources are added automatically. The system auto-adds a data source as soon as the data feed's DLL is placed in the
DataFeeds folder. This data source appears in the data sources list but it is still inactive. To activate the data source press
Activate button (see Activating Data Sources 271 section). Please, contact [email protected] to receive further
information concerning the API for developers.
Activating Data Sources 271
Activation/deactivation is used to set the list of daily used data sources or for activating a newly added data source. For full
access the data source must be activated. If the data source is present in the list but marked in red, this data source must
be activated.
To activate a Data Source:
1. On the Tools menu, click Data Sources, or click the Data Sources icon on the toolbar.
2. Select the data source using the keyboard or mouse and click Activate. The data source is now marked in
green and the Settings, Name and Abbr parameters can now be edited.
If a data source is not used, it can be deactivated. In this case, it will not be displayed in the list of available data sources
when a symbol is added; if necessary, the data source can be reactivated later.
To deactivate a data source:
1. On the Tools menu, click Data Sources, or click the Data Sources icon on the toolbar.
2. Select the data source using the keyboard or mouse and click Deactivate. The data source is now marked in
red and the Settings, Name and Abbr parameters cannot be edited.
Most data sources have unique parameters, e.g. server IP address, port, user name/login information, etc. See the Built-in
Data Sources 274 section for more detailed descriptions. All the parameters for the integrated data sources are described
there.
To edit a data source's settings:
1. On the Tools menu, click Data Sources, or click the Data Sources icon on the toolbar.
2. Select the data source using the keyboard or mouse and click the Settings button.
To use a data source with different sets of settings it must be cloned. Cloning creates a virtual copy of the data source with
modified parameters. For instance, to receive data from several DDE data vendors one needs to have several DDE
templates. In this case for every DDE data feed a unique data source must be created. If there are two DDE data feeds,
Universal DDE and Universal DDE 2 must be created and a DDE template selected for each.
To clone a data source:
1. On the Tools menu, click Data Sources, or click the Data Sources icon on the toolbar.
2. Select the data source using the keyboard or mouse and click the Clone button.
3. Enter a Data Source Name (up to 3 characters).
4. Enter a Data Source Abbr (up to 3 characters).
1. On the Tools menu, click Data Sources, or click the Data Sources icon on the toolbar.
2. Select the data source using the keyboard or mouse and click the Edit button.
1. On the Tools menu, click Data Sources, or click the Data Sources icon on the toolbar.
2. Select the data source using the keyboard or mouse and click the Delete button.
Collecting Data
The program provides optimal performance with various data feeds. Its behavior depends on the data feed connected; there
exist three kinds of data feeds - data feeds that provide real-time only, data feeds that provide both history and real-time and
data feeds that provide history only.
See the Built-In Data Sources 274 table for more detailed information on data feeds.
The program's behavior depending on the data feed type is described below:
Data feed provides real-time only 273
Most brokers do not provide history data. In this case the program receives only real-time data and stores it in the local
database. The data is saved immediately, at the same time as it is charted and may be used in the future. The program
creates 1 minute and 1 day resolutions automatically and stores them in the database along with ticks. All other resolutions
are generated from stored data. I.e. if we need a 100 tick chart, the program automatically builds it from existing ticks. If a 2
minute chart is required, the program builds it from 1 minute data. In case of gaps in data 1 tick, 1 minute or 1 day must be
imported correspondingly. See the Importing Data 293 section for more detailed information.
Data feed provides both history and real-time 273
Most professional data vendors as well as a number of advanced brokers provide history data for the ultimate trader
convenience. The amount and quality of data provided varies from vendor to vendor, though; see the table 274 for a general
overview of history data feeds. The program demonstrates the best performance with such data vendors, freeing the user
from the need to download missing data manually. The history data is stored in the local database and needs minimal effort
for reuse, as only missing data has to be downloaded instead of the entire period. Besides, as data is stored locally, it is
accessible even when vendor servers are not; all real-time data from the vendor is stored in the database as well, so no
repeated queries must be sent when charts are created again. This cuts down on the Internet traffic and accelerates work. 1
tick, 1 minute and 1 day resolutions are stored in the database.
Data feed provides only history data 273
There exists a multitude of End-of-Day and intraday historical data vendors. Data from such vendors is used by in-depth
analysis by experienced traders or for filling gaps in data from other vendors. When this data is used on its own, without
requiring combination with data from other vendors, we insist on importing data into symbols of real-time only vendors, such
as Universal DDE. This guarantees that the data will not be mixed up with already existing data and will be charted exactly
the way it was downloaded. The program saves to the database 1 tick, 1 minute and 1 day resolutions and generates all
others from them. When data is imported, existing data in the database will be overwritten by the data from the file if the
timestamps are the same.
* Plus applicable exchange fees and taxes. The prices presented in the table are subject to
change from time to time.
We don't guarantee the accuracy of the presented information.
** More than 20 predefined templates are available: Bloomberg, CAIT s.c., FAINEX, FXCM, GL
Trade, Hi Sat, Infobolsa.de (BOVESPA A VISTA), Infobolsa.de (BOVESPA OPEOES
5.5.3.2 Bloomberg
Bloomberg
Premium datafeed.
Pro Con
Widest coverage High price
Features
· Searching for symbols by name or root
· Tick-by-tick up to 50 days, intra-day up to 50 days, daily up to 20 years
Limitations
· High price
Setting up 276
1. Make sure Bloomberg Terminal installed
To create a symbol using Bloomberg as the Data Source see Adding from a list supplied by data vendor 260 section.
5.5.3.3 CyberTrader
CyberTrader
Well-known broker. As of December 10, 2007, CyberTrader has merged into Charles Schwab & Co., Inc.
Pro Con
High speed Limited history
execution
- Stocks & Options
only
Features
· Advanced brokerage
Limitations
· History (Trades) limited to: Tick-by-tick up to 2 days, intra-day up to 30 days, daily up to 100 days
· No symbol list
Setting up 277
1. Make sure the CyberTrader account is active.
2. Launch Quote Manager.
3. In the Tools menu, click Data Sources.
4. Select CyberTrader and click Settings....
5. Type in the Authorization Code, Login, and Password.
To create a symbol using CyberTrader as the Data Source see Adding in manual mode 260 section.
5.5.3.4 eSignal
eSignal
One of the leading professional data vendors. The company has been working in the financial information area for decades,
constantly improving its services. The program performance and stability is the best with this data vendor.
Click here to subscribe to eSignal at a special price.
Pro Con
Affordable price Not enough
history data
Widest coverage No history data
for options
High reliability No continuous
contracts for
international
markets
Features
· Automatic gap filling
· Automatic reconnection in case connection is lost
Limitations
· Delayed subscription cannot be used even for history data
Setting up 278
1. Make sure the eSignal Data Manager is installed and functions properly.
2. Make sure you're using a valid login/password.
No additional settings are required as the program receives data directly from Data Manager.
To create a symbol using eSignal as the Data Source see Adding Symbol(s) to Symbol list 260 section for more detailed
information.
Free Quotes
The quotes are downloaded from the free of charge recourses what makes it the most cost-effective solution for those who
don't need real-time information. The program downloads minute and day data. All the rest resolutions are based on them.
Minute data is delayed by 20 minutes.
As the service is free of charge its reliability and the quality of quotes are lower than with the service provided by the
commercial data vendors.
Pro Con
Free quotes Low reliability
No installation Poor data quality
and configuration
Features
· Ability to select the server from which the data is downloaded
· Ability to define the mirror servers and the order of queries to them
· Automatical retry if the server is unavailable
· Ability to set up the timeout value and the number of retries
Limitations
· Bid/Ask not supported
· Data is delayed by 20 minutes
· Ticks unavailable
Setting up 279
Make sure you have the access to the Internet. The program has the same port as the Internet browser, what means that if
you can surf the Internet, the program will work.
To create a symbol using MarketCast as the Data Source see Adding Symbol(s) to Symbol list 260 section for more
detailed information.
5.5.3.6 GlobalServer
GlobalServer
Omega Research TradeStation 2000i has been the leading program for years. No surprise that hundreds of data sources were
integrated into GlobalServer. We think that OwnData 2 will be most useful to all users of TradeStation 2000i wishing to use all
the advantages of TradeStation 8.1's new features.
Pro Con
A ready-to-work None
system already in
place
Features
· Automatic launch of GlobalServer when searching for symbols or plotting charts
· Automatic downloading of a Symbol list from GlobalServer
· Field types supported - Trade Price, Trade Volume, Bid Price, Bid Size, Ask Price, Ask Size
Limitations
· None found
Setting up 280
1. Make sure that the GlobalServer Version: 5.00.0822 Date: 03/23/2000 is installed and functioning properly.
To create a symbol using GlobalServer as the Data Source see Adding from a list supplied by data vendor 260 section.
Interactive Brokers
One of the leading electronic brokers. Gained immense fame with its high quality, affordable prices and supporting trading on
may exchanges worldwide.
Pro Con
Free quotes Not enough
history data
Features
· Searching for symbols by name or root
· Auto-adding the symbol and required attributes to the database
· Automatic confirmation when querying for data. No need to click ok in the "Accept incoming connection" dialog
· Automatic reconnection in case connection is lost
Limitations
All the listed limitations arise on the Interactive Brokers' side so they may not always be overcome:
· Interactive Brokers provides 24 hours of historical data only. See the Importing Data 293 section for info on gap filling
· Interactive Brokers does not provide the day's Open price
· Interactive Brokers does not provide timestamps for quotes. Because of this limitation the program has to assign the
system time to every quote. Such a workaround may bias the true timestamp of the quote by the time difference between
its sending and receiving; in most cases the delay is fractions of a second
· Interactive Brokers does not support receiving data for over 80 symbols per one account
Setting up 281
1. Make sure that the latest version of Trade Workstation is installed and functioning properly.
2. Make sure the Trader Workstation allows interacting with other programs via the API:
a) Run Trader Workstation
b) In the main menu, select Configure, then click API
c) Check Enable ActiveX and Socket Clients
3. Make sure the Socket Port in Trader Workstation is the same as in the data source settings:
a) In the Configure menu, click API
b) Select Socket Port; the default value is 7496
c) Run Quote Manager
d) In the Tools menu, click Data Sources
e) Select Interactive Brokers and click Settings
f) Compare the Port with Socket Port
4. Make sure the Server IP address is 127.0.0.1 if the Trader Workstation is running on the same computer.
To connect to Trader Workstation running on another machine indicate the proper IP.
5. Check Launch Trader Workstation at start, if the program is to be started automatically at boot up.
To create a symbol using Interactive Brokers as the Data Source see Adding from a list supplied by data vendor 260
section.
5.5.3.8 IQFeed
IQFeed
One of the leading professional data vendors. The company has been working in the financial information since 1984. IQFeed
provides tick-by-tick unfiltered data, thus you will not miss about 50% of the actual trades.
Pro Con
Affordable price Not enough
history data
Unfiltered data Insufficient
coverage
Features
· Automatic gap filling
· Automatic reconnection in case connection is lost
Limitations
· Since IQFeed has no identification of transactions there is no such a possibility to receive data for several charts
simultaneously. All the paralleled queries are queued. Thus, if you make a query of the history for a long period of time
there immediately comes the query for receiving several bars only as the program cannot draw data for the second query
before the first is not processed
· There is no method for deleting a historical query since it is necessary to wait for a response for the previous query in
order to begin to process the next one
· When plotting a chart for the Bid/Ask field of Minute, Day and etc, actually ticks will be requested because it is
impossible to receive the history of minutes and days for Bid/Ask. It will deteriorate data reception performance
Setting up 282
1. Make sure IQFeed 2.3 or higher is installed and functions properly.
2. Make sure you're using a valid login/password.
No additional settings are required.
To create a symbol using IQFeed as the Data Source see Adding Symbol(s) to Symbol list 260 section for more detailed
information.
5.5.3.9 MarketCast
MarketCast
MarketCast provides real time data for the Australian markets. Information comes to users via the television signal.
Pro Con
Affordable price No historical data
Reliability Hardware
required
Features
· Offmarket data filter
Limitations
· The Bid/Ask history is not supported (only real time data)
· When plotting a minute chart, ticks will be requested because it is impossible to receive the history of minutes. It will
deteriorate data reception performance
· When importing new data in MarketCast Data Server and when creating a chart the whole history is requested once
more
Setting up 283
1. Make sure MarketCast DataServer 2.11 or higher is installed and functions properly.
2. Make sure you've specified the path to RealTime API DLL "McApi.dll" correctly (by default the path is installed
automatically and indicates a folder where the MarketCast Data Server is installed).
No additional settings are required.
To create a symbol using MarketCast as the Data Source see Adding from a list supplied by data vendor 260 section for
more detailed information.
5.5.3.10 MetaStock
MetaStock
MetaStock has been one of the leading programs for years. Many of data sources provide data in the MetaStock format.
Pro Con
A ready-to-work Real time
system already in unavailable
place
Widest coverage Need to have the
data already
accumulated
Ability to use 65000 bars per
existing data from symbol limitation
MetaStock
database (from
QCharts, Reuters,
eSignal etc.)
Features
· Ability to convert time between Local, Exchange and GMT
· Ability to create minute bars from ticks
Limitations
· 65000 bars per symbol limitation
Setting up 284
1. Make sure that the MetaStock Professional is installed and functioning properly.
2. In QuoteManager on the Tools menu select Data Sources....
3. Select MetaStock and click Settings....
4. Click Browse… and indicate the path to the folder storing the data.
To create a symbol using MetaStock as the Data Source see Adding Symbol(s) to Symbol list 260 section for more detailed
information.
Open E Cry
Pro Con
Reliability Lack of history
data
Direct datafeed -
Features
1. Direct fast datafeed.
2. Good market data.
Limitations
· Does not provide long historical data.
Setting up 285
1. Verify the registration information such as Login and Password received from Open E Cry.
2. Set Server and Port according to information received from Open E Cry.
3. Set Historical Data preferences.
To create a symbol using Open E Cry as the Data Source see Adding Symbol from Data Vendor Supplied List 260 section.
5.5.3.12 Patsystems
Patsystems (J-Trader)
Pro Con
Free quotes No history data
Features
· Searching for symbols by keyword
· Automated adding of symbols and the corresponding attributes to the database
· Automatic reconnection in case connection is lost
Limitations
· Patsystems (J-Trader) does not provide history data. See the Importing Data 293 section for information on gap filling
Setting up 286
1. Launch Quote Manager.
2. In the Tools menu, click Data Sources.
3. Select Patsystems (J-Trader) and click Settings.
4. Contact your broker. Inform the broker that your program uses MultiCharts as the Application ID and
FBD653F002 as Licence ID. Get from the broker the values for Host IP Address, Host Port, Price IP Address
, Price Port and enter them in the corresponding fields.
5. Indicate the Login and Password.
If your broker is experiencing problems, ask him to contact [email protected].
To create a symbol using Patsystems (J-Trader) as the Data Source see Adding from a list supplied by data vendor 260
section.
5.5.3.13 Quote.com
Quote.com
Data direct from up to 15 exchanges. More than 9 years of intraday data and 15 years of daily data for any symbol.
Pro Con
Reliable datafeed Rather expensive
Features
· Reliable datafeed
Limitations
· Symbol list for stocks and options only
Setting up 287
1. Make sure that the Quote.com account (Application-based not Browser-based) is active.
2. Launch Quote Manager.
3. In the Tools menu, click Data Sources.
4. Select QFeed and click Settings....
5. Type in the Login and Password.
To create a symbol using Quote.com as the Data Source see Adding from a list supplied by data vendor 260 section.
TradeStation 8.6
This data source is of utmost importance if there's a need to import 3rd party quotes into TradeStation 8.6.
This enables data testing on immense volumes of different data from different data providers.
Pro Con
Additional data None
import supported
Features
· Automatic launching of TradeStation 8.6 whenever a symbol or chart is queried
· Automatic downloading of symbol lists from TradeStation 8.6
Limitations
· None found
Setting up 288
1. Make sure the TradeStation 8.6 is installed and functioning properly.
2. To create a symbol using TradeStation as the Data Source see Adding from a list supplied by data vendor 260
section.
3. Do not forget to import data before using. See Importing Data 293 section for additional information.
To create a symbol using TradeStation 8.6 as the Data Source see Adding Symbol(s) to Symbol list 260 section for more
detailed information.
Trading Technologies
Industry-leader broker.
Pro Con
Reliability No history data
World-class -
execution level
Features
1. World-class execution level
2. Wide market coverage
Limitations
· Does not provide historical data.
Setting up 289
1. Set Server IP according to information received from Trading Technologies.
2. Set Password, Port, SenderCompID, and TargetCompID for order connection according to information
received from Trading Technologies.
3. Set Password, Port, SenderCompID, and TargetCompID for data connection according to information
received from Trading Technologies.
4. Set Reconnection preferences.
To create a symbol using Open E Cry as the Data Source see Adding Symbol from Data Vendor Supplied List 260 section.
Universal DDE
DDE (Dynamic Data Exchange) is a widely used protocol for exchanging data between applications in the MS Windows
environment.
Please see the developer's website for more detailed information on DDE.
Pro Con
Widest choice of Lack of historical
data sources quotes
Data Average stability
preprocessing and performance
with Excel or
other programs
possible,
additional
features such as
bad tick filtering
and creating
synthetic symbols
Features
· User-definable DDE Server/Topic/Item for Trade Price, Trade Volume, Bid Price, Bid Size, Ask Price, Ask Size
· Rapid creation, editing and application of DDE Templates
· Testing the functionality of a DDE server or a newly created template
· Support for various server types. Some DDE servers contradict the Microsoft specifications. For maximal user
convenience the program has a set of deeply customizable options (not described here). If you're not able to receive data
from a required DDE server, please write to [email protected] and our support service will aid you as soon as
possible
· Automatic reconnection in case the connection to the DDE server is lost
Limitations
· Presently the following field types are not supported: Time, Open, High, Low, Close, Total Volume, Change
· The program receives ticks only and assigns the current system time to them. Sometimes the tick's real time may differ
from the assigned one due to delay
· The Status Bar is not displayed on the chart as there aren't enough fields to chart it
Setting up 290
6. To make sure that the created template is functional, click Test. Enter the symbol name in Symbol and click
OK. If the DDE Server is running, the template is properly created and the queried symbol is accessible, you'll
see the current value for each field and the number of updates. If quotes do not arrive, check the template and
symbol name. If fixing them does not resolve the problem, please send an e-mail to [email protected]
and indicate the DDE Server, symbol and template names, confirm that an identical template functions in Excel
and share any other information you deem important.
To create a symbol using Universal DDE as the Data Source see Adding Symbol(s) to Symbol list 260 section for more
detailed information.
To use several DDE servers at once You should clone the Universal DDE and assign new settings. See Cloning Data
Sources 271 section for more detailed information.
5.5.3.17 Zen-Fire
Zen-Fire
Futures broker.
Pro Con
Reliability Lack of symbol
lookup
Unfiltered tick -
data
Features
1. Unfiltered tick data. Zen-Fire avoids dropping price data and sending only the latest updates – sometimes
referred to as "filtering". Hereby, Zen-Fire keeps the prices current and provides a true look at how the markets
are trading.
2. High quality data for Futures.
Limitations
· Zen-Fire does not provide historical data.
Setting up 292
1. Verify the registration information such as login and password received from Zen-Fire.
2. Select Sim or Live market data type.
3. No additional settings are required as the program receives data directly from Zen-Fire.
To create a symbol using Zen-Fire as the Data Source see Adding Symbol(s) to Symbol List 260 section.
Importing Data
The program supports importing from most known text (ASCII) files. The principal requirement for the file is a clear structure,
data integrity and absence of logical errors.
See Invalid ASCII files 293 section for information on the most common file faults.
The program is based on analyzing several hundreds of quote files, most in unique formats, which served as principles for file
structure analysis. Despite successful automatic recognition of over 95% of files, there are still situations requiring the user to
interfere, mostly because of improper file structure or if the program cannot make up a conclusion on its structure.
Note: For more information on known import limitations see ASCII Import Limitations 293 section. Be careful when
importing files.
How to import ASCII data 293
To import data:
1. Select a symbol (see Selecting Symbol(s) in Symbol list 260 section). If the selected symbol contains quotes
with the same timestamp as in the file, they'll be overwritten without warning. Make sure the symbol's price
scale matches the price scale of the input data file. The program always uses the symbol's price scale when
importing.
2. Make sure the file you wish to import is a 1 Tick, Minutes or 1 Day. If a file contains bars, but has no static time
increment, this is a Tick\Volume Bar file and must be processed using ASCII Mapping 299 .
3. On the File menu, click Import Data, or click the Import Data icon on the toolbar.
4. Select ASCII or press Ctrl+I.
5. Indicate the Path. The path can be typed in, pasted from the clipboard or selected using the mouse. The
selected path persists after converting the file so on next operation the previous path will be used by default. If it
is necessary to move up a level, click the Up icon. To change the method of displaying files click the rightmost
icon Views and select an option from the drop down menu.
6. Select the desired file from the indicated folder.
7. If the Contents of the selected file field the information is garbled, choose the proper encoding in the File
origin.
8. Make sure the Resolution is valid. If the value is not correct, the possible causes may be the reason:
To set date:
8.1.Click the Date column heading.
8.2.Select Date and the corresponding template.
8.3.Click Custom if there is no such template.
8.4.Create a template. If the number of symbols in the date changes, use an asterisk * to replace the symbol, e.
g. 9/9/2004 changed to 10/9/2004. The number of symbols changes from 6 to 7.
8.5.Apply the created template by selecting it from the list.
To set time:
8.6.Click the Time column heading.
8.7.Select Time and the corresponding template.
8.8.If the template does not exist, click Custom.
8.9.Create a template. If the number of symbols in the date changes, use an asterisk * to replace the symbol, e.
g. 8:30 changes to 10:10. The number of symbols changes from 4 to 5.
8.10.To set a time template, e.g. 5:22 PM, the template must look like H:MM tt@PM, where tt means the postfix
placeholder and after @ the PM value stands.
8.11.Apply the created template by selecting it from the list.
To set Start at Row You should indicate how many lines to skip.
After those parameters have been properly set, the program analyses the file again and sets the proper
Resolution.
9. Select Field Ask, Bid or Trade to define what king of data the file contains.
10.In the Time Zone please select the time zone of the quotes' origin.
11.If the price or volume needs to be multiplied or divided, select a proper factor in Price Multiplier or Volume
Multiplier.
12.To select the time period for importing data set the Start Date/Start Date Time and End Date/End Date Time.
Invalid ASCII files 293
In most cases the invalid files are lacking the required fields, lacking data in some column, mixed up time and dates,
irregular bar intervals. The program filters most faults and informs the user of them, but it is not possible in each and every
case. Please see the analysis of typical invalid files below.
Example 1. The file has a 60 minute interval, but with 1759 instead of 1800:
<TICKER>,<PER>,<DTYYYYMMDD>,<TIME>,<OPEN>,<HIGH>,<LOW>,<CLOSE>
EURUSD,I,19980420,160000,1.1005,1.1010,1.1005,1.1010
EURUSD,I,19980420,170000,1.1003,1.1003,1.1003,1.1003
EURUSD,I,19980420,175900,1.1012,1.1012,1.1012,1.1012
EURUSD,I,19980420,200000,1.1012,1.1016,1.1009,1.1015
EURUSD,I,19980420,210000,1.1017,1.1020,1.1000,1.1006
Example 2. Time is not ordered chronologically:
GBPUSD,19890627,0,2200,15457,B,N,N
GBPUSD,19890627,0,2200,15462,A,N,N
GBPUSD,19890627,1,0100,15485,B,N,N
GBPUSD,19890627,1,0100,15493,A,N,N
Exporting Data
The quotes saved in the storage can be exported to a text file (ASCII) and imported into most of existing programs. The
program allows the user to specify the necessary data columns and their order as well as the start/end date/time.
How to export data 296
To export data:
1. Select a symbol (see Selecting Symbol(s) in Symbol list 260 section). The program always uses the symbol's
Price Scale when exporting.
2. On the File menu, click Export Data, or click the Export Data icon on the toolbar.
3. Select ASCII or press Ctrl+E.
4. Select the Resolution and Field.
5. In the Time Expressed in indicate the time zone for the quotes date/time.
6. To select the time period for exporting data set the Start Date/Start Time and End Date/End Time.
7. To change column order, click the header and keep down the left mouse button as you drag the column to its
desired place.
Editing Data
This tool is necessary to review and edit data. It helps quickly find and correct the bad ticks as well as add or delete new data.
Operating with Data 297
It is possible to modify data settings, add, insert, delete and find the necessary data. All these arrangements are performed
in the Edit Data window.
Accessing Edit Data Window 297
To load the data from the data storage one should define the data settings in the Edit Data window. It is possible to select
the desired resolution type, field and time zone. One can also specify the start date/time and the end date/time for the
loaded data.
When the data is loaded it is possible to change the data values.
To modify data settings:
1. In the Data Settings section, select the necessary resolution type from the Resolution drop-down list.
2. In the Data Settings section, select the necessary field from the Field drop-down list.
Note: In the field section only those fields are displayed for which the data is collected.
3. In the Data Settings section, select the necessary time zone from the Time Zone drop-down list. 3 time zones
are available: Local, GMT and Exchange.
4. In the Data Range section, enter the necessary date in the Start field or use the drop-down calendar. Then
enter the necessary time.
Note: The time field is available with the tick and minute resolutions only.
5. In the Data Range section, enter the necessary date in the End field or use the drop-down calendar. Then
enter the necessary time.
Note: The time field is available with the tick and minute resolutions only.
6. Press the Load button and the loaded data will be displayed in the Data section.
Note: For the quotes with the tick resolution there will be displayed the Date, Time, Price and Volume
values.
Note: For the quotes with the minute resolution there will be displayed the Date, Time, Open, High, Low,
Close, Up Volume, Down Volume, Unchanged Volume, Total Volume, Up Ticks, Down Ticks,
Unchanged Ticks and Total Ticks values.
Note: For the quotes with the day resolution there will be displayed the Date, Time, Open, High, Low,
Close, Up Volume, Down Volume, Unchanged Volume, Total Volume, Up Ticks, Down Ticks,
Unchanged Ticks, Total Ticks and Open Interest values.
Adding New Data 297
Mapping ASCII
When mapping, the file path and format is indicated once, and every time a chart is created the program finds the file
automatically, converts it into the necessary format based on the preset configuration and displays the data.
How to map ASCII files 299
1. On the File menu, click Map ASCII.
2. Click Browse to indicate the path containing the files to be mapped.
3. In the Get Symbol From indicate File Name for the program to extract the symbol name from the filename. If
along with quotes the file contains the symbol name as one of the columns, indicate File's Field.
4. Use Get name from to characters, if a part of the word must be used.
5. If the symbol name needs to be edited manually, click the corresponding cell.
6. Make sure the program has correctly defined the Resolution for every file you intend to map. If you see an
error, click the hyperlinked file name. In the window that appears check:
To set date:
6.1.Click the Date column heading.
6.2.Select Date and the corresponding template.
6.3.Click Custom if there is no such template.
6.4.Create a template. If the number of symbols in the date changes, use an asterisk * to replace the symbol, e.
g. 9/9/2004 changed to 10/9/2004. The number of symbols changes from 6 to 7.
6.5.Apply the created template by selecting it from the list.
To set time:
6.6.Click the Time column heading.
6.7.Select Time and the corresponding template.
6.8.If the template does not exist, click Custom.
6.9.Create a template. If the number of symbols in the date changes, use an asterisk * to replace the symbol, e.
g. 8:30 changes to 10:10. The number of symbols changes from 4 to 5.
6.10.To set a time template, e.g. 5:22 PM, the template must look like H:MM tt@PM, where tt means the postfix
placeholder and after @ the PM value stands.
6.11.Apply the created template by selecting it from the list.
To set Start at Row You should indicate how many lines to skip.
Online mode allows to collect data without any chart creating. The unlimited number of symbols can be connected to a data
feed and the received quotes are stored in the database.
The symbol's connection status as well as the number of the quotes received is displayed in the Realtime Status column.
Connecting symbols 301
1. Select a symbol or several symbols.
Note: Use Ctrl and (or) Shift buttons to select several symbols.
3. In the Settings window select the fields and the resolution type to collect.
Note: Click the Check all button to select all the fields and resolution types.
4. Check the Apply to all symbols check box to apply these settings to all symbols.
Note: If several symbols are selected this check box will not be available.
5. Click OK.
6. Right-click anywhere on selected symbol(s) and select Connect Symbol(s)
-or -
in the menu select Edit and click Connect Symbol(s) .
Disconnecting symbols 301
1. Select the symbol(s) to be disconnected.
2. Right-click anywhere on selected symbol(s) and select Disconnect Symbol(s)
-or-
in the menu select Edit and click Disconnect Symbol(s).
Data Cache
The subsequent loading of previously created charts with multi-tick count-based resolutions is drastically accelerated by use of
"Cache" technology. Whenever the basic tick data is converted to a complex count-based resolution (for example, to 64-tick
bars), the converted data is stored in the cache for future use.
As much of the stored data segment as possible is used when another chart with the same resolution is plotted. When a
previously created chart is reloaded, the stored data is also used.
The cache can be cleared, forcing a fresh set of data to be loaded and used.
1. Open the QuoteManager by clicking the New QuoteManager Window icon on the Main toolbar.
2. Right-click on the symbol, for which the cache must be cleared, and then click Clear Cache.
3. In the dialog box that appears, click OK to clear the cache for that symbol, or click Cancel to cancel the operation.
Import Symbol List enables the user to import a text file that contains a list of symbols and their parameters. The feature allows
the user to import a list of symbols into QuoteManager quickly instead of manually adding the symbols one by one.
Preparing the Text File 303
The text file should contain four fields per row: Symbol Name, Description, Exchange, and Category. Of the four fields, only
the Symbol field is required. QuoteManager will prompt the user for the missing information during the import process. The
missing fields can also be entered manually into QuoteManager one by one after the symbol is imported.
Each field should be separated by a delimiter. The delimiter can be a comma, semi-colon, space, tab, or other character.
An example of the contents of a text file is shown below:
Symbol Name, Description, Exchange, Category
XYZ, XYZ Corporation, NYSE, Stocks
ABC, ABC Company, NASDAQ, Stocks
ESU9, S&P E-mini, GLOBEX, Futures
The order of the columns do not matter. However, each column must contain the same type of data. In the example above,
the second field of every row must be the “Description” field. The third field of every row must be the “Exchange” field.
Importing a Symbol List 303
7. Use the drop down lists to assign the column names to the columns in the text file. Select Next.
8. In the Select Data Source drop down list, select the data source for the symbols.
9. If the Exchange and Category columns were not previously assigned to a column in the text file, then use the
Exchange and Category drop-down lists to specify the information.
10.Select Finish. The symbols will be imported into QuoteManager.
6 PowerLanguage
6.1 Introduction
Introduction
PowerLanguage is an advanced programming environment for creating technical analysis indicators and trading strategies for
the MultiCharts trading platform.
PowerLanguage offers the sophisticated features sought after by the experts while still maintaining an easy learning curve for
the beginners.
By supporting TradeStation® EasyLanguage® functionality, PowerLanguage maintains the compatibility with a wide existing
base of EL studies.
As an alternative to writing indicators or strategies from scratch, existing studies can easily be modified, or new studies
assembled piece-by-piece from built-in scripts.
PowerLanguage studies can easily be created and modified by using the PowerLanguage Editor 312 is included with the
MultiCharts platform. The Editor displays usage hints as the PowerLanguage words are entered, and a detailed keyword
reference is available directly in the PowerLanguage Editor window.
PowerLanguage capabilities can further be expanded by taking advantage of external DLL support, which offers virtually
unlimited capabilities and permits the use of high-level programming languages, such as C++ or Visual Basic.
This reference explains PowerLanguage words, details the syntax, and gives one or more usage examples for each word.
Language Elements
PowerLanguage is a system of expressing financial instrument trading rules in a systematic and logical way that can be
executed by a computer.
A well-thought-out trading strategy, properly expressed in PowerLanguage, will be carried out with a far greater speed,
accuracy, and persistence then could ever be possible for a human trader.
Implementing trading strategies in PowerLanguage requires familiarity with the basic rules and structure of the language,
outlined below, as well as with the keywords described in the keyword section of this reference guide.
Price Charts
A data series consists of groups of price data points, based on a defined interval and arranged in a chronological order.
The most popular format for visually presenting a data series is a Bar Chart. Each bar, based on a group of price data points, is
a vertical line connecting the High and the Low price points, and graphically represents the range of an instrument's price
movement over a defined interval. The prices of the first (Open) and of the last (Close) price points of the group, on which the
bar is based, are indicated on the line by marks known as the bar's Open and Close components.
PowerLanguage handles price data "packaged" in the form of bars. While bars can be based on a variety of resolutions, the
point of reference is always a "bar".
For example, the following statement places a Buy order at the Open price of the next bar if the previous bar’s High was less
then the current bar's Close:
If High 1 Bar Ago < Close Then Buy Next Bar At Open;
Both time and price in the above statement are referenced in terms of bars.
This is a basic overview is intended to give the initial understanding of how PowerLanguage studies function. A more detailed
description of how a chart is evaluated is presented in the How Scripts Work 308 section.
PowerLanguage
Power language allows a combination of keywords, constants, variables, mathematical and logical operators, and punctuation
to be used to express trading rules and bring about both conditional as well as unconditional actions and output.
There are tools to accomplish a variety of tasks, from the very basic, such as:
Print("My name is Joe");
all the way to array functions available in the advanced programming languages.
Each category of PowerLanguge components is discussed below:
Keywords
Most of the keywords are the instructions, “action words”, of PowerLanguage. Keywords instruct to buy or sell, plot or erase,
compare or convert. Some of the keywords are also “nouns”, and return specific values or characteristics. A list of keywords
with detailed descriptions and examples is available in the Keyword Reference
Skip Words
Skip words are the interjections of PowerLanguage. They actually do nothing, and are skipped during code execution, but they
make PowerLanguage easier to read. In PowerLanguage Editor, skip words appear in red. A list of these words is available in
the Skip Words section of this guide.
Operators
There are four types of operators: Mathematical, Relational, Logical, and String.
Mathematical operators are used to perform mathematical operations. There are five available mathematical operators:
+ Addition
- Subtraction
* Multiplication
/ Division
() Parentheses
Relational operators are used to make comparisons. There are six relational operators:
< Less then
> Greater than
<= Less then or equal to
=> Greater than or equal to
= Equal to
<> Not equal to
Logical operators are used to perform logical (Boolean) operations. There are two available logical operators: AND and OR.
There is only one string operator, the plus sign ( + ), is used as follows to combine multiple string expressions in to one:
“String expression one ” + “and string expression two”
The resulting string expression will be:
“String expression one and string expression two”
Variables
Variables are used to store numerical, string, or logical (true/false) values. The value stored in a variable can be referenced
throughout a script by the variable’s name, and can be modified by the script at any time. Variables must be declared before
use. For more information see Variable
Arrays
Arrays are multiple-element variables. For more information see Array
PowerLanguage studies can be used with the charts created by the MultiCharts trading platform and with the Portfolio
Backtester.
PowerLanguage studies operate on price data, organized as a series of data points, based on a defined interval and arranged
in a chronological order. Each data point is a summary of a group of price points (ticks) that includes the price values of the
first and of the last tick, as well as the range of price movement over the defined interval. Data points also include additional
data, such as date and time of the last tick and trade volume.
The most popular format for visually presenting a data point is a bar. References to bars in this guide actually refer to data
points. Any other visual formats for presenting data points, such as candlesticks, points, lines, etc., can equally well be
substituted.
In this guide, references to charts are used as a visualization tool to aid in understanding how the PowerLanguage scripting
works.
PowerLanguage studies are divided in to two main types: Indicators and Signals.
An Indicator is a visual technical analysis tool, used to analyze market conditions and identify and forecast trends and market
patterns. An indicator is a visualization of a mathematical formula, and consists of one or more Plots – lines, histograms,
series of points or crosses, highs and lows, left and right ticks, or a combination of the above, displayed on a chart. Indicators
are computed using only price, volume, and (occasionally) open interest data.
A Signal is a mechanical technical analysis tool, used to systematically specify market entry or exit points according to a set of
trading rules implemented in the signal’s algorithm. The trade points are indicated on a chart by ticks and arrows. Strategies
can easily be constructed by combining a number of signals. Market entry or exit points, specified by the signals, can be used
to send orders electronically directly to a broker, fully automating the trading process.
Due to the differences in their intended purposes, Indicators and Signals evaluate price data series somewhat differently, and
will be discussed separately.
Indicators 308
The purpose of indicators is to plot visualizations of mathematical formulas on a chart. The plots are created based on one
or more price data series.
When applied to a chart, an indicator script first evaluates all the completed bars 308 one-by-one, starting with the very first
(oldest) bar on the chart. The entire script is executed once for each completed bar. On each bar, based on the results of
the evaluation, an indicator script can generate output - graph, text, plot color change, audio alert, etc. If indicator script
contains references to previous bars’ values, indicator can begin generating output starting with the first bar that follows the
Maximum number of bars a study will reference 308 .
Once all the completed bars on the chart have been evaluated, an indicator script will proceed to evaluate the last bar on
the chart on tick-by-tick basis, without waiting for the bar to be completed. An incomplete bar is a summary of all ticks
received since the previous bar was completed. Each time a new tick is received, the entire script will be executed for that
bar, until the bar is completed and the next bar is started. Indicator scripts treat incomplete bars the same way as the bars
that are completed, and can take action each time an incomplete bar is evaluated.
Please note that only the last, incomplete, bar is re-evaluated on every new tick, and not the whole series.
The process of evaluation of a bar by an indicator is called a recalculation or an update. Indicator update on every tick is
enabled by default. However, in some instances it may be undesirable for indicators to be recalculated every time a new
tick is received; updating a large number of complex indicators on every tick will require substantial system resources.
Update on Every Tick option can be turned off in the MultiCharts settings.
A bar is considered completed when it is closed and no additional ticks can be added to it.
· For time-based charts, the bar is closed once the first tick with a time stamp past the bar’s interval is received, or
if no additional ticks are received for a period of three seconds.
· For tick-based charts, the bar is closed once the defined number of ticks has been reached.
· For range-based charts, the bar is closed once the tick with a price outside of the original bar’s range has been
received.
· For volume-based charts, the bar is closed once a tick, bringing the current bar’s total to the defined number of
contracts, has been received.
· For change-based charts, the bar is closed once a tick with a price, bringing the current bar’s total number of price
changes to the defined number, has been received.
A study's script can refer to the values of previous bars for use in evaluation of the current bar. When a value of a
bar N bars ago is referenced in a script, the study can only be visualized starting with the N + 1 bar. The number of
previous bars that must be available for a script in order to start performing calculations is called Maximum number
of bars a study will reference, or MaxBarsBack. The MaxBarsBack value can be selected to be detected
automatically or set manually.
When detected automatically, MaxBarsBack will initially be set to the value of the largest data offset in the study;
however, if a variable data offset is used in the script, the initial MaxBarsBack value may prove to be too small. In
such a case, the MaxBarsBack value will automatically be increased by 5 or by a factor of 1.618, whichever yields a
higher value, and the study recalculated.
The process of automatic MaxBarsBack detection may cause some functions to be executed repeatedly for the first
few bars of a chart when a study is first applied; this can be avoided by setting the MaxBarsBack value manually.
To select the smallest MaxBarsBack value sufficient for a particular study, set the value manually. The
recommended initial MaxBarsBack value is 50.
Signals 308
Signals are the basic building blocks of strategies. Signals are substantially more complex than indicators and take in to
account a far greater number of factors. Signals compile strategy performance data and support backtesting and
Automated Trade Execution.
When applied to a chart, a signal script first evaluates all the completed bars 308 one-by-one, starting with the very first
(oldest) bar on the chart. The entire script is executed once for each completed bar. On each bar, based on the results of
the evaluation, a signal script may generate one or more trading orders. Orders are indicated by an arrow or a mark on the
chart, by a visual or an audio alert, etc. If signal script contains references to previous bars’ values, signal can begin
generating orders staring with the first bar that follows the Maximum number of bars a study will reference 308 .
By default, once all the completed bars on a chart are evaluated, the execution of a signal script is paused until a new bar is
completed (a bar is completed once an interval, defined for each bar, is over), and then the entire script is executed again
for the new bar.
This signal script execution method can be modified by selecting intra-bar order generation. With intra-bar order generation
enabled, the signal script will evaluate the last bar without waiting for the bar to be completed. Each time a new tick is
received, the last bar will be re-evaluated, until the bar is completed and the next bar is started. Incomplete bar is a
summary of all ticks received since the previous bar was completed. In intra-bar order generation mode, signal scripts treat
incomplete bars the same way as the bars that are completed, and can take actions based on evaluation of incomplete
bars.
Please note that only the last, incomplete bar is re-evaluated on every new tick, and not the whole series.
A bar is considered completed when it is closed and no additional ticks can be added to it.
· For time-based charts, the bar is closed once the first tick with a time stamp past the bar’s interval is received, or
if no additional ticks are received for a period of three seconds.
· For tick-based charts, the bar is closed once the defined number of ticks has been reached.
· For range-based charts, the bar is closed once the tick with a price outside of the original bar’s range has been
received.
· For volume-based charts, the bar is closed once a tick, bringing the current bar’s total to the defined number of
contracts, has been received.
· For change-based charts, the bar is closed once a tick with a price, bringing the current bar’s total number of price
changes to the defined number, has been received.
A study's script can refer to the values of previous bars for use in evaluation of the current bar. When a value of a
bar N bars ago is referenced in a script, the study can only be visualized starting with the N + 1 bar. The number of
previous bars that must be available for a script in order to start performing calculations is called Maximum number
of bars a study will reference, or MaxBarsBack. The MaxBarsBack value can be selected to be detected
automatically or set manually.
When detected automatically, MaxBarsBack will initially be set to the value of the largest data offset in the study;
however, if a variable data offset is used in the script, the initial MaxBarsBack value may prove to be too small. In
such a case, the MaxBarsBack value will automatically be increased by 5 or by a factor of 1.618, whichever yields a
higher value, and the study recalculated.
The process of automatic MaxBarsBack detection may cause some functions to be executed repeatedly for the first
few bars of a chart when a study is first applied; this can be avoided by setting the MaxBarsBack value manually.
To select the smallest MaxBarsBack value sufficient for a particular study, set the value manually. The
recommended initial MaxBarsBack value is 50.
A signal can place multiple orders based on evaluation of a single bar. The orders may be generated by the same or
different statement types.
The orders are executed in three groups, based on the type of statement that generated the order:
Order group execution sequence:
1. Orders generated by This Bar [On] Close statements.
2. Orders generated by Next Bar [At] Market and Next Bar [At] Open statements.
3. Orders generated by Next Bar [At] Price Limit and Next Bar [At] Price Stop statements.
The orders generated within each order group are sorted by priority based on the current position:
Order Execution Priority Table
Higher value indicates greater priority
Position Flat Long Short
Long Entry 1 1 2
Short Entry 1 2 1
Long Exit - 1 -
Short Exit - - 1
Multiple same-direction orders are assigned priority relative to each other based on the order in which the order
statements are listed in the signal script. When multiple signals are combined to create a strategy, same-direction
orders generated by different signals are assigned priority relative to each other based on the order that the signals
appear under the Signals tab in the Format Objects window.
Once the orders are sorted, the order that has the highest priority is executed. It is important to note that an entry
order in the direction, opposite to the current position, will not simply cover the position, but actually reverse it. For
example, a Long 1 order, executed for a Short 1 position, will result in a Long 1 and not in a Flat position.
Taking in to account the change in position, resulting from execution of the order, the remaining orders are sorted
again, and the order that has the highest priority is executed.
This procedure is repeated until all the orders are executed, or until none of the orders left can be executed – for
example, only Exit orders are left and the position is flat.
If the only Entry orders left are in the same direction as the current position, these orders will only be executed if
Pyramiding is enabled. Pyramiding settings allow the number of entries in the same direction to be limited to a set
number.
Any orders left that could not be executed are discarded.
Order Execution Priority example:
Multiple orders are generated, in the following order: Short exit, Short entry, Long entry, Long exit, and Long entry.
The current position is Short.
1. The orders are sorted by priority (in descending order): SX SE LE LX LE
Long entry, Long entry, Short exit, Short entry (Long exit
could not be executed).
2. Long entry is executed; the position is now Long. SX SE ü LX LE
3. The orders are sorted by priority (in descending order):
Short entry, Long entry, Long exit (Short exit could not be
executed).
4. Short entry is executed; the position is now Short. SX ü ü LX LE
Editor Overview
An integral part of the PowerLanguage programming environment, PowerLanguage Editor is a development tool for creating
and managing PowerLanguage studies.
· Creating studies
· Importing and exporting studies
· Protecting Studies
· Editing the study code and settings
· Editing data
· Compiling studies
PowerLanguage Editor also features a built-in PowerLanguage keyword reference as well as keyword help hints.
· click the Run PowerLanguage Editor icon on the MultiCharts Main toolbar, or:
· click the PowerLanguage Editor icon on the Quick Launch bar, or:
· click the PowerLanguage Editor icon on the desktop.
PowerLanguage Editor work area consists of the study script display panel in the upper left part of the work area, the navigator
panel at the upper right part of the work area, and the output panel at the bottom of the work area. Navigator and output panels
can be hidden by using the View menu.
Navigator Panel
The navigator panel can display either a list of PowerLanguage keywords, or a list of available studies. To toggle between the
keyword dictionary mode and the studies list mode, click the Studies tab or the Dictionary tab at the bottom of the navigator
panel.
Dictionary mode
A list of PowerLanguage keywords is displayed in the navigator panel. To display the information for a particular keyword,
click the keyword name in the list; the reference information will be displayed in the Help tab of the output panel.
Note: Note: Help information for a keyword can also be displayed in the Help tab of the output panel by placing the
cursor over the keyword in a study window and pressing the F1 key.
Studies mode
Available studies are organized within three subfolders: Indicators, Signals, and Functions. Additional folders can be
created by right-clicking on a root folder or on any of the subfolders, selecting Add, and then clicking New Folder. Studies
can be moved between any of the folders.
Navigator panel can be displayed or hidden by clicking View in the main menu and then selecting or clearing the Navigator
Bar checkbox.
Output panel can be displayed or hidden by clicking View in the main menu and then selecting or clearing the Output Bar
checkbox.
Arranging Study Windows 313
It is possible to arrange windows in any order. A study window can be positioned anywhere in the study code display panel
by placing the mouse pointer over the window’s title bar, holding the left mouse button, and dragging the window to the
desired position. Study windows can also be arranged automatically, much the same way as in the main MultiCharts
application, by selecting Window in the main menu and then clicking the desired option.
Switching between Windows 313
You can switch between study windows by using the CTRL+F6 keyboard shortcut.
Custom studies can be created from scratch or existing studies modified by using the PowerLanguage Editor.
Studies can be classified into three types: Indicators, Signals, and Functions.
An Indicator is a visual technical analysis tool, used to analyze market conditions and identify and forecast trends and market
patterns. An indicator is a visualization of a mathematical formula, and consists of one or more Plots – lines, histograms, series
of points or crosses, highs and lows, left and right ticks, or a combination of the above.
A Signal is a mechanical technical analysis tool, used to systematically specify market entry or exit points according to a set of
trading rules implemented in the signal's algorithm. The trade points are indicated on a chart by ticks and arrows. Signals can
be viewed as the basic building blocks of strategies.
A Function is an independent procedure (subroutine) that can be called from another script to carry out a specific task.
Creating Indicators 314
To create an indicator:
1. Open New dialog box by clicking the New icon on the toolbar, by selecting File in the main menu and
clicking New, or by using the Ctrl+N keyboard shortcut.
2. Select Indicator.
3. Enter the indicator name.
4. Click OK.
To create a signal:
1. Open New dialog box by clicking the New icon on the toolbar, by selecting File in the main menu and
clicking New, or by using the Ctrl+N keyboard shortcut.
2. Select Signal.
3. Enter the signal name.
4. Click OK.
To create a function:
1. Open New dialog box by clicking the New icon on the toolbar, by selecting File in the main menu and
clicking New, or by using the Ctrl+N keyboard shortcut.
2. Select Function.
3. Enter the function name.
4. Select the Return Type.
5. Select the Function Storage.
6. Click OK.
A list of all available studies can be viewed in the Open window. Studies' Name, Type, Status, and the last modification
date (Modified) are displayed in the list. Studies can be opened for editing, deleted, and studies' properties modified, from
the Open window.
To open the Open window:
The Open window can also be opened by selecting File in the main menu and clicking Open, or by using the Ctrl+O
keyboard shortcut.
Study List
The list of available studies, displayed in the Open window, can be set to include one or more of the following study types:
Indicators, Signals, and Functions. To select the study types to be listed, select or clear the appropriate checkboxes in the
Study Type section. In the list, each study's name, type, status, and last modification date and time are displayed in the
Name, Type, Status, and Modified columns. The list can be sorted by any column, in ascending or descending order, by
clicking on the column header:
· Name column displays the study's name.
· Type column displays the study's type: Indicator, Signal, or Function.
· Status column displays the study's status:
· Compiled - the study is ready to be used; to learn more, see Compiling Studies 320
· Protected - the study cannot be opened for editing, and the study’s code cannot be viewed; to learn more, see
Protecting Studies 320
· No status is displayed – the study has to be compiled before it can be used; to learn more, see Compiling Studies 320
· Modified column displays the date and time that the most recent study modification has been made.
To scroll through the list of studies, use the scrollbar on the right side of the list, or the UP ARROW and DOWN ARROW
keys on the keyboard.
Opening Studies 314
To open a study:
1. Open the Open window.
How? 314
To save a study in PowerLanguage Editor, click the Save icon on the toolbar. A study can also be saved by selecting
File in the main menu and clicking Save, or by using the Ctrl+S keyboard shortcut.
All studies, currently open in PowerLanguage editor, can be saved by selecting File in the main menu and clicking Save All
, or by using the Ctrl+Shift+S keyboard shortcut.
Note: If no modifications have been made to studies, the Save icon on the toolbar and Save commands will not be
available.
Renaming Studies 314
· Click the Properties icon on the toolbar; in the Properties tab of the Properties dialog box that appears, in the
Name box, enter the new study name and click OK.
· Right-click within the study’s window and then click Properties; in the Properties tab of the Properties dialog box that
appears, in the Name box, enter the new study name and click OK.
· Select File in the main menu and click Save As; in the dialog box that appears, enter the new study name and click OK.
A study can also be renamed from the Open window. To rename a study from the Open window:
1. Open the Open window.
How? 314
To delete a study:
1. Open the Open window.
How? 314
Properties window can be opened from the Open window. To open the Properties window from the Open window:
1. Open the Open window.
How? 314
In addition to supporting PowerLanguage studies, MultiCharts platform supports nearly all of EasyLanguage® studies.
MultiCharts supports Password-protected as well as Source-compiled (SEF) Study Protection.
Studies are imported and exported using the PowerLanguage Editor.
Importing Studies 318
In addition to MultiCharts native PLA (PowerLanguage Archive) format, studies in ELA, ELS, ELD, XML, and SEF formats
can be imported. Several studies can be imported simultaneously.
Note: Read-only studies in SEF (Source-compiled) format are imported using an Import Read-Only 318 procedure.
How? 318
To open the Select Files window:
2. Select one or more studies files; several files can be selected at once by holding down Ctrl or/and Shift
keys while making the selection, and all files can be selected by using the Ctrl+A keyboard shortcut.
3. Click Open or double-click the selected file.
4. In the Import Studies window that appears, in the Study Type section, select or clear Indicator, Signal,
and/or Function checkboxes to specify the types of studies to be displayed in the list.
5. Select the studies to be imported by using the checkbox to the left of the study's name, or by double-
clicking the study's name; click Select All to select all studies, and Clear All to clear all selections.
6. At the bottom left of the Import Studies window, select the Compile on import checkbox to compile
studies on import; to learn more, see Compiling Studies 320 .
7. Click OK to import the selected studies.
How? 318
To open the Export Studieswindow:
2. In the Study Type section, select or clear Indicator, Signal, and/or Function checkboxes to specify the
types of studies to be displayed in the list.
3. Select the studies to be exported by using the checkbox to the left of the study’s name, or by double-
clicking the study’s name; click Select Allto select all studies, and Clear Allto clear all selections.
4. At the bottom left of the Export Studies window, select the Select dependant function(s) checkbox to
automatically select the relevant functions.
5. Click OKto open the Exportwindow.
6. Select a path and choose the filename and type for the file to export the study or studies to, and click
Save.
Studies are PowerLanguage scripts, expressing trading rules in a systematic and logical way that can be executed by a
computer. Scripts consist of at least one, but usually more, statements. Each statement is a complete instruction. To learn
more, see PowerLanguage Elements 305
PowerLanguage scripts can be easily created and edited by using the PowerLanguage Editor. PowerLanguage Editor includes
many advanced text editing features, built-in PowerLanguage keyword reference, and a keyword hint feature.
Before a study can be applied to a chart, the study’s script must be compiled 320 . The code is compiled directly in the
PowerLanguage editor.
The script of a study can be password protected 320 ; script of a protected study can not be viewed without the password.
Text Editing Features 320
Changes to the script that were made since the editor was open or the study compiled can be undone; “undone”
changes can be redone again.
Text can be copied, cut, and pasted within the PowerLanguage Editor and between the editor and other programs.
To find text:
1. Open the Find window by clicking the Find icon on the toolbar, by using the Ctrl+F keyboard shortcut, or
by selecting Edit on the main menu and clicking Find.
2. Enter the text to be found into the Find what box.
3. Select the Match whole word only check box to find whole words only.
4. Check the Match case check box to make the search case-sensitive.
5. In the Direction section, choose Up or Down to select the search direction.
6. Click Find Next to begin the search or to find the next instance of the text.
To replace text:
1. Open the Replace window by clicking the Replace icon on the toolbar, by using the Ctrl+H keyboard
shortcut, or by selecting Edit on the main menu and clicking Replace.
2. Enter the text to be found and replaced into the Find what box.
3. Enter the replacement text into the Replace with box.
4. Select the Match whole word only check box to find whole words only.
5. Check the Match case check box to make the search case-sensitive.
6. In the Direction section, choose Up or Down to select the search direction.
7. Click Find Next to begin the search or to find the next instance of the text. Once an instance of the text to be
replaced is found, the instance is highlighted.
8. Click Replace to replace the highlighted instance of the text.
9. Click Replace All to replace all instances of the text in the current study window.
Before a study can be applied to a chart, the study's script must be compiled. In process of compilation, the correctness of
code in the script is verified. If any errors are found, the compilation process stops, and the error is highlighted. The results
of the compilation, and errors if any, are displayed under the Build tab in the lower panel.
1. To compile the script in the active window: Click the Compile toolbar icon, press the F3 key, or
select Compile in the main menu and click Compile Study Name.
2. To compile scripts of all opened studies: Select Compile in the main menu and click All Opened, or use the
Ctrl+Shift+F2 keyboard shortcut.
3. To compile any uncompiled scripts of all open studies: Select Compile in the main menu and click All
Uncompiled.
4. To compile all scripts of all studies, stored on the computer: Select Compile in the main menu and click All
Studies.
5. To compile indicators and signals only: Select Compile in the main menu and click All Indicators and Signals
Only.
Protecting Studies 320
The script of a study can be password protected; script of a protected study can not be viewed without the password.
To protect a study:
1. Select Tools in the main menu, and click Protect Study.
2. In the Password Selection dialog box that appears, enter a password and click OK.
3. Reenter the password for confirmation, and click OK to password-protect the study’s script.
Default study properties include Input Values, Style, and Maximum Bars Back settings. When a study is applied to a chart,
the default settings are used unless the user elects to set the study properties. To learn more about setting study properties in
MultiCharts, see Indicator Settings 173 and Signal Settings 178
Setting Default Indicator Input Values 322
An Input is a constant used in Indicator calculations. Indicators can have one or more inputs, or none at all. Each input is
assigned a name. There are three types of inputs: Numeric, True/False, and String. Indicators can easily be modified by
changing the input Values.
One of the main advantages of using the inputs is that basic adjustments to the indicator logic can be made be simply
changing the input values, without the need to edit the indicator code.
Most, but not all, indicators use input values.
Note: Default input values cannot be set for Signals or Functions.
To set default indicator input values:
1. Open the Properties window by one of the following methods:
To set properties:
1. Open the Properties window by one of the following methods:
To set properties:
1. Open the Properties window by one of the following methods:
2. Select the Entries or the Exits tab, to set the style of entry or exit points, respectively.
3. In each section, in the Color column, select a color for each of the components from the drop-down palette box.
4. In the Style column select the component style from the drop-down list box.
5. In the Size column select the component size from the drop-down list box; only the size of arrows and ticks can
be set.
6. Select the Use as Default check box, and click OK.
All studies based on past data use a certain number of bars for their calculations. The number of bars is called Maximum
number of bars a study will reference, or Maximum Bars Back. Either automatic Max Bars Back value detection or a set
Max Bars Back value can be specified as the default.
The default type of indicator Y-Price Scale (Axis) Type can be set from the Properties tab of the Properties window:
1. Open the Properties window by one of the following methods:
By default, an indicator can be placed into a new SubChart, or into the same SubChart as the Symbol that the indicator is
based on.
To set the default indicator SubChart:
1. Open the Properties window by one of the following methods:
An indicator can be recalculated every time a new tick is received, or only at the close of each bar. One or the other may be
more appropriate, depending on the indicator's algorithm. Updating a large number of complex indicators on every tick will
require substantial system resources
To set the default indicator update rate:
1. Open the Properties window by one of the following methods:
Editor Settings
The appearance of the PowerLanguage Editor work area can be customized. Navigator panel, Output panel, Toolbar, and
Status bar can be hidden and redisplayed. Study Window font, font size, and background color can be selected. The color of
each type of the EasyLanguage code elements and line numbers can be individually selected.
Hiding and Redisplaying Toolbars and Panels 325
To hide or redisplay a toolbar or panel, select View in the main menu and clear or select the check box next to the name of
the toolbar or panel.
Toolbars can also be hidden or redisplayed form the Editor Options window:
1. Open the Editor Options window.
How? 325
To open the Editor Options window, select Tools in the main menu and click Editor Options.
2. Select the General tab.
3. In the Display section, clear or select the check box next to the name of the toolbar or panel to hide or redisplay
that toolbar or panel.
Note: Panels can also be hidden by clicking the Close button in the corner of the toolbar.
Setting Font and Font Size 325
Font type and size can be set form the Editor Options window:
1. Open the Editor Options window.
How? 325
To open the Editor Options window, select Tools in the main menu and click Editor Options.
2. Select the General tab.
3. In the Editor section, select the font name from the drop-down list
4. Select the font size from the drop-down list.
Study Window background color, and colors of each type of the EasyLanguage code elements and line numbers can be
selected individually.
The colors can be set from form the Editor Options window:
1. Open the Editor Options window.
How? 325
To open the Editor Options window, select Tools in the main menu and click Editor Options.
2. Select the Colors tab.
3. In the Display Items list, select an EasyLanguage code element (item).
4. In the Item Color palette box, select one of the standard 40 colors, or click the More Colors button to create
custom colors; repeat for steps 3 and 4 for any additional items.
5. In the Background Color palette box, select one of the standard 40 colors for the background, or click the
More Colors button to create custom colors.
6. In the Line Numbers Color palette box, select one of the standard 40 colors for the line numbers, or click the
More Colors button to create custom colors.
#Events 548
A 718
Abort 597
Above 400
AbsValue 606
Ago 420
Alert 337
AlertEnabled 338
All 732
An 719
And 401
Arctangent 607
Array_Compare 580
Array_Copy 581
Array_GetMaxIndex 582
Array_GetType 583
Array_SetMaxIndex 584
Array_SetValRange 585
Array_Sort 586
Array_Sum 587
Array 520
Arrays 522
ArraySize 549
ArrayStartAddr 550
Arw_Delete 341
Arw_GetActive 342
Arw_GetColor 343
Arw_GetDate 344
Arw_GetDirection 345
Arw_GetFirst 346
Arw_GetNext 347
Arw_GetSize 348
Arw_GetStyle 349
Arw_GetText 350
Arw_GetTextAttribute 351
Arw_GetTextBGColor 352
Arw_GetTextColor 353
Arw_GetTextFontName 354
Arw_GetTextSize 355
Arw_GetTime_s 357
Arw_GetTime 356
Arw_GetVal 358
Arw_New_s 360
Arw_New_self_s 362
Arw_New_self 361
Arw_New 359
Arw_SetColor 363
Arw_SetLocation_s 365
Arw_SetLocation 364
Arw_SetSize 366
Arw_SetStyle 367
Arw_SetText 368
Arw_SetTextAttribute 369
Arw_SetTextBGColor 370
Arw_SetTextColor 371
Arw_SetTextFontName 372
Arw_SetTextSize 373
At 720
AutoSession 700
AvgBarsEvenTrade 763
AvgBarsLosTrade 764
AvgBarsWinTrade 765
AvgEntryPrice 766
AvgList 608
Bar 421
BarInterval 423
Bars 422
BarsSinceEntry 791
BarsSinceExit 792
BarStatus 424
BarType_ex 426
BarType 425
Based 721
BaseDataNumber 589
Begin 402
Below 403
BigPointValue 427
Black 376
Blue 377
Bool 551
Buy 733
BuyToCover 735
By 722
Byte 552
C 428
Cancel Alert 339
Category 429
Ceiling 609
Char 553
CheckAlert 340
ClearDebug 635
Close 430
Commission 817
ComputerDateTime 468
Contract 737
ContractProfit 793
Contracts 738
Cosine 610
Cotangent 611
Cover 739
Cross 404
Crosses 405
CurrentBar 431
CurrentContracts 794
CurrentDataNumber 590
CurrentDate 469
CurrentEntries 795
CurrentOpenInt 673
CurrentShares 796
CurrentTime_s 471
CurrentTime 470
Cyan 378
D 432
DailyClose 674
DailyHigh 675
DailyLimit 433
DailyLow 676
DailyOpen 677
DailyVolume 678
DarkBlue 379
DarkBrown 380
DarkCyan 381
DarkGray 382
DarkGreen 383
DarkMagenta 384
DarkRed 385
DarkYellow 386
Data 434
DataCompression 435
Date 436
DateTime2ELTime_s 473
DateTime2ELTime 472
DateTimeToString 474
DateToJulian 475
DateToString 476
Day 437
DayFromDateTime 477
DayOfMonth 478
DayOfWeek 479
DayOfWeekFromDateTime
480
Days 438
Default 643
DefineDLLFunc 554
Description 679
Does 723
Double 555
DoubleQuote 852
DownTicks 439
Downto 406
DWORD 556
EL_DateStr 481
EL_DateToDateTime 482
EL_TimeToDateTime_s 484
EL_TimeToDateTime 483
ELDateToDateTime 485
Else 407
ELTimeToDateTime_s 487
ELTimeToDateTime 486
EncodeDate 488
EncodeTime 489
End 408
Entry 740
EntryDate 797
EntryPrice 798
EntryTime 799
ExchListed 680
ExecOffset 591
ExitDate 800
ExitPrice 801
ExitTime 802
ExpirationDate 440
ExpValue 612
External 557
False 409
File 636
FileAppend 637
FileDelete 638
Fill_array 588
Float 558
Floor 613
For 410
FormatDate 490
FormatTime 492
fpCExact 598
fpCHighAccuracy 599
fpCLowAccuracy 600
fpCMedAccuracy 601
fpCVeryHighAccuracy 602
fpCVeryLowAccuracy 603
FracPortion 614
Friday 494
From 724
GetAppInfo
GetBackgroundColor 644
GetBValue 387
GetCountry 592
GetCurrency 593
GetExchangeName 441
GetGValue 388
GetPlotColor 645
GetPlotWidth 646
GetRValue 389
GetStrategyName 818
GetSymbolName 442
GetUserID 594
GradientColor 390
Green 391
GrossLoss 767
GrossProfit 768
H 443
High 444
Higher 741
HoursFromDateTime 495
i_AvgEntryPrice 769
i_ClosedEquity 770
i_CurrentContracts 771
i_CurrentShares 772
i_MarketPosition 773
i_MarketPosition_at_Broker
803
i_MarketPosition_at_Broker_fo
r_The_Strategy 804
i_OpenEquity 774
I 445
IEasyLanguageObject 559
If 411
IncMonth 496
Input 523
Inputs 524
InsideAsk 681
InsideBid 682
InStr 853
Int 560
IntPortion 615
IntrabarOrderGeneration 374
IntraBarPersist 525
Is 725
JulianToDate 497
L 446
LargestLosTrade 775
LargestWinTrade 776
Last 683
LastCalcJDate 498
LastCalcMMTime 499
LastCalcSSTime 500
LeftStr 854
LegacyColorToRGB 392
LegacyColorValue 375
LightGray 393
Limit 742
Log 616
Long 561
Low 447
Lower 743
LowerStr 855
LPBool 562
LPByte 563
LPDouble 564
LPDWORD 565
LPFloat 566
LPInt 567
LPLong 568
LPSTR 569
LPWORD 570
Magenta 394
Margin 819
Market 744
MarketPosition 805
MarketPosition_at_Broker 806
MarketPosition_at_Broker_for
_The_Strategy 807
MaxBarsBack 595
MaxBarsForward 596
MaxConsecLosers 777
MaxConsecWinners 778
MaxContractProfit 808
MaxContracts 809
MaxContractsHeld 779
MaxEntries 810
MaxIDDrawDown 780
MaxList 617
MaxList2 618
MaxPositionAgo 811
MaxPositionLoss 812
MaxPositionProfit 813
MaxShares 814
MaxSharesHeld 781
MessageLog 639
Method 571
MidStr 856
MillisecondsFromDateTime
501
MinList 619
MinList2 620
MinMove 448
MinutesFromDateTime 502
Mod 621
Monday 503
Month 504
MonthFromDateTime 505
Neg 622
NetProfit 782
NewLine 857
Next 449
NoPlot 647
Not 412
NthMaxList 623
NthMinList 624
Numeric 526
NumericArray 527
NumericArrayRef 528
NumericRef 529
NumericSeries 530
NumericSimple 531
NumEvenTrades 783
NumLosTrades 784
NumToStr 858
NumWinTrades 785
O 450
Of 726
On 727
OnCreate 572
OnDestroy 573
Open 451
OpenInt 452
OpenPositionProfit 815
Or 413
Over 414
PercentProfit 786
Place 728
PlaySound 640
Plot 648
PlotPaintBar 650
PlotPB 651
Point 453
Points 454
PointValue 455
Portfolio_CalcMaxPotentialLos
sForEntry 663
Portfolio_CurrentEntries 664
Portfolio_GetMarginPerContra
ct 668
Portfolio_GetMaxPotentialLos
sPerContract 669
Portfolio_GrossLoss 654
Portfolio_GrossProfit 655
Portfolio_MaxIDDrawdown 656
Portfolio_MaxOpenPositionPot
entialLoss 665
Portfolio_MaxRiskEquityPerPo
sPercent 670
Portfolio_NetProfit 657
Portfolio_NumLossTrades 658
Portfolio_NumWinTrades 659
Portfolio_OpenPositionProfit
666
Portfolio_PercentProfit 660
Portfolio_SetMaxPotentialLoss
PerContract 667
Portfolio_StrategyDrawdown
661
Portfolio_TotalMaxRiskEquity
Percent 671
Portfolio_TotalTrades 662
PortfolioEntriesPriority 672
Pos 625
PositionProfit 816
Power 626
PrevClose 684
PriceScale 456
Print 641
Printer 642
q_Ask 685
q_Bid 686
q_BigPointValue 687
q_Date 688
q_ExchangeListed 689
q_Last 690
q_OpenInterest 691
q_PreviousClose 692
q_Time 693
q_TotalVolume 694
RaiseRuntimeError 604
Random 627
Red 395
RegularSession 701
RGB 396
RGBToLegacyColor 397
RightStr 859
Round 628
Saturday 506
SecondsFromDateTime 507
Self 574
Sell 745
SellShort 747
Sess1EndTime 702
Sess1FirstBarTime 703
Sess1StartTime 704
Sess2EndTime 705
Sess2FirstBarTime 706
Sess2StartTime 707
SessionCount 708
SessionCountMS 709
SessionEndDay 710
SessionEndDayMS 711
SessionEndTime 712
SessionEndTimeMS 713
SessionLastBar 457
SessionStartDay 714
SessionStartDayMS 715
SessionStartTime 716
SessionStartTimeMS 717
SetBreakeven 749
SetDollarTrailing 750
SetExitOnClose 751
SetFPCompareAccuracy 605
SetPercentTrailing 752
SetPlotColor 652
SetPlotBGColor 653
SetPlotWidth 695
SetProfitTarget 753
SetStopContract 754
SetStopLoss 755
SetStopPosition 756
SetStopShare 757
Share 758
Shares 759
Short 760
Sign 629
Sine 630
Slippage 820
Spaces 860
Square 631
SquareRoot 632
Stop 761
String 532
StringArray 533
StringArrayRef 534
StringRef 535
StringSeries 536
StringSimple 537
StringToDate 508
StringToDateTime 509
StringToTime 510
StrLen 861
StrToNum 862
SumList 633
Sunday 511
Symbol 696
SymbolName 697
T 458
Tangent 634
Text_Delete 821
Text_GetActive 822
Text_GetAttribute 823
Text_GetBGColor 824
Text_GetBorder 825
Text_GetColor 826
Text_GetDate 827
Text_GetFirst 828
Text_GetFontName 829
Text_GetHStyle 830
Text_GetNext 831
Text_GetSize 832
Text_GetString 833
Text_GetTime_s 835
Text_GetTime 834
Text_GetValue 836
Text_GetVStyle 837
Text_New_s 839
Text_New_self_s 841
Text_New_self 840
Text_New 838
Text_SetAttribute 842
Text_SetBGColor 843
Text_SetBorder 844
Text_SetColor 845
Text_SetFontName 846
Text_SetLocation_s 848
Text_SetLocation 847
Text_SetSize 849
Text_SetString 850
Text_SetStyle 851
Text 863
Than 729
The 730
Then 415
This 459
Thursday 512
Ticks 460
Time_s 462
Time_s2Time 513
Time 461
Time2Time_s 514
TimeToString 515
TL_Delete 865
TL_GetActive 866
TL_GetAlert 867
TL_GetBeginDate 868
TL_GetBeginTime_s 870
TL_GetBeginTime 869
TL_GetBeginVal 871
TL_GetColor 872
TL_GetEndDate 873
TL_GetEndTime_s 875
TL_GetEndTime 874
TL_GetEndVal 876
TL_GetExtLeft 877
TL_GetExtRight 878
TL_GetFirst 879
TL_GetNext 880
TL_GetSize 881
TL_GetStyle 882
TL_GetValue_s 885
TL_GetValue 884
TL_New_s 887
TL_New_self_s 889
TL_New_self 888
TL_New 886
TL_SetAlert 890
TL_SetBegin_s 892
TL_SetBegin 891
TL_SetColor 893
TL_SetEnd_s 895
TL_SetEnd 894
TL_SetExtLeft 896
TL_SetExtRight 897
TL_SetSize 898
TL_SetStyle 899
To 416
Today 463
Tool_Dashed 900
Tool_Dashed2 901
Tool_Dashed3 902
Tool_Dotted 903
Tool_Solid 904
Total 762
TotalBarsEvenTrades 787
TotalBarsLosTrades 788
TotalBarsWinTrades 789
TotalTrades 790
TradeDate 698
TradeTime 699
True 417
TrueFalse 538
TrueFalseArray 539
TrueFalseArrayRef 540
TrueFalseRef 541
TrueFalseSeries 542
TrueFalseSimple 543
Tuesday 516
Under 418
Unsigned 575
UpperStr 864
UpTicks 464
V 465
Var 544
Variable 545
Variables 546
Vars 547
VarSize 576
VarStartAddr 577
Void 578
Volume 466
Was 731
Wednesday 517
While 419
White 398
WORD 579
Year 518
YearFromDateTime 519
Yellow 399
Yesterday 467
6.5.2 Alerts
6.5.2.1 Alert
Alert
Triggers an alert window where the necessary text can be created. The text can be dynamic, static or
absent.
Usage
Alert
Notes
· If the text isn't set in the alert then Source, Symbol, Resolution, Price is displayed
· Alerts are shown on the last bar only
· Detailed information of alerts' settings is available in Formatting Studies > Alerts
Example
This statement will call an alert without text message:
Alert;
This statement creates a dynamic alert text and displays the number of the weekday:
Alert(Text("Day of week is ", DayOfWeek(Date)));
6.5.2.2 AlertEnabled
AlertEnabled
Returns True if the alerts have been turned on in Format Study > Alerts. This information can make
script execution more efficient by discarding redundant calculations. This function can also be used
to notify the user that he will not see the alerts until the relevant option is turned on.
Usage
AlertEnabled
Notes
· Alerts are only generated for the last bar
· There is a difference between AlertEnabled and CheckAlert: AlertEnabled returns True/
False for all the bars on the chart while CheckAlert does so for the last bar only
Cancel Alert
The expression deactivates alerts. This is necessary if a script contains multiple alert statements and
they need to be turned off under certain conditions.
Usage
Cancel Alert
Notes
Alerts are only generated for the last bar
Example
The example shows how all alerts can be turned off depending on time. The alerts will not be
displayed after 10:00 pm.
If Close > Close[1] Then
Alert("Price is going up");
If Volume > Volume[1] Then
Alert("Volume is increasing");
If Volatility(5) > Volatility(5)[1] Then
Alert("Volatility is rising");
If OpenInt > OpenInt[1] Then
Alert("Open interest is growing");
If Time >= 2200 Then Cancel Alert;
6.5.2.4 CheckAlert
CheckAlert
Returns True if the alerts have been turned on in Formatting Studies > Alerts.
True/False is returned on the last bar only.
For the bars other than the last False is always returned.
Usage
CheckAlert
Notes
· There is a difference between AlertEnabled and CheckAlert. AlertEnabled checks the
status on all the bars while CheckAlert does so for the last bar only.
Example
The example below shows how CheckAlert can help eliminate redundant calculations on historic
bars as well as in cases when alerts are not turned on:
If CheckAlert Then Begin
If Volume >= 2 * Average(Volume, 10) Then Alert ("Volume is going up");
End;
Arw_Delete
Removes an arrow object with the specified ID number from a chart; returns a value of 0 if the object
was successfully removed, and a value of -2 if the specified object ID number is invalid.
Usage
Arw_Delete(ObjectID)
Where: ObjectID - a numerical expression specifying the object ID number
Notes
An object-specific ID number is returned by Arw_New 359 when the arrow object is created.
Example
Remove the arrow object with an ID number of 3:
Value1=Arw_Delete(3);
6.5.3.2 Arw_GetActive
Arw_GetActive
Returns a numerical value indicating the object ID number of the currently selected arrow object;
returns a value of -1 if no arrow objects are currently selected.
Usage
Arw_GetActive
Notes
An object-specific ID number is assigned by Arw_New 359 when the arrow object is created.
Example
Assign a value, indicating the object ID number of the currently selected arrow object, to Value1
variable:
Value1=Arw_GetActive;
6.5.3.3 Arw_GetColor
Arw_GetColor
Returns an RGB color number or a legacy color value that correspond to the color of the arrow
contained in an arrow object with the specified ID number; returns a value of -2 if the specified object
ID number is invalid.
Usage
Arw_GetColor(ObjectID)
Where: ObjectID - a numerical expression specifying the object ID number
Notes
An object-specific ID number is returned by Arw_New 359 when the arrow object is created.
Example
Assign an RGB color number, corresponding to the color of the arrow contained in an arrow object
with the ID number of 3, to Value1 variable:
Value1=Arw_GetColor(3);
Assign a legacy color value, corresponding to the color of the arrow contained in an arrow object with
the ID number of 3, to Value1 variable:
[LegacyColorValue=True];
Value1=Arw_GetColor(3);
6.5.3.4 Arw_GetDate
Arw_GetDate
Returns a numerical value, indicating the date of the bar at which an arrow object with the specified
ID number has been placed; returns a value of -2 if the specified object ID number is invalid.
The date is indicated in the YYYMMdd format, where YYY is the number of years since 1900, MM is
the month, and dd is the day of the month.
Usage
Arw_GetDate(ObjectID)
Where: ObjectID - a numerical expression specifying the object ID number
Notes
An object-specific ID number is returned by Arw_New 359 when the arrow object is created.
Example
Assign a value, indicating the date of the bar at which an arrow object with the ID number of 3 has
been placed, to Value1 variable:
Value1=Arw_GetDate(3);
6.5.3.5 Arw_GetDirection
Arw_GetDirection
Returns a logical value indicating the direction of the arrow contained in an arrow object with the
specified ID number; returns a value of True for Down arrow, and a value of False for Up arrow or if
the specified object ID number is invalid.
Usage
Arw_GetDirection(ObjectID)
Where: ObjectID - a numerical expression specifying the object ID number
Notes
An object-specific ID number is returned by Arw_New 359 when the arrow object is created.
Example
Assign a true/false value, indicating the direction of the arrow contained in an arrow object with the ID
number of 3, to DownArrow variable:
Variable:DownArrow(False);
DownArrow=Arw_GetDirection(3);
6.5.3.6 Arw_GetFirst
Arw_GetFirst
Returns a numerical value, indicating the object ID number of the oldest (the first to be added to the
current chart) arrow object of the specified origin; returns a value of -2 if the specified object ID
number is invalid.
Usage
Arw_GetFirst (Origin)
Parameters
Origin - a numerical expression specifying the origin of the arrow object:
1 - added by the current study
2 - added by a study other then the current study, or drawn manually by the user
3 - added by any study, or drawn manually by the user
4 - added by the current study, or drawn manually by the user
5 - added by a study other then the current study
6 - added by any study
7 - added manually by the user
Notes
If the oldest (the first added) arrow object is deleted, the next oldest (the second added) arrow object
becomes the oldest (the first added) arrow object.
Example
Assign a value, indicating the object ID number of the oldest arrow object added to the chart by the
current study, to Value1 variable:
Value1=Arw_GetFirst(1);
6.5.3.7 Arw_GetNext
Arw_GetNext
Returns the ID number of the first existing arrow object added subsequent to an arrow object with the
specified ID number, with both objects of a specified origin; returns a value of -2 if the specified
object ID number is invalid.
Usage
Arw_GetNext(ObjectID,Origin)
Parameters
ObjectID - a numerical expression specifying the object ID number
Origin - a numerical expression specifying the origin of the arrow objects:
1 - added by the current study
2 - added by a study other then the current study, or drawn manually by the user
3 - added by any study, or drawn manually by the user
4 - added by the current study, or drawn manually by the user
5 - added by a study other then the current study
6 - added by any study
7 - added manually by the user
Example
Assign a value to Value1 variable, indicating the ID number of the first existing arrow object added
subsequent to an arrow object with the ID number of 3, with both objects added by the current study:
Value1=Arw_GetNext(3,1);
6.5.3.8 Arw_GetSize
Arw_GetSize
Returns a numerical value indicating the size of the arrow contained in an arrow object with the
specified ID number; returns a value of -2 if the specified object ID number is invalid.
Usage
Arw_GetSize(ObjectID)
Where: ObjectID - a numerical expression specifying the object ID number
Notes
An object-specific ID number is returned by Arw_New 359 when the arrow object is created.
Example
Assign a value, indicating the size of the arrow in an arrow object with the ID number of 3, to Value1
variable:
Value1=Arw_GetSize(3);
6.5.3.9 Arw_GetStyle
Arw_GetStyle
Returns a numerical value, indicating the style of the arrow in an arrow object with the specified ID
number; returns a value of -2 if the specified object ID number is invalid.
Usage
Arw_GetStyle(ObjectID)
Where: ObjectID - a numerical expression specifying the object ID number
Notes
An object-specific ID number is returned by Arw_New 359 when the arrow object is created.
Example
Assign a value, indicating the style of the arrow in an arrow object with the ID number of 3, to Value1
variable:
Value1=Arw_GetStyle(3);
6.5.3.10 Arw_GetText
Arw_GetText
Returns a string expression corresponding to the text contained in an arrow object with the specified
ID number.
Usage
Arw_GetText(ObjectID)
Where: ObjectID - a numerical expression specifying the object ID number
Notes
An object-specific ID number is returned by Arw_New 359 when the arrow object is created.
Example
Arw_GetText(3) will return a string expression corresponding to the text contained in an arrow
object with the ID number of 3
6.5.3.11 Arw_GetTextAttribute
Arw_GetTextAttribute
Returns a logical value indicating the setting for an attribute of the text in an arrow object with the
specified ID number; returns a value of True if the attribute is set to on, and a value of False if the
attribute is set to off or if the specified object ID number is invalid.
The settings of the following attributes can be returned: border, bold, italic, strike-out, and underline.
Usage
Arw_GetTextAttribute(ObjectID,Attribute)
Parameters
ObjectID - a numerical expression specifying the object ID number
Attribute - a numerical expression specifying the attribute:
0 - border
1 - bold
2 - italic
3 - strike-out
4 - underline
Notes
An object-specific ID number is assigned by Arw_New 359 when the arrow object is created.
Example
Assign a true/false value, indicating the setting of "bold" attribute for the arrow object with an ID
number of 3, to ArwTxtBold variable:
Variable:ArwTxtBold(False);
ArwTxtBold=Arw_GetTextAttribute(3,1);
6.5.3.12 Arw_GetTextBGColor
Arw_GetTextBGColor
Returns an RGB color number or a legacy color value that correspond to the text background color of
an arrow object with the specified ID number; returns a value of -2 if the specified object ID number is
invalid.
Usage
Arw_GetTextBGColor(ObjectID)
Where: ObjectID - a numerical expression specifying the object ID number
Notes
An object-specific ID number is returned by Arw_New 359 when the arrow object is created.
Example
Assign an RGB color number, corresponding to the text background color of an arrow object with the
ID number of 3, to Value1 variable:
Value1=Arw_GetTextBGColor(3);
Assign a legacy color value, corresponding to the text background color of an arrow object with the ID
number of 3, to Value1 variable:
[LegacyColorValue=True];
Value1=Arw_GetTextBGColor(3);
6.5.3.13 Arw_GetTextColor
Arw_GetTextColor
Returns an RGB color number or a legacy color value that correspond to the color of the text
contained in an arrow object with the specified ID number; returns a value of -2 if the specified object
ID number is invalid.
Usage
Arw_GetTextColor(ObjectID)
Where: ObjectID - a numerical expression specifying the object ID number
Notes
An object-specific ID number is returned by Arw_New 359 when the arrow object is created.
Example
Assign an RGB color number, corresponding to the color of the text contained in an arrow object with
the ID number of 3, to Value1 variable:
Value1=Arw_GetTextColor(3);
Assign a legacy color value, corresponding to the color of the text contained in an arrow object with
the ID number of 3, to Value1 variable:
[LegacyColorValue=True];
Value1=Arw_GetTextColor(3);
6.5.3.14 Arw_GetTextFontName
Arw_GetTextFontName
Returns a string expression corresponding to the name of the text font assigned to an arrow object
with the specified ID number.
Usage
Arw_GetTextFontName(ObjectID)
Where: ObjectID - a numerical expression specifying the object ID number
Notes
An object-specific ID number is returned by Arw_New 359 when the arrow object is created.
Example
Arw_GetTextFontName(3) will return a string expression corresponding to the name of the text
font assigned to an arrow object with the ID number of 3
6.5.3.15 Arw_GetTextSize
Arw_GetTextSize
Returns a numerical value indicating the font size assigned to the text of an arrow object with the
specified ID number; returns a value of -2 if the specified object ID number is invalid.
Usage
Arw_GetTextSize(ObjectID)
Where: ObjectID - a numerical expression specifying the object ID number
Notes
An object-specific ID number is returned by Arw_New 359 when the arrow object is created.
Example
Assign a value, indicating the font size of the text in an arrow object with the ID number of 3, to
Value1 variable:
Value1=Arw_GetTextSize(3);
6.5.3.16 Arw_GetTime
Arw_GetTime
Returns a numerical value, indicating the time of the bar at which an arrow object with the specified
ID number has been placed; returns a value of -2 if the specified object ID number is invalid.
The time is indicated in the 24-hour HHmm format, where 1300 = 1:00 PM.
Usage
Arw_GetTime(ObjectID)
Where: ObjectID - a numerical expression specifying the object ID number
Notes
An object-specific ID number is returned by Arw_New 359 when the arrow object is created.
Example
Assign a value, indicating the time of the bar at which an arrow object with the ID number of 3 has
been placed, to Value1 variable:
Value1=Arw_GetTime(3);
6.5.3.17 Arw_GetTime_s
Arw_GetTime_s
Returns a numerical value indicating the time of the bar, including seconds, at which an arrow object
with the specified ID number has been placed; returns a value of -2 if the specified object ID number
is invalid.
The time is indicated in the 24-hour HHmmss format, where 130000 = 1:00:00 PM.
Usage
Arw_GetTime_s(ObjectID)
Where: ObjectID - a numerical expression specifying the object ID number
Notes
An object-specific ID number is returned by Arw_New_s 360 when the arrow object is created.
Example
Assign a value, indicating the time of the bar at which an arrow object with the ID number of 3 has
been placed, to Value1 variable:
Value1=Arw_GetTime_s(3);
6.5.3.18 Arw_GetVal
Arw_GetVal
Returns the price value (vertical position, corresponding to a value on the price scale of a chart), at
which an arrow object with the specified ID number has been placed; returns a value of -2 if the
specified object ID number is invalid.
Usage
Arw_GetVal(ObjectID)
Where: ObjectID - a numerical expression specifying the object ID number
Notes
An object-specific ID number is returned by Arw_New 359 when the arrow object is created.
Example
Assign a value, indicating the price value at which an arow object with the ID number of 3 has been
placed, to Value1 variable:
Value1=Arw_GetVal(3);
6.5.3.19 Arw_New
Arw_New
Displays an object, consisting of an up or a down arrow located at the specified bar and specified
price value, on the chart that the study is based on; returns an object-specific ID number, required to
modify the object.
Usage
Arw_New (BarDate, BarTime, PriceValue, Direction)
Parameters
BarDate - a numerical expression specifying the date of the bar at which the object is to be
placed; the date is indicated in the YYYMMdd format, where YYY is the number of years since
1900, MM is the month, and dd is the day of the month
BarTime - a numerical expression specifying the time of the bar at which the object is to be
placed; the time is indicated in the 24-hour HHmm format, where 1300 = 1:00 PM
PriceValue - a numerical expression specifying the price value (vertical position, corresponding
to a value on the price scale of a chart), where the object is to be placed
Direction - a logical expression specifying the direction of the arrow; True = Down and False =
Up
Example
Place, on the chart that the study is based on, an up arrow at the top of a bar if the Open price has
increased incrementally over the last three bars:
If Open>Open[1] And Open[1]>Open[2] Then
Value1=Arw_New(Date,Time,High,False);
6.5.3.20 Arw_New_s
Arw_New_s
Displays an object, consisting of an up or a down arrow located at the specified bar and specified
price value, on the chart that the study is based on; returns an object-specific ID number, required to
modify the object.
Usage
Arw_New_s (BarDate, BarTime_s, PriceValue, Direction)
Parameters
BarDate - a numerical expression specifying the date of the bar at which the object is to be
placed; the date is indicated in the YYYMMdd format, where YYY is the number of years since
1900, MM is the month, and dd is the day of the month
BarTime_s - a numerical expression specifying the time of the bar, including seconds, at which
the object is to be placed; the time is indicated in the 24-hour HHmmss format, where 130000 =
1:00:00 PM
PriceValue - a numerical expression specifying the price value (vertical position, corresponding
to a value on the price scale of a chart), where the object is to be placed
Direction - a logical expression specifying the direction of the arrow; True = Down and False =
Up
Example
Place, on the chart that the study is based on, an up arrow at the top of a bar if the Open price has
increased incrementally over the last three bars:
If Open>Open[1] And Open[1]>Open[2] Then
Value1=Arw_New_s(Date,Time_s,High,False);
6.5.3.21 Arw_New_self
Arw_New_self
Displays an object, consisting of an up or a down arrow located at the specified bar and specified
price value, on the SubChart containing the study; returns an object-specific ID number, required to
modify the object.
Usage
Arw_New_self (BarDate, BarTime, PriceValue, Direction)
Parameters
BarDate - a numerical expression specifying the date of the bar at which the object is to be
placed; the date is indicated in the YYYMMdd format, where YYY is the number of years since
1900, MM is the month, and dd is the day of the month
BarTime - a numerical expression specifying the time of the bar at which the object is to be
placed; the time is indicated in the 24-hour HHmm format, where 1300 = 1:00 PM
PriceValue - a numerical expression specifying the price value (vertical position, corresponding
to a value on the price scale of a chart), where the object is to be placed
Direction - a logical expression specifying the direction of the arrow; True = Down and False =
Up
Example
Place, on the SubChart containing the study, an up arrow at the top of a bar if the Open price has
increased incrementally over the last three bars:
If Open>Open[1] And Open[1]>Open[2] Then
Value1=Arw_New_self(Date,Time,High,False);
6.5.3.22 Arw_New_self_s
Arw_New_self_s
Displays an object, consisting of an up or a down arrow located at the specified bar and specified
price value, on the SubChart containing the study; returns an object-specific ID number, required to
modify the object.
Usage
Arw_New_self_s (BarDate, BarTime_s, PriceValue, Direction)
Parameters
BarDate - a numerical expression specifying the date of the bar at which the object is to be
placed; the date is indicated in the YYYMMdd format, where YYY is the number of years since
1900, MM is the month, and dd is the day of the month
BarTime_s - a numerical expression specifying the time of the bar, including seconds, at which
the object is to be placed; the time is indicated in the 24-hour HHmmss format, where 130000 =
1:00:00 PM
PriceValue - a numerical expression specifying the price value (vertical position, corresponding
to a value on the price scale of a chart), where the object is to be placed
Direction - a logical expression specifying the direction of the arrow; True = Down and False =
Up
Example
Place, on the SubChart containing the study, an up arrow at the top of a bar if the Open price has
increased incrementally over the last three bars:
If Open>Open[1] And Open[1]>Open[2] Then
Value1=Arw_New_self_s(Date,Time_s,High,False);
6.5.3.23 Arw_SetColor
Arw_SetColor
Assigns the specified color to the arrow contained in an arrow object with the specified ID number;
returns a value of 0 if the color was successfully assigned, and a value of -2 if the specified object ID
number is invalid.
Usage
Arw_SetColor(ObjectID,ArrowColor)
Parameters
ObjectID - a numerical expression specifying the object ID number
ArrowColor - an expression specifying the color of the arrow
The color can be specified by a numerical expression representing an RGB color number or a
legacy color value, or by one of 17 base color words.
Notes
An object-specific ID number is returned by Arw_New 359 when the arrow object is created.
Example
Assign the color blue to the arrow contained in an arrow object with the ID number of 3:
Value1=Arw_SetColor(3,Blue);
Assign the RGB color 2138336 (Orange) to the arrow contained in an arrow object with the ID
number of 3:
Value1=Arw_SetColor(3,2138336);
Assign the legacy color 4 (Green) to the arrow contained in an arrow object with the ID number of 3:
[LegacyColorValue=True];
Value1=Arw_SetColor(3,4);
6.5.3.24 Arw_SetLocation
Arw_SetLocation
Modifies the location of an arrow object with the specified ID number; returns a value of 0 if the
location of the object was successfully modified, and a value of -2 if the specified object ID number is
invalid.
Usage
Arw_SetLocation (ObjectID, BarDate, BarTime, PriceValue)
Parameters
ObjectID - a numerical expression specifying the object ID number
BarDate - a numerical expression specifying the date of the bar at which the object is to be
placed; the date is indicated in the YYYMMdd format, where YYY is the number of years since
1900, MM is the month, and dd is the day of the month
BarTime - a numerical expression specifying the time of the bar at which the object is to be
placed; the time is indicated in the 24-hour HHmm format, where 1300 = 1:00 PM
PriceValue - a numerical expression specifying the price value (vertical position, corresponding
to a value on the price scale of a chart), where the object is to be placed
Notes
An object-specific ID number is returned by Arw_New 359 when the arrow object is created.
Example
Move the arrow object with an ID number of 3 to the top of the current bar:
Value1=Arw_SetLocation(3,Date,Time,High);
6.5.3.25 Arw_SetLocation_s
Arw_SetLocation_s
Modifies the location of an arrow object with the specified ID number; returns a value of 0 if the
location of the object was successfully modified, and a value of -2 if the specified object ID number is
invalid.
Usage
Arw_SetLocation_s (ObjectID, BarDate, BarTime_s, PriceValue)
Parameters
ObjectID - a numerical expression specifying the object ID number
BarDate - a numerical expression specifying the date of the bar at which the object is to be
placed; the date is indicated in the YYYMMdd format, where YYY is the number of years since
1900, MM is the month, and dd is the day of the month
BarTime_s - a numerical expression specifying the time of the bar, including seconds, at which
the object is to be placed; the time is indicated in the 24-hour HHmmss format, where 130000 =
1:00:00 PM
PriceValue - a numerical expression specifying the price value (vertical position, corresponding
to a value on the price scale of a chart), where the object is to be placed
Notes
An object-specific ID number is returned by Arw_New_s 360 when the arrow object is created.
Example
Move the arrow object with an ID number of 3 to the top of the current bar:
Value1=Arw_SetLocation_s(3,Date,Time_s,High);
6.5.3.26 Arw_SetSize
Arw_SetSize
Assigns the specified size to the arrow contained in an arrow object with the specified ID number;
returns a value of 0 if the size was successfully assigned, and a value of -2 if the specified object ID
number is invalid.
Usage
Arw_SetSize(ObjectID,ArrowSize)
Where: ObjectID - a numerical expression specifying the object ID number
ArrowSize - a numerical expression specifying the arrow size
Notes
An object-specific ID number is returned by Arw_New 359 when the arrow object is created.
Example
Assign an arrow size of 10 to the arrow object with an ID number of 3:
Value1=Arw_SetSize(3,10);
6.5.3.27 Arw_SetStyle
Arw_SetStyle
Assigns the specified style to the arrow of an arrow object with the specified ID number; returns a
value of 0 if the arrow style was successfully modified, and a value of -2 if the specified object ID
number is invalid.
Usage
Arw_SetStyle(ObjectID,ArrowStyle)
Where: ObjectID - a numerical expression specifying the object ID number
ArrowStyle - a numerical expression specifying the arrow style; arrow styles range from 0
to 13
Notes
An object-specific ID number is returned by Arw_New 359 when the arrow object is created.
Example
Assign the arrow style of 5 to an arrow object with the ID number of 3:
Value1=Arw_SetStyle(3,5);
6.5.3.28 Arw_SetText
Arw_SetText
Adds text to, or replaces the existing text contained in an arrow object with the specified ID number;
returns a value of -2 if the specified object ID number is invalid.
Usage
Arw_SetText(ObjectID,"Text")
Where: ObjectID - a numerical expression specifying the object ID number
Text - the string expression to be displayed in the arrow object
Notes
An object-specific ID number is returned by Arw_New 359 when the arrow object is created.
Example
Add text "My Arrow" to the arrow object with an ID number of 3:
Value1=Arw_SetText(3,"My Arrow");
Replace text contained in the arrow object with an ID number of 3 with the string expression "New
Text":
Value1=Arw_SetText(3,"New Text");
6.5.3.29 Arw_SetTextAttribute
Arw_SetTextAttribute
Sets an attribute of the text in an arrow object with the specified ID number; returns a value of 0 if the
attribute was successfully set, and a value of -2 if the specified object ID number is invalid.
The following text attributes can be set: border, bold, italic, strike-out, and underline.
Usage
Arw_SetTextAttribute(ObjectID,Attribute,LogicalExpression)
Parameters
ObjectID - a numerical expression specifying the object ID number
Attribute - a numerical expression specifying the attribute:
0 - border
1 - bold
2 - italic
3 - strike-out
4 - underline
Notes
An object-specific ID number is returned by Arw_New 359 when the arrow object is created.
Example
Set the attribute "bold" to on for the text in an arrow object with the ID number of 3:
Value1=Arw_SetTextAttribute(3,1,True);
6.5.3.30 Arw_SetTextBGColor
Arw_SetTextBGColor
Assigns the specified background color to the text of an arrow object with the specified ID number;
returns a value of 0 if the color was successfully assigned, and a value of -2 if the specified object ID
number is invalid.
Usage
Arw_SetTextBGColor(ObjectID,TextBGColor)
Parameters
ObjectID - a numerical expression specifying the object ID number
TextBGColor - an expression specifying the text background color
The color can be specified by a numerical expression representing an RGB color number or a
legacy color value, or by one of 17 base color words.
Notes
An object-specific ID number is returned by Arw_New 359 when the arrow object is created.
Example
Assign the color blue to the text background of an arrow object with the ID number of 3:
Value1=Arw_SetTextBGColor(3,Blue);
Assign the RGB color 2138336 (Orange) to the text background of an arrow object with the ID
number of 3:
Value1=Arw_SetTextBGColor(3,2138336);
Assign the legacy color 4 (Green) to the text background of an arrow object with the ID number of 3:
[LegacyColorValue=True];
Value1=Arw_SetTextBGColor(3,4);
6.5.3.31 Arw_SetTextColor
Arw_SetTextColor
Assigns the specified color to the text contained in an arrow object with the specified ID number;
returns a value of 0 if the color was successfully assigned, and a value of -2 if the specified object ID
number is invalid.
Usage
Arw_SetTextColor(ObjectID,TextColor)
Parameters
ObjectID - a numerical expression specifying the object ID number
TextColor - an expression specifying the color of the text
The color can be specified by a numerical expression representing an RGB color number or a
legacy color value, or by one of 17 base color words.
Notes
An object-specific ID number is returned by Arw_New 359 when the arrow object is created.
Example
Assign the color blue to the text contained in an arrow object with the ID number of 3:
Value1=Arw_SetTextColor(3,Blue);
Assign the RGB color 2138336 (Orange) to the text contained in an arrow object with the ID number
of 3:
Value1=Arw_SetTextColor(3,2138336);
Assign the legacy color 4 (Green) to the text contained in an arrow object with the ID number of 3:
[LegacyColorValue=True];
Value1=Arw_SetTextColor(3,4);
6.5.3.32 Arw_SetTextFontName
Arw_SetTextFontName
Assigns the specified font to the text of an arrow object with the specified ID number; returns a value
of -2 if the specified object ID number is invalid.
Any font in the Fonts folder can be used; the folder is accessible from the Control Panel in Windows
XP operating system.
Usage
Arw_SetTextFontName(ObjectID,"FontName")
Where: ObjectID - a numerical expression specifying the object ID number
FontName - a string expression specifying the font name
Notes
An object-specific ID number is returned by Arw_New 359 when the arrow object is created.
Example
Assign font Verdana to the text of an arrow object with the ID number of 3:
Value1=Arw_SetTextFontName(3,"Verdana");
6.5.3.33 Arw_SetTextSize
Arw_SetTextSize
Assigns the specified font size to the text of an arrow object with the specified ID number; returns a
value of 0 if the font size was successfully assigned, and a value of -2 if the specified object ID
number is invalid.
Usage
Arw_SetTextSize(ObjectID,FontSize)
Where: ObjectID - a numerical expression specifying the object ID number
FontSize - a numerical expression specifying the font size
Notes
An object-specific ID number is returned by Arw_New 359 when the arrow object is created.
Example
Assign the font size of 16 to the text of an arrow object with the ID number of 3:
Value1=Arw_SetTextSize(3,16);
6.5.4 Attributes
6.5.4.1 IntrabarOrderGeneration
IntraBarOrderGeneration
Toggles intra-bar order generation flag on or off.
Usage
[IntrabarOrderGeneration = LogicalValue]
Where: LogicalValue - a true/false value; True = Enable; False = Disable
If the attribute is not present in the study's code, intra-bar order generation can be set by the user in
the Calculations tab of the Format Signal window.
If set to True, "Enable intra-bar order generation and calculation" check box will be checked and
grayed out, and the radio buttons will be available.
If set to False, "Enable intra-bar order generation and calculation" check box will be unchecked and
grayed out, and the radio buttons disabled.
Notes
Intra-bar order generation is currently supported for single-data series charts only. Intra-bar order
generation for multiple-data series charts will be implemented in the next release of the platform.
Attributes are applied at the time of compilation and cannot be changed at run-time.
Example
Enable intra-bar order generation:
[IntrabarOrderGeneration = True];
6.5.4.2 LegacyColorValue
LegacyColorValue
Specifies the color designation scheme to be used for interpretation of numerical color values.
Usage
[LegacyColorValue = LogicalValue]
Where: LogicalValue - a true/false value; True = Enable; False = Disable
If the attribute is set to False, or not present in the study's code, the RGB (new) 16M color scheme
will be used.
If LegacyColorValue the attribute is set to True, the legacy (old) 16-bit, 16-color scheme will be used.
Notes
When a color name is converted to a numerical color value, the specified scheme will be followed.
To ensure compatibility, the attribute [LegacyColorValue = True] is inserted automatically when older
versions, prior to v8.1, of EasyLanguage studies are imported.
Example
Enable legacy color value interpretation:
[LegacyColorValue = True];
Assign a value, representing the color Green under the legacy color scheme, to Value1 (Value1 will
be assigned a value of 4):
[LegacyColorValue = True];
Value1=Green;
Assign a value, representing the color Green under the RGB color scheme, to Value1 (Value1 will be
assigned a value of 65280):
[LegacyColorValue = False];
Value1=Green;
6.5.5 Colors
6.5.5.1 Black
Black
Constant, used to designate the color Black.
Usage
Black
Notes
The base 17 colors can be designated by constants.
Example
Create a plot using the color Black:
Plot1(Open);
SetPlotColor(1,Black);
6.5.5.2 Blue
Blue
Constant, used to designate the color Blue.
Usage
Blue
Notes
The base 17 colors can be designated by constants.
Example
Create a plot using the color Blue:
Plot1(Open);
SetPlotColor(1,Blue);
6.5.5.3 Cyan
Cyan
Constant, used to designate the color Cyan.
Usage
Cyan
Notes
The base 17 colors can be designated by constants.
Example
Create a plot using the color Cyan:
Plot1(Open);
SetPlotColor(1,Cyan);
6.5.5.4 DarkBlue
DarkBlue
Constant, used to designate the color DarkBlue.
Usage
DarkBlue
Notes
The base 17 colors can be designated by constants.
Example
Create a plot using the color DarkBlue:
Plot1(Open);
SetPlotColor(1,DarkBlue);
6.5.5.5 DarkBrown
DarkBrown
Constant, used to designate the color DarkBrown.
Usage
DarkBrown
Notes
The base 17 colors can be designated by constants.
Example
Create a plot using the color DarkBrown:
Plot1(Open);
SetPlotColor(1,DarkBrown);
6.5.5.6 DarkCyan
DarkCyan
Constant, used to designate the color DarkCyan.
Usage
DarkCyan
Notes
The base 17 colors can be designated by constants.
Example
Create a plot using the color DarkCyan:
Plot1(Open);
SetPlotColor(1,DarkCyan);
6.5.5.7 DarkGray
DarkGray
Constant, used to designate the color DarkGray.
Usage
DarkGray
Notes
The base 17 colors can be designated by constants.
Example
Create a plot using the color DarkGray:
Plot1(Open);
SetPlotColor(1,DarkGray);
6.5.5.8 DarkGreen
DarkGreen
Constant, used to designate the color DarkGreen.
Usage
DarkGreen
Notes
The base 17 colors can be designated by constants.
Example
Create a plot using the color DarkGreen:
Plot1(Open);
SetPlotColor(1,DarkGreen);
6.5.5.9 DarkMagenta
DarkMagenta
Constant, used to designate the color DarkMagenta.
Usage
DarkMagenta
Notes
The base 17 colors can be designated by constants.
Example
Create a plot using the color DarkMagenta:
Plot1(Open);
SetPlotColor(1,DarkMagenta);
6.5.5.10 DarkRed
DarkRed
Constant, used to designate the color DarkRed.
Usage
DarkRed
Notes
The base 17 colors can be designated by constants.
Example
Create a plot using the color DarkRed:
Plot1(Open);
SetPlotColor(1,DarkRed);
6.5.5.11 DarkYellow
DarkYellow
Constant, used to designate the color DarkYellow.
Usage
DarkYellow
Notes
The base 17 colors can be designated by constants.
Example
Create a plot using the color DarkYellow:
Plot1(Open);
SetPlotColor(1,DarkYellow);
6.5.5.12 GetBValue
GetBValue
Returns the Blue color component value of an RGB color number; the value ranges from 0 to 255.
Usage
GetBValue(BigRGBValue)
Where: BigRGBValue - an RGB color number from 0 to 16777215
Example
Assign a value, representing the Blue color component of the RGB color number 2138336 (Orange),
to Value1 (Value1 will be assigned a value of 32):
Value1=GetBValue(2138336);
6.5.5.13 GetGValue
GetGValue
Returns the Green color component value of an RGB color number; the value ranges from 0 to 255.
Usage
GetGValue(BigRGBValue)
Where: BigRGBValue - an RGB color number from 0 to 16777215
Example
Assign a value, representing the Green color component of the RGB color number 2138336
(Orange), to Value1 (Value1 will be assigned a value of 160):
Value1=GetGValue(2138336);
6.5.5.14 GetRValue
GetRValue
Returns the Red color component value of an RGB color number; the value ranges from 0 to 255.
Usage
GetRValue(BigRGBValue)
Where: BigRGBValue - an RGB color number from 0 to 16777215
Example
Assign a value, representing the Red color component of the RGB color number 2138336 (Orange),
to Value1 (Value1 will be assigned a value of 224):
Value1=GetRValue(2138336);
6.5.5.15 GradientColor
GradientColor
Returns an RGB color number, representing a shade of color from within a defined color range. The
gradient shade of color is determined by the value of the specified numerical expression in relation to
the defined value range.
For example, if the color range is defined as White to Black, and the value range is defined from 0 to
2, GradientColor will return an RGB color number representing White for the value of 0, Gray for the
value of 1, and Black for the value of 2. White will be returned for all values < 0, and Black for all
values > 2.
Usage
GradientColor(Value,Min,Max,StartColor,EndColor)
Where: Value – the specified numerical expression
Min – the minimum value of the value range; if Value=Min, StartColor is returned
Max – the maximum value of the value range; if Value=Max, EndColor is returned
StartColor – the starting color of the color range
EndColor – the ending color of the color range
Example
Plot an ADX indicator in Gradient Color, where Magenta gradually changes into White for the
indicator values from 5 to 50:
Variable:ADXValue(0);
ADXValue=ADX(14);
Plot1(ADXValue,"ADXValue");
SetPlotColor (1,GradientColor (ADXValue,5,50, Magenta,White));
6.5.5.16 Green
Green
Constant, used to designate the color Green.
Usage
Green
Notes
The base 17 colors can be designated by constants.
Example
Create a plot using the color Green:
Plot1(Open);
SetPlotColor(1,Green);
6.5.5.17 LegacyColorToRGB
LegacyColorToRGB
Returns an RGB color number that corresponds to the specified legacy color value; the number
ranges from 0 to 16777215.
Usage
LegacyColorToRGB(LegacyColorValue)
Where: LegacyColorValue - a legacy color value from 1 to 16
Example
Assign a value, representing the color 4 (Green) under the legacy color scheme, to Value1 (Value1
will be assigned a value of 65280):
Value1 = LegacyColorToRGB(4);
6.5.5.18 LightGray
LightGray
Constant, used to designate the color LightGray.
Usage
LightGray
Notes
The base 17 colors can be designated by constants.
Example
Create a plot using the color LightGray:
Plot1(Open);
SetPlotColor(1,LightGray);
6.5.5.19 Magenta
Magenta
Constant, used to designate the color Magenta.
Usage
Magenta
Notes
The base 17 colors can be designated by constants.
Example
Create a plot using the color Magenta:
Plot1(Open);
SetPlotColor(1,Magenta);
6.5.5.20 Red
Red
Constant, used to designate the color Red.
Usage
Red
Notes
The base 17 colors can be designated by constants.
Example
Create a plot using the color Red:
Plot1(Open);
SetPlotColor(1,Red);
6.5.5.21 RGB
RGB
Returns an RGB color number that corresponds to the specified combination of red, green, and blue
component color values; the number ranges from 0 to 16777215 and represents one of 16 M colors.
Usage
RGB (Red,Green,Blue)
Where: Red – a numerical value from 0 to 255, specifying the Red component of the RGB color
Green – a numerical value from 0 to 255, specifying the Green component of the RGB color
Blue – a numerical value from 0 to 255, specifying the Blue component of the RGB color
Example
Create an Orange color plot using the RGB color combination:
Plot1(Open);
SetPlotColor(1,RGB(224,160,32));
6.5.5.22 RGBToLegacyColor
RGBToLegacyColor
Returns the legacy color value that most closely matches the specified RGB color number; the value
ranges from 0 to 16.
Usage
RGBToLegacyColor(RGBColorValue)
Where: RGBColorValue - an RGB color number from 0 to 16777215
Example
Assign a value, representing the color 65280 (Green) under the RGB color scheme, to Value1
(Value1 will be assigned a value of 4):
Value1=RGBToLegacyColor(65280);
6.5.5.23 White
White
Constant, used to designate the color White.
Usage
White
Notes
The base 17 colors can be designated by constants.
Example
Create a plot using the color White:
Plot1(Open);
SetPlotColor(1,White);
6.5.5.24 Yellow
Yellow
Constant, used to designate the color Yellow.
Usage
Yellow
Notes
The base 17 colors can be designated by constants.
Example
Create a plot using the color Yellow:
Plot1(Open);
SetPlotColor(1,Yellow);
Above
Used in combination with Cross 404 to specify the direction of the cross.
Above specifies an upward (lesser to a greater value) direction.
The plot of A is defined as having crossed Above the plot of B if the value of A is greater than the
value of B and one of the following is true:
a) The value of A was less than the value of B on the bar immediately preceding the current bar
or
b) The values of A and B were equal for a consecutive sequence of one or more bars immediately
preceding the current bar and the value of A was less than the value of B on the bar immediately
preceding this sequence of bars.
Usage
E1 Cross Above E2
or:
Plot1 Cross Above Plot2
Where: E - a numerical expression
Example
Trigger an alert on the bar where the Close price crosses above 1350.00:
Plot1(Close);
If Plot1 Cross Above 1350.50 Then
Alert("Price has crossed above 1350.00");
6.5.6.2 And
And
A logical (Boolean) operator that returns True only if both of its operands are true. Logical operators
are used in logical (Boolean) expressions that operate with true/false values.
Usage
E1 And E2
Where: E - true/false expressions
Example
2=1 And 2=2 will return a value of False
True And True And True will return a value of True
6.5.6.3 Begin
Begin
Used in combination with End 408 to group instructions for conditional execution; a Begin must
always be followed by an End.
Begin and End can be used with Then, Else, For, and While conditional statements.
Begin should not be followed by a semicolon (;), code lines within an instruction group should end
with a semicolon (;), and only the last instance of End within the same conditional execution
statement should be followed by a semicolon (;).
Usage
CS Begin
I1;
I2;
I3;
End;
Where: CS - conditional statement
I - conditional instructions
Example
If UpTrend is true then buy, otherwise sell short:
6.5.6.4 Below
Below
Used in combination with Cross 404 to specify the direction of the cross.
Below specifies a downward (greater to a lesser value) direction.
The plot of A is defined as having crossed Below the plot of B if the value of A is less than the value
of B and one of the following is true:
a) The value of A was more than the value of B on the bar immediately preceding the current bar,
or
b) The values of A and B were equal for a consecutive sequence of one or more bars immediately
preceding the current bar and the value of A was more than the value of B on the bar immediately
preceding this sequence of bars.
Usage
E1 Cross Below E2
or:
Plot1 Cross Below Plot2
Where: E - a numerical expression
Example
Trigger an alert on the bar where the Close price crosses below 1350.00:
Plot1(Close);
If Plot1 Cross Below 1350.50 Then
Alert("Price has crossed below 1350.00");
6.5.6.5 Cross
Cross
Returns a value of True if, on the current bar, the plot of a numerical expression A crossed the plot
of a numerical expression B in the specified direction.
Above, Over, Below, or Under parameters specify the direction of the cross; Above and Over are
transposable and specify an upward (lesser to a greater value) direction, and Below and Under are
transposable and specify a downward (greater to a lesser value) direction.
The plot of A is defined as having crossed Above or Over the plot of B if the value of A is greater
than the value of B and one of the following is true:
a) The value of A was less than the value of B on the bar immediately preceding the current bar
or
b) The values of A and B were equal for a consecutive sequence of one or more bars immediately
preceding the current bar and the value of A was less than the value of B on the bar immediately
preceding this sequence of bars.
The plot of A is defined as having crossed Below or Under the plot of B if the value of A is less than
the value of B and one of the following is true:
a) The value of A was more than the value of B on the bar immediately preceding the current bar,
or
b) The values of A and B were equal for a consecutive sequence of one or more bars immediately
preceding the current bar and the value of A was more than the value of B on the bar immediately
preceding this sequence of bars.
Usage
E1 Cross Direction E2
or:
Plot1 Cross Direction Plot2
Where: E - a numerical expression
Direction - a required parameter; specifies the direction of the cross
Example
Trigger an alert on the bar where the Close price crosses above 1350.00:
Plot1(Close);
If Plot1 Cross Above 1350.50 Then
Alert("Price has crossed above 1350.00");
6.5.6.6 Crosses
Crosses
Same as Cross 404
6.5.6.7 Downto
DownTo
Used in combination with For 410 to form a loop statement that will execute a set of instructions
repeatedly until the loop count reaches the specified final value.
DownTo specifies that the value of the counter variable is to be decreased by one on the completion
of each loop.
For more information see For 410 .
Usage
For Counter=IValue DownTo FValue Begin
I1;
I2;
End;
Where: Counter - a numerical variable used store the loop count
IValue - a numerical expression specifying the initial counter value
FValue - a numerical expression specifying the final counter value
Example
Add the high prices of the last 10 bars to the HighPriceSum variable:
For BarBackNo=9 DownTo 0 Begin
HighPriceSum=HighPriceSum+High[BarBackNo];
End;
6.5.6.8 Else
Else
Used in combination with If 411 and Then 415 to form a conditional statement that executes specific
instructions if a logical expression is false.
The conditional execution statement must contain both If and Then in addition to Else.
For more information see If 411 .
Usage
If E Then I1 Else I2
Where: E - a true/false expression
I - conditional instructions
Example
If UpTrend is true then buy and if UpTrend is false then sell short:
If UpTrend Then Buy Next Bar Market Else SellShort Next Bar Market;
6.5.6.9 End
End
Used in combination with Begin to group instructions for conditional execution; an End must always
be preceded by a Begin. Begin and End can be used with Then, Else, For, and While
conditional statements.
Only the last instance of End within the same conditional execution statement should be followed by
a semicolon (;).
Usage
CS Begin
I1;
I2;
I3;
End;
Where: CS - conditional statement
I - conditional instructions
Example
If UpTrend is true then buy, otherwise sell short:
If UpTrend Then Begin
Buy Next Bar Market;
End
Else Begin
SellShort Next Bar Market;
End;
6.5.6.10 False
False
A logical (Boolean) value. Logical values are used in logical (Boolean) expressions and for true/false
inputs.
Usage
False
Example
False And True will return a value of False
2=1 will return a value of False
6.5.6.11 For
For
Used in combination with To or DownTo to form a loop statement that will execute a set of
instructions repeatedly until the loop count reaches the specified final value.
The loop statement specifies a numerical variable that holds the loop count, as well as initial and final
counter values. To specifies that the value of the counter variable is to be increased by one on the
completion of each loop, while DownTo specifies that the value of the counter variable is to be
decreased by one on the completion of each loop.
The use of Begin and End statements is required to group the instructions for execution within the
loop; a Begin must always be followed by an End.
Begin should not be followed by a semicolon (;), code lines within an instruction group should end
with a semicolon (;), and End should be followed by a semicolon (;).
Usage
For Counter=IValue To FValue Begin
I1;
I2;
End;
or:
For Counter=IValue DownTo FValue Begin
I1;
I2;
End;
Where: Counter - a numerical variable used store the loop count
IValue - a numerical expression specifying the initial counter value
FValue - a numerical expression specifying the final counter value
Example
Add the high prices of the last 10 bars to the HighPriceSum variable:
For BarBackNo=0 To 9 Begin
HighPriceSum=HighPriceSum+High[BarBackNo];
End;
Add the high prices of the last 10 bars to the HighPriceSum variable: For BarBackNo=9 DownTo
0 Begin
HighPriceSum=HighPriceSum+High[BarBackNo];
End;
6.5.6.12 If
If
Used in combination with Then to form a conditional statement that executes specific instructions if a
logical expression is true, and with Else to form a conditional statement that executes specific
instructions if a logical expression is false.
The conditional execution statement must contain both If and Then; Else is optional.
Begin and End statements are used to group instructions for conditional execution; a Begin must
always be followed by an End.
Begin should not be followed by a semicolon (;), code lines within an instruction group should end
with a semicolon (;), and only the last instance of End within the same conditional execution
statement should be followed by a semicolon (;).
Usage
If E Then I1 Else I2
or:
If E Then Begin
I1;
I2;
End
Else Begin
I3;
I4;
End;
Where: E - a true/false expression
I - conditional instructions
Example
If UpTrend is false then sell:
If UpTrend=False Then Sell Next Bar Market;
6.5.6.13 Not
Not
Reserved for future use
6.5.6.14 Or
Or
A logical (Boolean) operator that returns True if one or both of its operands are true. Logical
operators are used in logical (Boolean) expressions that operate with true/false values.
Usage
E1 Or E2
Where: E - true/false expressions
Example
2=1 Or 2>2 will return a value of False
True Or False Or False will return a value of True
6.5.6.15 Over
Over
Same as Above 400
6.5.6.16 Then
Then
Used in combination with If to form a conditional statement that executes specific instructions if a
logical expression is true.
For more information see If 411 .
Usage
If E Then I
Where: E - a true/false expression
I - conditional instructions
Example
If UpTrend is false then sell:
If UpTrend=False Then Sell Next Bar Market;
6.5.6.17 To
To
Used in combination with For to form a loop statement that will execute a set of instructions
repeatedly until the loop count reaches the specified final value.
To specifies that the value of the counter variable is to be increased by one on the completion of
each loop.
For more information see For 410 .
Usage
For Counter=IValue To FValue Begin
I1;
I2;
End;
Where: Counter - a numerical variable used store the loop count
IValue - a numerical expression specifying the initial counter value
FValue - a numerical expression specifying the final counter value
Example
Add the high prices of the last 10 bars to the HighPriceSum variable:
For BarBackNo=0 To 9 Begin
HighPriceSum=HighPriceSum+High[BarBackNo];
End;
6.5.6.18 True
True
A logical (Boolean) value. Logical values are used in logical (Boolean) expressions and for true/false
inputs.
Usage
True
Example
True Or False will return a value of True
2=2 will return a value of True
6.5.6.19 Under
Under
Same as Below 403
6.5.6.20 While
While
Used in combination with Begin and End to form a conditional loop statement that will execute a set
of instructions repeatedly as long as a logical expression is true. If the logical expression is not true,
the instructions will not be executed.
Begin and End statements are used to group instructions for conditional execution; a Begin must
always be followed by an End.
Begin should not be followed by a semicolon (;), code lines within an instruction group should end
with a semicolon (;), and End should be followed by a semicolon (;).
Usage
While E Begin
I1;
I2;
I3;
End;
Where: E - a true/false expression
I - conditional instructions
Example
Add the high prices of the last 10 bars to the HighPriceSum variable:
BarBackNo=0;
While BarBackNo<10 Begin
HighPriceSum=HighPriceSum+High[BarBackNo];
BarBackNo=BarBackNo+1;
End;
Ago
Used in combination with Bar 421 or Bars 422 and a numerical expression to reference the bar a
specified number of bars back from the current bar.
Bars Ago can also be specified by using the bar offset notation that consists of a numerical
expression enclosed in square brackets.
Usage
N Bars Ago
or:
[N]
Where: N - a numerical expression specifying the number of bars back to reference
Example
Plot the closing price of the previous bar:
Plot1(Close Of 1 Bar Ago, "Previous bar's close");
6.5.7.2 Bar
Bar
Used in combination with This 459 , Next 449 , or Ago 420 to reference a specific bar.
Usage
Bar
Example
Close Of 1 Bar Ago will return the closing price of the previous bar
6.5.7.3 Bars
Bars
Same as Bar 421
6.5.7.4 BarInterval
BarInterval
Returns a numerical value, indicating the number of resolution units (bar interval) of the data series
that the study is applied to.
Returns the number of Ticks, Contracts, Points, Changes, Seconds, Minutes, Hours, Days, Weeks,
Months, Quarters, or Years, depending on the chart resolution; a value of 5 will be returned for a 5-
second as well as for a 5-tick chart.
Usage
BarInterval
Example
Assign a value, indicating the number of resolution units (bar interval) of the data series that the
study is applied to, to Value1 variable:
Value1=BarInterval;
6.5.7.5 BarStatus
BarStatus
Returns a numerical value, indicating the status of the most recent tick in the current bar of the
specified data series.
A value of 0 indicates that the tick is the opening tick of the bar, 1 indicates that the tick is within the
bar, and 2 indicates that the tick is the closing tick of the bar.
Usage
BarStatus(DataNum)
Where: DataNum - a numerical expression specifying the data number of the series
If DataNum is not specified, a value for the current data series will be returned.
Example
BarStatus(1) will return a value of 2 if the current tick in the data series with the data number 1 is
the closing tick of a bar
6.5.7.6 BarType
BarType
Returns a numerical value, indicating the resolution units of the data series that the study is applied
to.
Usage
BarType
The following values are returned for each type of resolution units:
0 – Ticks (Ticks & Contracts)
1 – Intra-Day (Seconds, Minutes, & Hours)
2 – Days
3 – Weeks
4 – Months, Quarters, & Years
5 – Points & Changes
Example
Assign a value, indicating the resolution units of the data series that the study is applied to, to Value1
variable:
Value1=BarType;
6.5.7.7 BarType_ex
BarType_ex
An extended version of BarType 425 . Indicates the resolution units more specifically.
Returns a numerical value, indicating the resolution units of the data series that the study is applied
to.
Usage
BarType_ex
The following values are returned for each type of resolution units:
1 – Ticks
2 – Minutes
3 – Hours
4 – Days
5 – Weeks
6 – Months
7 – Years
8 – Volume
9 – Seconds
10 – Quarters
11 – Points
12 – Change
13 – Points (original)
Example
Assign a value, indicating the resolution units of the data series that the study is applied to, to Value1
variable:
Value1=BarType_ex;
6.5.7.8 BigPointValue
BigPointValue
Returns a numerical value, indicating the currency value of a single whole unit price change for the
data series that the study is applied to.
Usage
BigPointValue
Notes
BigPointValue = PointValue 455 × PriceScale 456
Example
BigPointValue will return 1 for Google
BigPointValue will return 50 for E-mini S&P 500
6.5.7.9 C
C
Same as Close 430
6.5.7.10 Category
Category
Returns a numerical value, indicating the category (financial instrument type) of the symbol that study
is applied to.
Usage
Category
The following values are returned for each category:
0 – Future
1 – Future Option
2 – Stock
3 – Stock Option
4 – Index
5 – Currency Option
6 – Mutual Fund
7 – Money Market Fund
8 – Index Option
9 – Cash
10 – Bond
11 – Spread
12 – Forex
14 – Composite
Example
Assign a value, indicating the type of symbol that the study is applied to, to Value1 variable:
Value1=Category;
6.5.7.11 Close
Close
Returns the closing price.
Usage
Close
Example
Plot the closing price of the current bar:
Plot1(Close,"Close");
6.5.7.12 CurrentBar
CurrentBar
Returns the number of the current bar.
Each bar, subsequent to the initial number of bars specified by the Maximum Bars Back setting, is
assigned a sequential number; the initial bars specified by the setting are not numbered.
For example, if Maximum Bars Back is set to 20, the 21st bar will be assigned a number of 1.
Usage
CurrentBar
Example
CurrentBar will return the number of the current bar
6.5.7.13 D
D
Same as Date 436
6.5.7.14 DailyLimit
DailyLimit
Retained for backward compatibility.
6.5.7.15 Data
Data
Used to specify a particular data series in a multi-symbol chart; each data series in a multi-symbol
chart has a unique Data Number.
Usage
DataN
Where: N - the Data Number of the data series
Or:
Data(N)
Where: N - a numerical expression specifying the Data Number of the data series
Example
High Of Data2 will return the high price of a bar in the data series with the Data Number of 2
High Of Data(2) will return the high price of a bar in the data series with the Data Number of 2
6.5.7.16 DataCompression
DataCompression
Same as BarType 425
6.5.7.17 Date
Date
Returns a numerical value indicating the closing date of a bar. The date is indicated in the YYYMMdd
format, where YYY is the number of years since 1900, MM is the month, and dd is the day of the
month.
Usage
Date
Example
Date will return a value of 1071030 for October 30th, 2007
Date will return a value of 990402 for April 2th, 1999
6.5.7.18 Day
Day
Retained for backward compatibility; replaced with Bar 421 .
6.5.7.19 Days
Days
Retained for backward compatibility; replaced with Bar 421 .
6.5.7.20 DownTicks
DownTicks
Returns the total number of Down ticks for the current bar if Build Volume On is set to Tick Count.
Returns the total Down volume for the current bar if Build Volume On is set to Trade Volume.
A down tick is a tick with the price lower then the preceding tick, and down volume is the volume
traded on down ticks.
Usage
DownTicks
Example
Plot the number of Down ticks in the current bar (Build Volume On is set to Tick Count):
Plot1(DownTicks,"Down Ticks");
Plot the Down volume of the current bar (Build Volume On is set to Trade Volume):
Plot1(DownTicks,"Down Volume");
6.5.7.21 ExpirationDate
ExpirationDate
Returns a numerical value, indicating the expiration date of the financial instrument the study is
applied to. The date is indicated in the YYYMMdd format, where YYY is the number of years since
1900, MM is the month, and dd is the day of the month.
For example, the value returned for the date of October 30th, 2008 will be 1081030, and for April 2nd,
1999 will be 990402.
Usage
ExpirationDate
A valid expiration date will be returned for futures or options only.
Example
ExpirationDate will return a value of 1081030 for October 30th, 2008
ExpirationDate will return a value of 990402 for April 2nd, 1999
6.5.7.22 GetExchangeName
GetExchangeName
Returns a string expression containing the exchange name for the symbol that the study is applied to.
Usage
GetExchangeName
Example
GetExchangeName will return "NASD" for Google
GetExchangeName will return "CME" for E-mini S&P 500
6.5.7.23 GetSymbolName
GetSymbolName
Returns a string expression containing the name of the symbol that the study is applied to.
Usage
GetSymbolName
Example
GetSymbolName will return "GOOG" for Google
6.5.7.24 H
H
Same as High 444
6.5.7.25 High
High
Returns the high price.
Usage
High
Example
Plot the high price of the current bar:
Plot1(High,"High");
6.5.7.26 I
I
Same as OpenInt 452
6.5.7.27 L
L
Same as Low 447
6.5.7.28 Low
Low
Returns the low price.
Usage
Low
Example
Plot the low price of the current bar:
Plot1(Low,"Low");
6.5.7.29 MinMove
MinMove
Returns a numerical value, indicating the minimum fractional unit price change for the data series
that the study is applied to.
Usage
MinMove
Example
MinMove will return 1 for Google
MinMove will return 25 for E-mini S&P 500
MinMove*PointValue will return the currency value, corresponding to the minimum price move of
a share or contract
6.5.7.30 Next
Next
Used in combination with Bar 421 to reference the next bar.
Usage
Next Bar
Example
Buy a user-set number of shares at Market price on open of next bar:
Buy Next Bar At Market;
6.5.7.31 O
O
Same as Open 451
6.5.7.32 Open
Open
Returns a numerical value indicating the open open price.
Usage
Open
Example
Plot the open price of the current bar:
Plot1(Open,"Open");
6.5.7.33 OpenInt
OpenInt
Returns the open interest of the current bar for tick and volume-based charts, and for time-based
charts with resolutions of 24 hours or less:
- the volume traded on Down ticks will be returned if Build Volume On is set to Trade Volume
- the number of Down ticks in the current bar will be returned if Build Volume On is set to Tick
Count
OpenInt is not supported for time-based charts with resolutions of 1 day or more.
Please note that most data feeds provide only a limited history of volume and tick data; storing real-
time feed data will ensure the availability of historical volume and tick data.
Usage
OpenInt
Example
Plot the open interest of the current bar:
Plot1(OpenInt,"Open interest");
6.5.7.34 Point
Point
Returns a decimal numerical value, equivalent to a single fractional price unit for the data series that
the study is applied to.
Usage
Point
Notes
Point = 1/PriceScale 456
Example
1 Point will return 0.01 for Google
8 Point will return 0.08 for E-mini S&P 500
8 Point will return 0.25 for T-Bond Futures
6.5.7.35 Points
Points
Same as Point 453
6.5.7.36 PointValue
PointValue
Returns a numerical value, indicating the currency value of a single fractional unit price change for
the data series that the study is applied to.
Usage
PointValue
Notes
PointValue = BigPointValue 427 /PriceScale 456
Example
PointValue will return 0.01 for Google
PointValue will return 0.50 for E-mini S&P 500
6.5.7.37 PriceScale
PriceScale
Returns a numerical value, indicating the fractional unit equivalent of a single whole unit price change
for the data series that the study is applied to.
Usage
PriceScale
Notes
PriceScale = BigPointValue 427 /PointValue 455
Example
PriceScale will return 100 for Google
PriceScale will return 32 for T-Bond Futures
6.5.7.38 SessionLastBar
SessionLastBar
Returns a logical value indicating whether the current bar is the last bar of the session;
returns a value of True if the current bar is the last bar of the session, and a value of False if
the current bar is not the last bar of the session.
Usage
SessionLastBar
Example
Assign a true/false value, indicating whether the current bar is the last bar on the chart, to
LastBar variable:
Variable:LastBar(False);
LastBar=SessionLastBar;
6.5.7.39 T
T
Same as Time 461
6.5.7.40 This
This
Used in combination with Bar 421 to reference the current bar.
Usage
This Bar
Example
Buy a user-set number of shares on close of this bar:
Buy This Bar On Close;
6.5.7.41 Ticks
Ticks
Returns the total number of ticks for the current bar if Build Volume On is set to Tick Count.
Returns the total volume for the current bar if Build Volume On is set to Trade Volume.
With Build Volume On is set to Tick Count:
- the value of 1 will be returned for 1-tick charts
- the total number of ticks in the current bar will be returned for multi-tick, volume, and time-based
charts
With Build Volume On is set to Trade Volume:
- the volume of the current tick will be returned for 1-tick charts
- the total volume of the current bar will be returned for multi-tick, volume, and time-based charts
Please note that most data feeds provide only a limited history of tick and volume data; storing real-
time feed data will ensure the availability of historical tick and volume data.
Usage
Ticks
Example
Plot the number of ticks in the current bar (Build Volume On is set to Tick Count):
Plot1(Ticks,"Ticks");
Plot the volume of the current bar (Build Volume On is set to Trade Volume):
Plot1(Ticks,"Volume");
6.5.7.42 Time
Time
Returns a numerical value indicating the closing time of the current bar. The time is indicated in the
24-hour HHmm format, where 1300 = 1:00 PM.
Usage
Time
Example
Time will return a value of 1015 for 10:15 AM
Time will return a value of 1545 for 3:45 PM
6.5.7.43 Time_s
Time_s
Returns a numerical value indicating the closing time, including seconds, of the current bar. The time
is indicated in the 24-hour HHmmss format, where 130000 = 1:00:00 PM.
Usage
Time_s
Example
Time_s will return a value of 101525 for 10:15:25 AM
Time_s will return a value of 154500 for 3:45:00 PM
6.5.7.44 Today
Today
Retained for backward compatibility; replaced with This Bar 459
6.5.7.45 UpTicks
UpTicks
Returns the total number of Up ticks for the current bar if Build Volume On is set to Tick Count.
Returns the total Up volume for the current bar if Build Volume On is set to Trade Volume.
An up tick is a tick with the price higher then the preceding tick, and up volume is the volume traded
on up ticks.
With build volume on is set to tick count:
- the value of 1 will be returned for 1-tick charts
- the total number of Up ticks in the current bar will be returned for multi-tick, volume, and time-
based charts
Example
Plot the number of Up ticks in the current bar (Build Volume On is set to Tick Count):
Plot1(UpTicks,"Up Ticks");
Plot the Up volume of the current bar (Build Volume On is set to Trade Volume):
Plot1(UpTicks,"Up Volume");
6.5.7.46 V
V
Same as Volume 466
6.5.7.47 Volume
Volume
Returns the volume of the current bar.
For tick and volume-based charts, and time-based charts with resolutions of 24 hours or less:
- the volume traded on Up ticks will be returned if Build Volume On is set to Trade Volume
- the number of Up ticks in the current bar will be returned if Build Volume On is set to Tick Count
For time-based charts with resolutions of 1 day or more:
- the total volume traded will be returned if Build Volume On is set to Trade Volume
- the total number of ticks in the current bar will be returned if Build Volume On is set to Tick Count
Please note that most data feeds provide only a limited history of volume and tick data; storing real-
time feed data will ensure the availability of historical volume and tick data.
Usage
Volume
Example
Plot the volume of the current bar:
Plot1(Volume,"Volume");
6.5.7.48 Yesterday
Yesterday
Retained for backward compatibility.
ComputerDateTime
Returns a double-precision decimal DateTime value indicating the computer's current date and time.
The integer portion of the DateTime value indicates the number of days that have elapsed since
January 1st, 1900, and the fractional portion of the DateTime value indicates the fraction of the day
that has passed since midnight.
Usage
ComputerDateTime
Example
ComputerDateTime will return a value of 39448.25000000 for 6:00 AM on January 1st, 2008
6.5.8.2 CurrentDate
CurrentDate
Returns a numerical value indicating the computer's current date. The date is indicated in the
YYYMMdd format, where YYY is the number of years since 1900, MM is the month, and dd is the
day of the month.
For example, the value returned for the date of October 30th, 2008 will be 1081030.
Usage
CurrentDate
Example
CurrentDate will return a value of 1081030 for October 30th, 2008
6.5.8.3 CurrentTime
CurrentTime
Returns a numerical value, indicating the computer's current time. The time is indicated in the 24-
hour HHmm format, where 1300 = 1:00 PM.
Usage
CurrentTime
Example
CurrentTime will return a value of 1015 for 10:15 AM
CurrentTime will return a value of 1545 for 3:45 PM
6.5.8.4 CurrentTime_s
CurrentTime_s
Returns a numerical value indicating the computer's current time, including seconds. The time is
indicated in the 24-hour HHmmss format, where 130000 = 1:00:00 PM.
Usage
CurrentTime_s
Example
CurrentTime_s will return a value of 101525 for 10:15:25 AM
CurrentTime_s will return a value of 154500 for 3:45:00 PM
6.5.8.5 DateTime2ELTime
DateTime2ELTime
Returns a numerical value indicating the time from the specified DateTime value. The time is
indicated in the 24-hour HHmm format, where 1300 = 1:00 PM.
The integer portion of the DateTime value specifies the number of days since January 1st, 1900, and
the fractional portion of the DateTime value specifies the fraction of the day since midnight.
Usage
DateTime2ELTime(DateTime)
Where: DateTime - a double-precision decimal DateTime value
Example
DateTime2ELTime(39449.65625000) will return a value of 1545, indicating 3:45 PM
6.5.8.6 DateTime2ELTime_s
DateTime2ELTime_s
Returns a numerical value indicating the time, including seconds, from the specified DateTime value.
The time is indicated in the 24-hour HHmmss format, where 130000 = 1:00:00 PM.
The integer portion of the DateTime value specifies the number of days since January 1st, 1900, and
the fractional portion of the DateTime value specifies the fraction of the day since midnight.
Usage
DateTime2ELTime_s (DateTime)
Where: DateTime - a double-precision decimal DateTime value
Example
DateTime2ELTime_s(39449.646354167) will return a value of 153045, indicating 3:30:45 PM
6.5.8.7 DateTimeToString
DateTimeToString
Returns a string expression corresponding to the specified DateTime value.
The integer portion of the DateTime value specifies the number of days since January 1st, 1900, and
the fractional portion of the DateTime value specifies the fraction of the day since midnight.
Usage
DateTimeToString (DateTime)
Where: DateTime - a double-precision decimal DateTime value to be converted to a string
expression
Notes
The output example is in the default US regional date and time format. Date and time formats are
controlled by the Regional Options settings that can be accessed from the Control Panel of the
Windows XP operating system.
Example
DateTimeToString(39448.25000000) will return the string "1/1/2008 6:00:00 AM"
6.5.8.8 DateToJulian
DateToJulian
Returns a numerical value corresponding to the Julian Date equivalent of the specified date.
The date is specified in the YYYMMdd format, where YYY is the number of years since 1900, MM is
the month, and dd is the day of the month.
Julian Date indicates the number of days that have elapsed since January 1st, 1900.
Usage
DateToJulian(YYYMMdd)
Where: YYYMMdd - a numerical expression, specifying the date in YYYMMdd format
Example
DateToJulian (1080101) will return a value of 39448, corresponding to the specified date of
January 1st, 2008
DateToJulian (990402) will return a value of 36252, corresponding to the specified date of April
2nd, 1999
6.5.8.9 DateToString
DateToString
Returns a string expression corresponding to the date (integer) portion of the specified DateTime
value.
The integer portion of the DateTime value specifies the number of days since January 1st, 1900, and
the fractional portion of the DateTime value specifies the fraction of the day since midnight.
Usage
DateToString(DateTime)
Where: DateTime - a double-precision decimal DateTime value to be converted to a string
expression representing the date
Notes
The output example is in the default US regional date format. Date format is controlled by the
Regional Options settings that can be accessed from the Control Panel of the Windows XP operating
system.
Example
DateToString(39448.25000000) will return the string "1/1/2008".
6.5.8.10 DayFromDateTime
DayFromDateTime
Returns a numerical value indicating the day of the month for the specified DateTime value.
The integer portion of the DateTime value specifies the number of days since January 1st, 1900, and
the fractional portion of the DateTime value specifies the fraction of the day since midnight.
Usage
DayFromDateTime(DateTime)
Where: DateTime - a double-precision decimal DateTime value
Example
DayFromDateTime(39449.25000000) will return a value of 2, indicating the 2nd day of the month
of January, 2008
6.5.8.11 DayOfMonth
DayOfMonth
Returns a numerical value, indicating the day of the month of the specified date.
The date is specified in the YYYMMdd format, where YYY is the number of years since 1900, MM is
the month, and dd is the day of the month.
Usage
DayOfMonth(YYYMMdd)
Where: YYYMMdd - a numerical expression, specifying the date in YYYMMdd format
Example
DayOfMonth(1080101) will return a value of 1, indicating the 1st day of the month of January,
2008
DayOfMonth(990605) will return a value of 5, indicating the 5th day of the month of June, 1999
6.5.8.12 DayOfWeek
DayOfWeek
Returns a numerical value, indicating the day of the week corresponding to the specified date, where
0 = Sunday, 1 = Monday, etc.
The Date is specified in the YYYMMdd format, where YYY is the number of years since 1900, MM is
the month, and dd is the day of the month.
Usage
DayOfWeek(YYYMMdd)
Where: YYYMMdd - a numerical expression, specifying the date in YYYMMdd format
Example
DayOfWeek(1080101) will return a value of 2, indicating Tuesday, for January 1st, 2008
DayOfWeek(990603) will return a value of 4, indicating Thursday, for June 3rd, 1999
6.5.8.13 DayOfWeekFromDateTime
DayOfWeekFromDateTime
Returns a numerical value, indicating the day of the week corresponding to the specified DateTime
value, where 0 = Sunday, 1 = Monday, etc.
The integer portion of the DateTime value specifies the number of days since January 1st, 1900, and
the fractional portion of the DateTime value specifies the fraction of the day since midnight.
Usage
DayOfWeekFromDateTime(DateTime)
Where: DateTime - a double-precision decimal DateTime value
Example
DayOfWeekFromDateTime(39448.25000000) will return a value of 2, indicating Tuesday, for
January 1st, 2008
6.5.8.14 EL_DateStr
El_DateStr
Returns an 8-character numerical string corresponding to the specified date. The string is in the
yyyyMMdd format, where yyyy is the four-digit year, MM is the month, and dd is the day of the month.
Usage
El_DateStr(dd, MM, yyyy)
Where: dd - a numerical expression specifying the day of the month
MM - a numerical expression specifying the month
yyyy - a four-digit numerical expression specifying the year
Example
El_DateStr(02,04,2008) will return the string "20080402", corresponding to the specified date of
April 2nd, 2008.
6.5.8.15 EL_DateToDateTime
El_DateToDateTime
Same as the ElDateToDateTime 485
6.5.8.16 EL_TimeToDateTime
EL_TimeToDateTime
Same as the ElTimeToDateTime 486
6.5.8.17 EL_TimeToDateTime_s
EL_TimeToDateTime_s
Same as ElTimeToDateTime_s 487
6.5.8.18 ELDateToDateTime
ELDateToDateTime
Returns the integer portion of a double-precision decimal DateTime value corresponding to the
specified EL Date.
EL Date is specified in the YYYMMdd format, where YYY is the number of years since 1900, MM is
the month, and dd is the day of the month.
The integer portion of the DateTime value indicates the number of days that have elapsed since
January 1st, 1900, and the fractional portion of the DateTime value indicates the fraction of the day
that has passed since midnight.
Usage
ELDateToDateTime(YYYMMdd)
Where: YYYMMdd - a numerical expression, specifying the date in EL YYYMMdd format
Example
ELDateToDateTime(1080101) will return a value of 39448.00000000, corresponding to the
specified date of January 1st, 2008
ELDateToDateTime(990402) will return a value of 36252.00000000, corresponding to the
specified date of April 2nd, 1999
6.5.8.19 ELTimeToDateTime
ELTimeToDateTime
Returns the fractional portion of a double-precision decimal DateTime value corresponding to the
specified time. The time is specified in the 24-hour HHmm format, where 1300 = 1:00 PM.
The integer portion of the DateTime value indicates the number of days that have elapsed since
January 1st, 1900, and the fractional portion of the DateTime value indicates the fraction of the day
that has passed since midnight.
Usage
ELTimeToDateTime(HHmm)
Where: HHmm - a numerical expression specifying the time
Example
ELTimeToDateTime(1015) will return a value of 0.42708333, corresponding to the specified time
of 10:15 AM
ELTimeToDateTime(1545) will return a value of 0.65625000, corresponding to the specified time
of 3:45 PM
6.5.8.20 ELTimeToDateTime_s
ELTimeToDateTime_s
Returns the fractional portion of a double-precision decimal DateTime value corresponding to the
specified time, including seconds. The time is specified in the 24-hour HHmmss format, where
130000 = 1:00:00 PM.
The integer portion of the DateTime value indicates the number of days that have elapsed since
January 1st, 1900, and the fractional portion of the DateTime value indicates the fraction of the day
that has passed since midnight.
Usage
ELTimeToDateTime_s(HHmmss)
Where: HHmmss - a numerical expression specifying the time
Example
ELTimeToDateTime_s(101525) will return a value of 0.427372685, corresponding to the
specified time of 10:15:25 AM
ELTimeToDateTime_s(154500) will return a value of 0.656250000, corresponding to the
specified time of 3:45:00 PM
6.5.8.21 EncodeDate
EncodeDate
Returns the integer portion of a double-precision decimal DateTime value corresponding to the
specified date.
The integer portion of the DateTime value indicates the number of days that have elapsed since
January 1st, 1900, and the fractional portion of the DateTime value indicates the fraction of the day
that has passed since midnight.
Usage
EncodeDate(yy,MM,dd)
Where: yy - a numerical expression specifying the two-digit year
MM - a numerical expression specifying the month
dd - a numerical expression specifying the day of the month
Example
EncodeDate(08,01,01) will return a value of 39448.00000000, corresponding to the specified
date of January 1st, 2008
6.5.8.22 EncodeTime
EncodeTime
Returns the fractional portion of a double-precision decimal DateTime value corresponding to the
specified time.
The integer portion of the DateTime value indicates the number of days that have elapsed since
January 1st, 1900, and the fractional portion of the DateTime value indicates the fraction of the day
that has passed since midnight.
Usage
EncodeTime(HH,mm,ss,mmm)
Where: HH - a numerical expression specifying the hours in 24-hour format
mm - a numerical expression specifying the minutes
ss - a numerical expression specifying the seconds
mmm - a numerical expression specifying the milliseconds
Example
EncodeTime(16,29,55,500) will return a value of 0.6874479167, corresponding to the specified
time of 16:29:55.500
6.5.8.23 FormatDate
FormatDate
Returns a formated string expression corresponding to the date (integer) portion of the specified
DateTime value.
The format of the string expression, including the abbreviations and separators, is defined by the
specified format string. The format string consists of one or more elements arranged in the desired
order. Each element represents a particular part of the date in a specific format. Spaces and
separator characters to be used can be inserted within the format string.
Usage
FormatDate("FormatString", DateTime)
Parameters
FormatString - a format string, specifying the format of the output string expression
representing the date
The following elements can be used in the format string:
d Day of
month as
digits with
no leading
zero for
single-digit
days
dd Day of
month as
digits with
leading
zero for
single-digit
days
ddd Day of
week as a
three-letter
abbreviatio
n
dddd Day of
week as its
full name
M Month as
digits with
no leading
zero for
single-digit
months
MM Month as
digits with
leading
zero for
single-digit
months
MMM Month as a
three-letter
abbreviatio
n
MMMM Month as
its full
name
y Year as
last two
digits, but
with no
leading
zero for
years less
than 10
yy Year as
last two
digits, but
with
leading
zero for
years less
than 10
yyyy Year
represente
d by full
four digits
DateTime - a double-precision decimal DateTime value to be converted to a string expression
representing the date
The integer portion of the DateTime value specifies the number of days since January 1st, 1900,
and the fractional portion of the DateTime value specifies the fraction of the day since midnight.
Example
FormatDate("dddd, MMMM dd, yyyy.",39469.250) will return the string "Tuesday, January
22, 2008."
FormatDate("M/d/y",39469.250) will return the string "1/22/8"
FormatDate("dd-MM-yy",39469.250) will return the string "22-01-08"
FormatDate("Next ddd is: MMM dd",39469.250) will return the string "Next Tue is: Jan 22"
6.5.8.24 FormatTime
FormatTime
Returns a formated string expression corresponding to the time (fractional) portion of the specified
DateTime value.
The format of the string expression, including separators, is defined by the specified format string.
The format string consists of one or more elements arranged in the desired order. Each element
represents a particular unit of time in a specific format. Spaces and separator characters to be used
can be inserted within the format string.
Usage
FormatTime("FormatString", DateTime)
Parameters
FormatString - a format string, specifying the format of the output string expression
representing the time
The following elements can be used in the format string:
h Hours in
12-hour
AM/PM
format with
no leading
zero for
single-digit
hours
hh Hours in
12-hour
AM/PM
format with
leading
zero for
single-digit
hours
H Hours in
24-hour
format with
no leading
zero for
single-digit
hours
HH Hours in
24-hour
format with
leading
zero for
single-digit
hours
m Minutes
with no
leading
zero for
single-digit
minutes
mm Minutes
with
leading
zero for
single-digit
minutes
s Seconds
with no
leading
zero for
single-digit
seconds
ss Seconds
with
leading
zero for
single-digit
seconds
t One
character
AM/PM
designator
tt Multichara
cter AM/
PM
designator
DateTime - a double-precision decimal DateTime value to be converted to a string expression
representing the time
The integer portion of the DateTime value specifies the number of days since January 1st, 1900,
and the fractional portion of the DateTime value specifies the fraction of the day since midnight.
Example
FormatTime("hh:mm:ss t",39469.6674) will return the string "04:01:03 P"
FormatTime("h tt",39469.6674) will return the string "4 PM"
FormatTime("HH:mm",39469.6674) will return the string "16:01"
FormatTime("m MIN s SEC",39469.6674) will return the string "1 MIN 3 SEC"
6.5.8.25 Friday
Friday
Returns a numerical value of 5, corresponding to Friday.
Usage
Friday
Example
Friday will return a value of 5
6.5.8.26 HoursFromDateTime
HoursFromDateTime
Returns a numerical value indicating the hours from the specified DateTime value. The hours are
indicated in the 24-hour format, where 13 = 1 PM.
The integer portion of the DateTime value specifies the number of days since January 1st, 1900, and
the fractional portion of the DateTime value specifies the fraction of the day since midnight.
Usage
HoursFromDateTime(DateTime)
Where: DateTime - a double-precision decimal DateTime value
Example
HoursFromDateTime(39449.85000000) will return a value of 20, indicating 8 PM
6.5.8.27 IncMonth
IncMonth
Returns a numerical value corresponding to a Julian date that is after or before the specified Julian
date by a specified number of calendar months.
Julian Date indicates the number of days that have elapsed since January 1st, 1900.
Usage
IncMonth(JulianDate,M)
Where: JulianDate - a numerical expression specifying the Julian Date
M - a numerical expression specifying the number of calendar months from the specified
Julian date; if the value of M  is positive, a date after the specified date will be returned; if the
value of M  is negative, a date before the specified date will be returned
Example
IncMonth(39417,1) will return a value of 39448, corresponding to January 1st, 2008, one calendar
month after the specified date of December 1st, 2007
IncMonth(36252,-2) will return a value of 36193, corresponding to February 2nd, 1999, two
calendar months before the specified date of April 2nd, 1999
6.5.8.28 JulianToDate
JulianToDate
Returns a numerical value corresponding to the EL Date equivalent of the specified Julian Date.
Julian Date indicates the number of days that have elapsed since January 1st, 1900.
EL Date is in the YYYMMdd format, where YYY is the number of years since 1900, MM is the month,
and dd is the day of the month.
Usage
JulianToDate(JulianDate)
Where: JulianDate - a numerical expression specifying the Julian Date
Example
JulianToDate (39448) will return a value of 1080101, corresponding to the specified date of
January 1st, 2008
JulianToDate (36252) will return a value of 990402, corresponding to the specified date of April 2
nd, 1999
6.5.8.29 LastCalcJDate
LastCalcJDate
Returns a numerical value indicating the Julian date for the last completed bar.
Julian Date indicates the number of days that have elapsed since January 1st, 1900.
Usage
LastCalcJDate
Example
LastCalcJDate will return a value of 39448 for the last bar completion date of January 1st, 2008
6.5.8.30 LastCalcMMTime
LastCalcMMTime
Returns a numerical value indicating the closing time of the last completed bar. The time is indicated
as the number of minutes that have passed since midnight.
Usage
LastCalcMMTime
Example
LastCalcMMTime will return a value of 850 for the last bar completion time of 2:10 PM
6.5.8.31 LastCalcSSTime
LastCalcSSTime
Returns a numerical value indicating the closing time of the last completed bar. The time is indicated
as the number of seconds that have passed since midnight.
Usage
LastCalcSSTime
Example
LastCalcSSTime will return a value of 51030 for the last bar completion time of 2:10:30 PM
6.5.8.32 MillisecondsFromDateTime
MilliSecondsFromDateTime
Reserved for future use.
6.5.8.33 MinutesFromDateTime
MinutesFromDateTime
Returns a numerical value indicating the minutes from the specified DateTime value.
The integer portion of the DateTime value specifies the number of days since January 1st, 1900, and
the fractional portion of the DateTime value specifies the fraction of the day since midnight.
Usage
MinutesFromDateTime(DateTime)
Where: DateTime - a double-precision decimal DateTime value
Example
MinutesFromDateTime(39449.35000000) will return a value of 24, indicating 24 minutes after 8
AM
6.5.8.34 Monday
Monday
Returns a numerical value of 1, corresponding to Monday.
Usage
Monday
Example
Monday will return a value of 1
6.5.8.35 Month
Month
Returns a numerical value, indicating the month of the specified EL Date.
EL Date is specified in the YYYMMdd format, where YYY is the number of years since 1900, MM is
the month, and dd is the day of the month.
Usage
Month(YYYMMdd)
Where: YYYMMdd - a numerical expression, specifying the date in EL YYYMMdd format
Example
Month (1080101) will return a value of 1, indicating the month of January
Month (990605) will return a value of 6, indicating the month of June
6.5.8.36 MonthFromDateTime
MonthFromDateTime
Returns a numerical value indicating the month for the specified DateTime value.
The integer portion of the DateTime value specifies the number of days since January 1st, 1900, and
the fractional portion of the DateTime value specifies the fraction of the day since midnight.
Usage
MonthFromDateTime(DateTime)
Where: DateTime - a double-precision decimal DateTime value
Example
MonthFromDateTime (39600.25000000) will return a value of 6, indicating the month of June
6.5.8.37 Saturday
Saturday
Returns a numerical value of 6, corresponding to Saturday.
Usage
Saturday
Example
Saturday will return a value of 6
6.5.8.38 SecondsFromDateTime
SecondsFromDateTime
Returns a numerical value indicating the seconds from the specified DateTime value.
The integer portion of the DateTime value specifies the number of days since January 1st, 1900, and
the fractional portion of the DateTime value specifies the fraction of the day since midnight.
Usage
SecondsFromDateTime(DateTime)
Where: DateTime - a double-precision decimal DateTime value
Example
SecondsFromDateTime (39449.35440000) will return a value of 20, indicating 20 seconds from
8:30:20 AM
6.5.8.39 StringToDate
StringToDate
Returns the integer portion of a double-precision decimal DateTime value, corresponding to the
specified date. The date is specified by a string expression "MM/dd/yy"* or "MM/dd/yyyy"*, where MM
* is the month, dd* is the day, and yy or yyyy is a two-digit or four-digit year.
The integer portion of the DateTime value indicates the number of days that have elapsed since
January 1st, 1900, and the fractional portion of the DateTime value indicates the fraction of the day
that has passed since midnight.
Usage
StringToDate("MM/dd/yy")
or:
StringToDate("MM/dd/yyyy")
Where: MM - month*
dd - day of the month*
yy - a two-digit year
yyyy - a four-digit year
Notes
* Described usage and examples are for the default US regional date format. If the default UK
regional format is selected, the dates will be in dd/MM/yy and dd/MM/yyyy format instead. Date
format is controlled by the Regional Options settings that can be accessed from the Control Panel of
the Windows XP operating system.
Example
StringToDate("01/01/2008") will return a value of 39448.00000000, corresponding to the
specified date of January 1st, 2008
StringToDate("04/04/99") will return a value of 36254.00000000, corresponding to the
specified date of April 4th, 1999
6.5.8.40 StringToDateTime
StringToDateTime
Returns a double-precision decimal DateTime value corresponding to the specified date and time.
The date and time are specified by a string expression "MM/dd/yy hh:mm:ss tt"* or "MM/dd/yyyy hh:
mm:ss tt"*, where MM* is the month, dd* is the day, yy or yyyy is a two-digit or four-digit year, hh is
the hours in 12-hour AM/PM format, mm is the minutes, ss is the seconds, and tt is the AM/PM
designator.
The integer portion of the DateTime value indicates the number of days that have elapsed since
January 1st, 1900, and the fractional portion of the DateTime value indicates the fraction of the day
that has passed since midnight.
Usage
StringToDateTime("MM/dd/yy hh:mm:ss tt")
or:
StringToDateTime("MM/dd/yyyy hh:mm:ss tt")
Where: MM - month*
dd - day of the month*
yy - a two-digit year
yyyy - a four-digit year
hh - hours
mm - minutes
ss - seconds
tt - AM/PM designator
Notes
* Described usage and examples are for the default US regional date and time formats. If the default
UK regional format is selected, the dates will be in dd/MM/yy and dd/MM/yyyy format instead.
Date and time formats are controlled by the Regional Options settings that can be accessed from the
Control Panel of the Windows XP operating system.
Example
StringToDateTime("01/01/2008 08:00:00 AM") will return a value of 39448.33333333,
corresponding to 08:00:00 AM on January 1st, 2008
StringToDateTime("04/04/99 04:48:00 PM") will return a value of 36254.70000000,
corresponding to 04:48:00 PM on April 4th, 1999
6.5.8.41 StringToTime
StringToTime
Returns the fractional portion of a double-precision decimal DateTime value, corresponding to the
specified time.
The time is specified by a string expression "hh:mm:ss tt", where hh is the hours in the 12-hour AM/
PM format, mm is the minutes, ss is the seconds, and tt is the AM/PM designator.
The integer portion of the DateTime value indicates the number of days that have elapsed since
January 1st, 1900, and the fractional portion of the DateTime value indicates the fraction of the day
that has passed since midnight.
Usage
StringToTime("hh:mm:ss tt")
Where: hh - hours in the 12-hour AM/PM format
mm - minutes
ss - seconds
tt - AM/PM designator
Notes
Described usage and examples are for the default US regional time format. Time format is controlled
by the Regional Options settings that can be accessed from the Control Panel of the Windows XP
operating system.
Example
StringToTime ("08:00:00 AM") will return a value of 0.33333333
StringToTime ("04:48:00 PM") will return a value of 0.70000000
6.5.8.42 Sunday
Sunday
Returns a numerical value of 0, corresponding to Sunday.
Usage
Sunday
Example
Sunday will return a value of 0
6.5.8.43 Thursday
Thursday
Returns a numerical value of 4, corresponding to Thursday.
Usage
Thursday
Example
Thursday will return a value of 4
6.5.8.44 Time_s2Time
Time_s2Time
Returns a numerical value indicating the time in the HHmm format, corresponding to the specified
time in the HHmmss format; the seconds are truncated.
The time is returned in the 24-hour HHmm format, where 1300 = 1:00 PM, and specified in the 24-
hour HHmmss format, where 130000 = 1:00:00 PM.
Usage
Time_s2Time(HHmmss)
Where: HHmmss - a numerical expression specifying the time
Example
Time_s2Time(101520) will return a value of 1015
Time_s2Time(154548) will return a value of 1545
6.5.8.45 Time2Time_s
Time2Time_s
Returns a numerical value indicating the time in the HHmmss format, corresponding to the specified
time in the HHmm format.
The time is returned in the 24-hour HHmmss format, where 130000 = 1:00:00 PM, and specified in
the 24-hour HHmm format, where 1300 = 1:00 PM.
Usage
Time2Time_s(HHmm)
Where: HHmm - a numerical expression specifying the time
Example
Time2Time_s(1015) will return a value of 101500
Time2Time_s(1545) will return a value of 154500
6.5.8.46 TimeToString
TimeToString
Returns a string expression corresponding to the time (fractional) portion of the specified DateTime
value.
The integer portion of the DateTime value specifies the number of days since January 1st, 1900, and
the fractional portion of the DateTime value specifies the fraction of the day since midnight.
Usage
TimeToString(DateTime)
Where: DateTime - a double-precision decimal DateTime value to be converted to a string
expression representing the time
Notes
The output example is in the default US regional time format. Time format is controlled by the
Regional Options settings that can be accessed from the Control Panel of the Windows XP operating
system.
Example
TimeToString(39448.75000000) will return the string "6:00 PM"
6.5.8.47 Tuesday
Tuesday
Returns a numerical value of 2, corresponding to Tuesday.
Usage
Tuesday
Example
Tuesday will return a value of 2
6.5.8.48 Wednesday
Wednesday
Returns a numerical value of 3, corresponding to Wednesday.
Usage
Wednesday
Example
Wednesday will return a value of 3
6.5.8.49 Year
Year
Returns a numerical value, indicating the year of the specified EL Date.
EL Date is specified in the YYYMMdd format, where YYY is the number of years since 1900, MM is
the month, and dd is the day of the month.
Usage
Year(YYYMMdd)
Where: YYYMMdd - a numerical expression, specifying the date in EL YYYMMdd format
Example
Year(1080101) will return a value of 108, indicating the year of 2008
Year(990605) will return a value of 99, indicating the year of 1999
6.5.8.50 YearFromDateTime
YearFromDateTime
Returns a numerical value indicating the year for the specified DateTime value.
The integer portion of the DateTime value specifies the number of days since January 1st, 1900, and
the fractional portion of the DateTime value specifies the fraction of the day since midnight.
Usage
YearFromDateTime(DateTime)
Where: DateTime - a double-precision decimal DateTime value
Example
YearFromDateTime(39449.25000000) will return a value of 2008, indicating the year of 2008
6.5.9 Declaration
6.5.9.1 Array
Array
Declares one or more names as arrays, containing multiple variable data elements; specifies the
array structure, data elements type and initial value, update basis, and data number, for each of the
arrays.
Data elements type can be numerical, string, or true/false.
The number of elements in an array can be fixed or dynamic (unlimited).
In arrays with a fixed number of elements, the elements can be arranged in single or multiple
dimensions. A one-dimensional 10-element array contains 10 elements, a two-dimensional 10-
element by 10-element array contains 100 elements, a three-dimensional 10 by 10 by 10 element
array contains 1000 elements, a four-dimensional 10 by 10 by 10 by 10 element array contains
10000 elements, etc. The maximum number of array dimensions in PowerLanguage is 9.
Each element in an array is referenced by one or more index numbers, one for each of the
dimensions. Indexing starts at 0 for each of the dimensions.
Dynamic arrays (arrays with an unlimited number of elements) are one-dimensional, and are
initialized at declaration as having only one element. Declared dynamic arrays can be resized using
Array_SetMaxIndex 584 .
Elements can be manipulated individually or as a group, in all or part of an array.
Usage
Array:<IntraBarPersist>ArrayName1[D1,D2,D3,etc.](InitialValue1<,DataN>), <
IntraBarPersist>ArrayName2[D1,D2,D3,etc.](InitialValue2<,DataN>),etc.
Parameters inside the angled brackets are optional
Parameters
IntraBarPersist - an optional parameter; specifies that the value of the array elements is to
be updated on every tick
If this parameter is not specified, the value will be updated at the close of each bar.
ArrayName - an expression specifying the array name
The name can consist of letters, underscore characters, numbers, and periods. The name cannot
begin with a number or a period and is not case-sensitive.
D - a numerical expression specifying the array size in elements, starting at 0, for each of the
dimensions; a single expression specifies a one-dimensional array, two expressions specify a two-
dimensional (D1 by D2) array, three expressions specify a three-dimensional (D1 by D2 by D3)
array, etc. A dynamic array, with an unlimited number of elements, is specified by the empty
square brackets: [] and will be a one-dimensional array.
InitialValue - an expression, specifying the initial value and defining the data type for all of the
elements in the array
The value can be a numerical, string, or true/false expression; the type of the expression defines
the data type.
DataN - an optional parameter; specifies the Data Number of the data series the array is to be
tied to
If this parameter is not specified, the array will be tied to the default data series.
Example
Declare Length and SFactor as 9-element one-dimensional numerical arrays with data elements'
initial values of 0:
Array:Length[8](0),SFactor[8](0);
Declare Highs2 as a dynamic numerical array with data elements' initial values of 0:
Array:Highs2[](0);
6.5.9.2 Arrays
Arrays
Same as the Array 520
6.5.9.3 Input
Input
Declares one or more names as inputs; specifies the default value and defines the input type for
each input.
Inputs can be numerical, string, or true/false. Once declared, the value of the input cannot be
modified by the study's code.
Usage
Input:InputName1(DefaultValue1), InputName2(DefaultValue2), etc.
Parameters
InputName - an expression specifying the input name
The name can consist of letters, underscore characters, numbers, and periods. The name cannot
begin with a number or a period and is not case-sensitive.
DefaultValue - an expression specifying the default value and defining the input type
The expression can be numerical, string, or true/false; the type of the expression defines the input
type.
Example
Declare Length as a numerical input with the default value of 20:
Input:Length(20);
Declare Price as a numerical input with the default value equal to the value of Close function, and
Name as a character string input with the default value of "Last Close":
Input:Price(Close), Name("Last Close");
6.5.9.4 Inputs
Inputs
Same as the Input 523
6.5.9.5 IntraBarPersist
IntraBarPersist
Used in variable and array declaration statements, before a variable or array name, to specify that
the value of the variable or array elements are to be updated on every tick.
If IntraBarPersist is not specified, the value will be updated at the close of each bar.
Usage
Declaration:[IntraBarPersist]Name(InitialValue1)
Example
Declare Max as a numerical variable, updated on every tick, with the initial value of 100:
Variable:IntraBarPersist Max(100);
Declare Max_Price as a 24-element single-dimension numerical array, updated on every tick, and
with data elements' initial values of 0:
Array:IntraBarPersist Max_Price[23](0);
6.5.9.6 Numeric
Numeric
Used in function input declaration statements to define an input as Numerical.
Input defined as Numerical can be used both as a Numerical Simple as well as a Numerical Series
input; the value of a Simple input is constant from bar to bar and thus has no history, while the value
of a Series input may vary from bar to bar and can be referenced historically.
Usage
Input:InputName(Numeric)
Where: InputName - an expression specifying the input name
The name can consist of letters, underscore characters, numbers, and periods.
The name cannot begin with a number or a period and is not case-sensitive.
Example
Declare Length as a Numerical function input:
Input:Length(Numeric);
6.5.9.7 NumericArray
NumericArray
Used in function input declaration statements to define an input as a Numerical Array with a specified
number of dimensions.
Input defined as Numerical can be used both as a Numerical Simple as well as a Numerical Series
input; the value of a Simple input is constant from bar to bar and thus has no history, while the value
of a Series input may vary from bar to bar and can be referenced historically.
Usage
Input:InputName[M1,M2,M3,etc.](NumericArray)
Parameters
InputName - an expression specifying the input name
The name can consist of letters, underscore characters, numbers, and periods.
The name cannot begin with a number or a period and is not case-sensitive.
M - an input variable that represents the maximum index value for each dimension of the array
passed to the function; a single input variable specifies a one-dimensional array input, two input
variables specify a two-dimensional (M1 by M2) array input, three input variables specify a three-
dimensional (M1 by M2 by M3) array input, etc.
An input will only accept an array with the specified number of dimensions.
Example
Declare Length as a one-dimensional Numerical Array function input:
Input:Length[X](NumericArray);
The maximum index value for the array passed to the function will be assigned to input variable X.
6.5.9.8 NumericArrayRef
NumericArrayRef
Used in function input declaration statements to define an input as Passed by Reference Numerical
Array with a specified number of dimensions.
Declaring an input as Passed by Reference enables the function to modify the values of variables
passed as the input.
Usage
Input:InputName[M1,M2,M3,etc.](NumericArrayRef)
Parameters
InputName - an expression specifying the input name
The name can consist of letters, underscore characters, numbers, and periods.
The name cannot begin with a number or a period and is not case-sensitive.
M - an input variable that represents the maximum index value for each dimension of the array
passed to the function; a single input variable specifies a one-dimensional array input, two input
variables specify a two-dimensional (M1 by M2) array input, three input variables specify a three-
dimensional (M1 by M2 by M3) array input, etc.
An input will only accept an array with the specified number of dimensions.
Example
Declare Count as a Passed by Reference one-dimensional Numerical Array function input:
Input:Count[X](NumericArrayRef);
The maximum index value for the array passed to the function will be assigned to input variable X.
6.5.9.9 NumericRef
NumericRef
Used in function input declaration statements to declare a Passed by Reference Numerical input.
Declaring an input as Passed by Reference enables the function to modify the values of variables
passed as the input.
Usage
Input:InputName(NumericRef)
Where: InputName - an expression specifying the input name
The name can consist of letters, underscore characters, numbers, and periods.
The name cannot begin with a number or a period and is not case-sensitive.
Example
Declare BarCount as a Passed by Reference Numerical function input:
Input:BarCount(NumericRef);
6.5.9.10 NumericSeries
NumericSeries
Used in function input declaration statements to define an input as a Numerical Series.
The value of an input defined as a Series may vary from bar to bar and can be referenced
historically.
Usage
Input:InputName(NumericSeries)
Where: InputName - an expression specifying the input name
The name can consist of letters, underscore characters, numbers, and periods.
The name cannot begin with a number or a period and is not case-sensitive.
Example
Declare Price as a Numerical Series function input:
Input:Price(NumericSeries);
6.5.9.11 NumericSimple
NumericSimple
Used in function input declaration statements to define an input as Numerical Simple.
The value of an input defined as Simple is constant from bar to bar and thus has no history.
Usage
Input:InputName(NumericSimple)
Where: InputName - an expression specifying the input name
The name can consist of letters, underscore characters, numbers, and periods.
The name cannot begin with a number or a period and is not case-sensitive.
Example
Declare Length as a Numerical Simple function input:
Input:Length(NumericSimple);
6.5.9.12 String
String
Used in function input declaration statements to define an input as String.
Input defined as String can be used both as a String Simple as well as a String Series input; the
value of a Simple input is constant from bar to bar and thus has no history, while the value of a
Series input may vary from bar to bar and can be referenced historically.
Usage
Input:InputName(String)
Where: InputName - an expression specifying the input name
The name can consist of letters, underscore characters, numbers, and periods.
The name cannot begin with a number or a period and is not case-sensitive.
Example
Declare Name as a String function input:
Input:Name(String);
6.5.9.13 StringArray
StringArray
Used in function input declaration statements to define an input as a String Array with a specified
number of dimensions.
Input defined as String can be used both as a String Simple as well as a String Series input; the
value of a Simple input is constant from bar to bar and thus has no history, while the value of a
Series input may vary from bar to bar and can be referenced historically.
Usage
Input:InputName[M1,M2,M3,etc.](StringArray)
Parameters
InputName - an expression specifying the input name
The name can consist of letters, underscore characters, numbers, and periods.
The name cannot begin with a number or a period and is not case-sensitive.
M - an input variable that represents the maximum index value for each dimension of the array
passed to the function; a single input variable specifies a one-dimensional array input, two input
variables specify a two-dimensional (M1 by M2) array input, three input variables specify a three-
dimensional (M1 by M2 by M3) array input, etc.
An input will only accept an array with the specified number of dimensions.
Example
Declare Messages as a one-dimensional String Array function input:
Input:Messages[X](StringArray);
The maximum index value for the array passed to the function will be assigned to input variable X.
6.5.9.14 StringArrayRef
StringArrayRef
Used in function input declaration statements to define an input as Passed by Reference String Array
with a specified number of dimensions.
Declaring an input as Passed by Reference enables the function to modify the values of variables
passed as the input.
Usage
Input:InputName[M1,M2,M3,etc.](StringArrayRef)
Parameters
InputName - an expression specifying the input name
The name can consist of letters, underscore characters, numbers, and periods.
The name cannot begin with a number or a period and is not case-sensitive.
M - an input variable that represents the maximum index value for each dimension of the array
passed to the function; a single input variable specifies a one-dimensional array input, two input
variables specify a two-dimensional (M1 by M2) array input, three input variables specify a three-
dimensional (M1 by M2 by M3) array input, etc.
An input will only accept an array with the specified number of dimensions.
Example
Declare Messages as a Passed by Reference one-dimensional String Array function input:
Input:Messages[X](StringArrayRef);
The maximum index value for the array passed to the function will be assigned to input variable X.
6.5.9.15 StringRef
StringRef
Used in function input declaration statements to declare a Passed by Reference String input.
Declaring an input as Passed by Reference enables the function to modify the values of variables
passed as the input.
Usage
Input:InputName(StringRef)
Where: InputName - an expression specifying the input name
The name can consist of letters, underscore characters, numbers, and periods.
The name cannot begin with a number or a period and is not case-sensitive.
Example
Declare Message as a Passed by Reference String function input:
Input:Message(StringRef);
6.5.9.16 StringSeries
StringSeries
Used in function input declaration statements to define an input as String Series.
The value of an input defined as a Series may vary from bar to bar and can be referred to historically.
Usage
Input:InputName(StringSeries)
Where: InputName - an expression specifying the input name
The name can consist of letters, underscore characters, numbers, and periods.
The name cannot begin with a number or a period and is not case-sensitive.
Example
Declare Messages as a String Series function input:
Input:Messages(StringSeries);
6.5.9.17 StringSimple
StringSimple
Used in function input declaration statements to define an input as String Simple.
The value of an input defined as Simple is constant from bar to bar and thus has no history.
Usage
Input:InputName(StringSimple)
Where: InputName - an expression specifying the input name
The name can consist of letters, underscore characters, numbers, and periods.
The name cannot begin with a number or a period and is not case-sensitive.
Example
Declare Name as a String Simple function input:
Input:Name(StringSimple);
6.5.9.18 TrueFalse
TrueFalse
Used in function input declaration statements to define an input as true/false.
Input defined as true/false can be used both as a true/false Simple as well as a true/false Series
input; the value of a Simple input is constant from bar to bar and thus has no history, while the value
of a Series input may vary from bar to bar and can be referenced historically.
Usage
Input:InputName(TrueFalse)
Where: InputName - an expression specifying the input name
The name can consist of letters, underscore characters, numbers, and periods.
The name cannot begin with a number or a period and is not case-sensitive.
Example
Declare Overnight as a true/false function input:
Input:Overnight(TrueFalse);
6.5.9.19 TrueFalseArray
TrueFalseArray
Used in function input declaration statements to define an input as a true/false Array with a specified
number of dimensions.
Input defined as true/false can be used both as a true/false Simple as well as a true/false Series
input; the value of a Simple input is constant from bar to bar and thus has no history, while the value
of a Series input may vary from bar to bar and can be referenced historically.
Usage
Input:InputName[M1,M2,M3,etc.](TrueFalseArray)
Parameters
InputName - an expression specifying the input name
The name can consist of letters, underscore characters, numbers, and periods.
The name cannot begin with a number or a period and is not case-sensitive.
M - an input variable that represents the maximum index value for each dimension of the array
passed to the function; a single input variable specifies a one-dimensional array input, two input
variables specify a two-dimensional (M1 by M2) array input, three input variables specify a three-
dimensional (M1 by M2 by M3) array input, etc.
An input will only accept an array with the specified number of dimensions.
Example
Declare UpTrend as a one-dimensional true/false Array function input:
Input:UpTrend[X](TrueFalseArray);
The maximum index value for the array passed to the function will be assigned to input variable X.
6.5.9.20 TrueFalseArrayRef
TrueFalseArrayRef
Used in function input declaration statements to define an input as Passed by Reference true/false
Array with a specified number of dimensions.
Declaring an input as Passed by Reference enables the function to modify the values of variables
passed as the input.
Usage
Input:InputName[M1,M2,M3,etc.](TrueFalseArrayRef)
Parameters
InputName - an expression specifying the input name
The name can consist of letters, underscore characters, numbers, and periods.
The name cannot begin with a number or a period and is not case-sensitive.
M - an input variable that represents the maximum index value for each dimension of the array
passed to the function; a single input variable specifies a one-dimensional array input, two input
variables specify a two-dimensional (M1 by M2) array input, three input variables specify a three-
dimensional (M1 by M2 by M3) array input, etc.
An input will only accept an array with the specified number of dimensions.
Example
Declare Trend as a Passed by Reference one-dimensional true/false Array function input:
Input:Trend[X](TrueFalseArrayRef);
The maximum index value for the array passed to the function will be assigned to input variable X.
6.5.9.21 TrueFalseRef
TrueFalseRef
Used in function input declaration statements to declare a Passed by Reference true/false input.
Declaring an input as Passed by Reference enables the function to modify the values of variables
passed as the input.
Usage
Input:InputName(TrueFalseRef)
Where: InputName - an expression specifying the input name
The name can consist of letters, underscore characters, numbers, and periods.
The name cannot begin with a number or a period and is not case-sensitive.
Example
Declare Flag as a Passed by Reference true/false function input:
Input:Flag(TrueFalseRef);
6.5.9.22 TrueFalseSeries
TrueFalseSeries
Used in function input declaration statements to define an input as a true/false Series.
The value of an input defined as a Series may vary from bar to bar and can be referenced
historically.
Usage
Input:InputName(TrueFalseSeries)
Where: InputName - an expression specifying the input name
The name can consist of letters, underscore characters, numbers, and periods.
The name cannot begin with a number or a period and is not case-sensitive.
Example
Declare UpTrend as a true/false Series function input:
Input:UpTrend(TrueFalseSeries);
6.5.9.23 TrueFalseSimple
TrueFalseSimple
Used in function input declaration statements to define an input as true/false Simple.
The value of an input defined as Simple is constant from bar to bar and thus has no history.
Usage
Input:InputName(TrueFalseSimple)
Where: InputName - an expression specifying the input name
The name can consist of letters, underscore characters, numbers, and periods.
The name cannot begin with a number or a period and is not case-sensitive.
Example
Declare Overnight as a true/false Simple function input:
Input:Overnight(TrueFalseSimple);
6.5.9.24 Var
Var
Same as the Variable 545
6.5.9.25 Variable
Variable
Declares one or more names as variables; specifies the initial value, variable type, update basis, and
data number for each variable.
Variables can be numerical, string, or true/false.
Usage
Variable:[IntraBarPersist]VariableName1(InitialValue1[,DataN]), [
IntraBarPersist]VariableName2(InitialValue2[,DataN]),etc.
Parameters inside the square brackets are optional
Parameters
IntraBarPersist - an optional parameter; specifies that the value of the variable is to be
updated on every tick
If this parameter is not specified, the value will be updated at the close of each bar.
VariableName - an expression, specifying the variable name
The name can consist of letters, underscore characters, numbers, and periods.
The name cannot begin with a number or a period and is not case-sensitive.
InitialValue - an expression, specifying the initial value and defining the variable type
The value can be a numerical, string, or true/false expression; the type of the expression defines
the variable type.
DataN - an optional parameter; specifies the Data Number of the data series the variable is to be
tied to
If this parameter is not specified, the variable will be tied to the default data series.
Example
Declare Avg. as a numerical variable with the initial value of 20:
Variable:Avg.(20);
Declare Max as a numerical variable, updated on every tick, with the initial value of 100:
Variable:IntraBarPersist Max(100);
Declare Min_Price as a numerical variable, tied to the series with Data #2, and the initial value equal
to the value of Close function:
Variable:Min_Price(Close,Data2);
Declare Overnight as a true/false variable with the initial value of False, and Name as a string
variable with the initial value of "Intra-Day":
Variable:Overnight(False),Name("Intra-Day");
6.5.9.26 Variables
Variables
Same as the Variable 545
6.5.9.27 Vars
Vars
Same as the Variable 545
#Events
Supported by PowerLanguage.
A detailed description and usage examples will be presented in the documentation accompanying the
next release of MultiCharts.
6.5.10.2 ArraySize
ArraySize
Supported by PowerLanguage.
A detailed description and usage examples will be presented in the documentation accompanying the
next release of MultiCharts.
6.5.10.3 ArrayStartAddr
ArrayStartAddr
Supported by PowerLanguage.
A detailed description and usage examples will be presented in the documentation accompanying the
next release of MultiCharts.
6.5.10.4 Bool
Bool
Supported by PowerLanguage.
A detailed description and usage examples will be presented in the documentation accompanying the
next release of MultiCharts.
6.5.10.5 Byte
Byte
Supported by PowerLanguage.
A detailed description and usage examples will be presented in the documentation accompanying the
next release of MultiCharts.
6.5.10.6 Char
Char
Supported by PowerLanguage.
A detailed description and usage examples will be presented in the documentation accompanying the
next release of MultiCharts.
6.5.10.7 DefineDLLFunc
DefineDLLFunc
Supported by PowerLanguage.
A detailed description and usage examples will be presented in the documentation accompanying the
next release of MultiCharts.
6.5.10.8 Double
Double
Supported by PowerLanguage.
A detailed description and usage examples will be presented in the documentation accompanying the
next release of MultiCharts.
6.5.10.9 DWORD
DWORD
Supported by PowerLanguage.
A detailed description and usage examples will be presented in the documentation accompanying the
next release of MultiCharts.
6.5.10.10 External
External
Supported by PowerLanguage.
A detailed description and usage examples will be presented in the documentation accompanying the
next release of MultiCharts.
6.5.10.11 Float
Float
Supported by PowerLanguage.
A detailed description and usage examples will be presented in the documentation accompanying the
next release of MultiCharts.
6.5.10.12 IEasyLanguageObject
iEasyLanguageObject
Supported by PowerLanguage.
A detailed description and usage examples will be presented in the documentation accompanying the
next release of MultiCharts.
6.5.10.13 Int
Int
Supported by PowerLanguage.
A detailed description and usage examples will be presented in the documentation accompanying the
next release of MultiCharts.
6.5.10.14 Long
Long
Supported by PowerLanguage.
A detailed description and usage examples will be presented in the documentation accompanying the
next release of MultiCharts.
6.5.10.15 LPBool
LPBool
Supported by PowerLanguage.
A detailed description and usage examples will be presented in the documentation accompanying the
next release of MultiCharts.
6.5.10.16 LPByte
LPByte
Supported by PowerLanguage.
A detailed description and usage examples will be presented in the documentation accompanying the
next release of MultiCharts.
6.5.10.17 LPDouble
LPDouble
Supported by PowerLanguage.
A detailed description and usage examples will be presented in the documentation accompanying the
next release of MultiCharts.
6.5.10.18 LPDWORD
LPDWORD
Supported by PowerLanguage.
A detailed description and usage examples will be presented in the documentation accompanying the
next release of MultiCharts.
6.5.10.19 LPFloat
LPFloat
Supported by PowerLanguage.
A detailed description and usage examples will be presented in the documentation accompanying the
next release of MultiCharts.
6.5.10.20 LPInt
LPInt
Supported by PowerLanguage.
A detailed description and usage examples will be presented in the documentation accompanying the
next release of MultiCharts.
6.5.10.21 LPLong
LPLong
Supported by PowerLanguage.
A detailed description and usage examples will be presented in the documentation accompanying the
next release of MultiCharts.
6.5.10.22 LPSTR
LPSTR
Supported by PowerLanguage.
A detailed description and usage examples will be presented in the documentation accompanying the
next release of MultiCharts.
6.5.10.23 LPWORD
LPWORD
Supported by PowerLanguage.
A detailed description and usage examples will be presented in the documentation accompanying the
next release of MultiCharts.
6.5.10.24 Method
Method
Supported by PowerLanguage.
A detailed description and usage examples will be presented in the documentation accompanying the
next release of MultiCharts.
6.5.10.25 OnCreate
OnCreate
Supported by PowerLanguage.
A detailed description and usage examples will be presented in the documentation accompanying the
next release of MultiCharts.
6.5.10.26 OnDestroy
OnDestroy
Supported by PowerLanguage.
A detailed description and usage examples will be presented in the documentation accompanying the
next release of MultiCharts.
6.5.10.27 Self
Self
Supported by PowerLanguage.
A detailed description and usage examples will be presented in the documentation accompanying the
next release of MultiCharts.
6.5.10.28 Unsigned
Unsigned
Supported by PowerLanguage.
A detailed description and usage examples will be presented in the documentation accompanying the
next release of MultiCharts.
6.5.10.29 VarSize
VarSize
Supported by PowerLanguage.
A detailed description and usage examples will be presented in the documentation accompanying the
next release of MultiCharts.
6.5.10.30 VarStartAddr
VarStartAddr
Supported by PowerLanguage.
A detailed description and usage examples will be presented in the documentation accompanying the
next release of MultiCharts.
6.5.10.31 Void
Void
Supported by PowerLanguage.
A detailed description and usage examples will be presented in the documentation accompanying the
next release of MultiCharts.
6.5.10.32 WORD
WORD
Supported by PowerLanguage.
A detailed description and usage examples will be presented in the documentation accompanying the
next release of MultiCharts.
Array_Compare
Compares a specified range of elements of the specified one-dimensional source array, starting at
the specified source index, to the same range of elements of the specified one-dimensional
destination array, starting at the specified destination index.
Source and destination can be the same array as well as two different arrays.
For numerical arrays, the numerical values for each pair of elements are compared. For string arrays,
the ASCII values of the string characters, with the first character of the string being the most
significant, are compared for each pair of elements. For true/false arrays, the logical values of each
pair of elements are compared, with the value of true considered to be greater than the value of false.
Returns a value of 0 if each respective pair of elements compared as equal; a value of 1 if, for the
first pair that was not equal, the value in the source range was greater then the value in the
destination range; and a value of -1 if, for the first pair that was not equal, the value in the source
range was less then the value in the destination range.
Usage
Array_Compare(SourceArray,SourceIndex,DestinationArray,DestinationIndex,
NumberOfElements)
Where: SourceArray - an expression specifying the name of the source array
DestinationArray - an expression specifying the name of the destination array
SourceIndex - a numerical expression specifying the starting index for the source array
DestinationIndex - a numerical expression specifying the starting index for the
destination array
NumberOfElements - a numerical expression specifying the number of elements to
compare
Return
0 - each respective pair of elements compared as equal
1 - for the first pair compared that was not equal, the value in the source range was greater then
the value in the destination range
-1 - for the first pair compared that was not equal, the value in the source range was less then the
value in the destination range
Example
Assign a value, indicating the result of comparing two-element segments, of Array1, beginning at the
index of 4, and of Array2, beginning at the index of 6, to Value1 variable:
Value1=Array_Compare(Array1,4,Array2,6,2);
Assign a value, indicating the result of comparing two-element segments that begin at the index of 4
and at the index of 6 within the same array, to Value1 variable:
Value1=Array_Compare(Array1,4,Array1,6,2);
6.5.11.2 Array_Copy
Array_Copy
Copies a specified number of elements from the specified one-dimensional source array, starting at
the specified source index; the elements are copied to the specified one-dimensional destination
array, starting at the specified destination index.
Source and destination can be the same array as well as two different arrays.
Usage
Array_Copy(SourceArray,SourceIndex,DestinationArray,DestinationIndex,
NumberOfElements)
Where: SourceArray - an expression specifying the name of the source array
DestinationArray - an expression specifying the name of the destination array
SourceIndex - a numerical expression specifying the starting index for the source array
DestinationIndex - a numerical expression specifying the starting index for the
destination array
NumberOfElements - a numerical expression specifying the number of elements to copy
Example
Copy from Array1 the two-element segment beginning at the index of 4, to the Array2, beginning at
the index of 6:
Array_Copy(Array1,4,Array2,6,2);
Copy from Array1 the two-element segment beginning at the index of 4, to the same array, beginning
at the index of 6:
Array_Copy(Array1,4,Array1,6,2);
6.5.11.3 Array_GetMaxIndex
Array_GetMaxIndex
Returns a numerical value indicating the maximum index of a one-dimensional array.
Array indexes start at 0, and array size is equal to the value of the maximum index plus one.
Usage
Array_GetMaxIndex(ArrayName)
Where: ArrayName - an expression specifying the name of an array
Example
Assign a value that indicates the maximum index of Array1 to the MaxIndex variable:
MaxIndex=Array_GetMaxIndex(Array1);
6.5.11.4 Array_GetType
Array_GetType
Returns a numerical value indicating the type of the specified array.
Usage
Array_GetType(ArrayName)
Where: ArrayName - an expression specifying the name of an array
Return
2 - a true/false array
3 - a string array
7 - a double-precision numerical array
Example
Assign a value, indicating the type of Array1, to Value1 variable:
Value1=Array_GetType(Array1);
6.5.11.5 Array_SetMaxIndex
Array_SetMaxIndex
Resizes a declared dynamic array to a specified number of elements; returns a value of True to
indicate a successful resize.
An array can be resized to a larger or to a smaller number of elements; any elements added to an
array will be assigned the initial value that was specified at array declaration.
Usage
Array_SetMaxIndex(ArrayName,MaxIndex)
Where: ArrayName - an expression specifying the name of an array to be resized
MaxIndex - a numerical expression specifying the maximum index of the array*
*Array indexes start at 0, and array size is equal to the value of MaxIndex plus one.
Return
True - resize sucessfull
False - resize failed
Example
Resize the dynamic array Array1 to 10 elements by specifying a maximum index value of 9:
Array_SetMaxIndex(Array1,9);
Assign a value that indicates a status of the resize of Array1 to the ResizeReport variable:
ResizeReport=Array_SetMaxIndex(Array1,9);
A value of True will indicate a successful resize, and a value of False will indicate a failed resize.
6.5.11.6 Array_SetValRange
Array_SetValRange
Assigns a specified value to each element within a specified range, of the specified one-dimensional
array.
Usage
Array_SetValRange(ArrayName,StartIndex,EndIndex,Value)
Where: ArrayName - an expression specifying the name of an array
StartIndex - a numerical expression specifying the starting index for the range
EndIndex - a numerical expression specifying the ending index for the range
Value - a value to be assigned to each element within the range
Example
Assign a value of True to each element within a segment, beginning at index 4 and ending at index 6,
of Array1:
Array_SetValRange(Array1,4,6,True);
6.5.11.7 Array_Sort
Array_Sort
Sorts, in either ascending or descending order, the range of elements, specified by the starting and
ending indexes, of the specified one-dimensional array.
For numerical arrays, the elements are sorted according to the values they contain. For string arrays,
the elements are sorted according to the ASCII values of the string characters, with the first character
of the string being the most significant. For sorting true/false array elements, the value of true is
considered to be greater than the value of false.
Usage
Array_Sort(ArrayName,StartIndex,EndIndex,SortOrder)
Where: ArrayName - an expression specifying the name of an array
StartIndex - a numerical expression specifying the starting index for the range
EndIndex - a numerical expression specifying the ending index for the range
SortOrder - a true/false value specifying the sort order; true specifies ascending order, and
false specifies descending order
Example
Sort the elements in the segment of Array1 that begins at the index of 4 and ends at the index of 6, in
ascending order:
Array_Sort(Array1,4,6,True);
6.5.11.8 Array_Sum
Array_Sum
Returns a sum of the values contained in a range of elements, specified by the starting and ending
indexes, of the specified one-dimensional array; returns the number of true elements if the array
contains true/false values; returns a value of 0 if the array contains string values.
Usage
Array_Sum(ArrayName,StartIndex,EndIndex)
Where: ArrayName - an expression specifying the name of an array
StartIndex - a numerical expression specifying the starting index for the range
EndIndex - a numerical expression specifying the ending index for the range
Example
Assign a value, indicating a sum of the values contained in the segment of Array1 that begins at the
index of 4 and ends at the index of 6, to Value1 variable:
Value1=Array_Sum(Array1,4,6);
6.5.11.9 Fill_array
Fill_Array
Assigns a specified value to each element of the specified one-dimensional array.
Usage
Fill_Array(ArrayName,Value)
Where: ArrayName - an expression specifying the name of an array
Value - a value to be assigned to each element of the array
Example
Assign a value of True to each element of Array1:
Fill_Array(Array1,True);
BaseDataNumber
Returns a numerical value indicating the Data Number of the series that the study is applied to.
Usage
BaseDataNumber
Example
Assign a value, indicating the Data Number of the series that the study is applied to, to Value1
variable:
Value1=BaseDataNumber;
6.5.12.2 CurrentDataNumber
CurrentDataNumber
Returns a numerical value indicating the Data Number of the series that the function is being
calculated on.
Usage
CurrentDataNumber
Example
Assign a value, indicating the Data Number of the series that the function is being calculated on, to
Value1 variable:
Value1=CurrentDataNumber;
6.5.12.3 ExecOffset
ExecOffset
Returns a numerical value indicating the function execution offset in bars.
Usage
ExecOffset
Example
Assign a value, indicating the function execution offset, to Value1 variable:
Value1=ExecOffset;
6.5.12.4 GetCountry
GetCountry
Returns the locale name, corresponding to the Standards and formats setting selected in the
Regional Options settings of the Windows XP Control Panel.
Usage
GetCountry
Example
GetCountry will return a string expression "United States" for the setting "English (United States)"
6.5.12.5 GetCurrency
GetCurrency
Returns the currency symbol selected in the Regional Options settings of the Windows XP Control
Panel.
Usage
GetCurrency
Example
GetCurrency will return the "$" symbol for the US Dollar
6.5.12.6 GetUserID
GetUserID
Returns a unique identification number (UserID) for the PC that the study is being run on.
UserID number is used for study protection.
Usage
GetUserID
Example
Assign a value, indicating the UserID, to Value1 variable:
Value1=GetUserID;
6.5.12.7 MaxBarsBack
MaxBarsBack
Returns a numerical value indicating the Maximum Bars Back setting for the study.
All studies based on past data use a certain number of bars for their calculations. The number of
bars is called Maximum number of bars a study will reference, or Maximum Bars Back.
Usage
MaxBarsBack
Example
Assign a value, indicating the Maximum Bars Back setting for the study, to Value1 variable:
Value1=MaxBarsBack;
6.5.12.8 MaxBarsForward
MaxBarsForward
Returns a numerical value indicating the size, in bars, of the right margin on the chart.
Right margin is used by the studies that visualize the predicted price movement.
Usage
MaxBarsForward
Example
Assign a value, indicating the size of the right margin of the chart, to Value1 variable:
Value1=MaxBarsForward;
Abort
Generates a run-time error and aborts the execution of the study.
Usage
Abort
Example
Abort the study’s execution:
Abort;
6.5.13.2 fpCExact
fpcExactAccuracy
Constant, used in combination with SetFPCompareAccuracy 605 to designate the floating point
compare tolerance value of 0.00; can be substituted by a numerical value of 5.
Usage
SetFPCompareAccuracy(fpcExactAccuracy)
or:
SetFPCompareAccuracy(5)
Example
Set the floating point compare accuracy to Exact:
SetFPCompareAccuracy(fpcExactAccuracy);
6.5.13.3 fpCHighAccuracy
fpcHighAccuracy
Constant, used in combination with SetFPCompareAccuracy 605 to designate the floating point
compare tolerance value of 2.2204460492503131e-14; can be substituted by a numerical value of 3.
Usage
SetFPCompareAccuracy(fpcHighAccuracy)
or:
SetFPCompareAccuracy(3)
Example
Set the floating point compare accuracy to High:
SetFPCompareAccuracy(fpcHighAccuracy);
6.5.13.4 fpCLowAccuracy
fpcLowAccuracy
Constant, used in combination with SetFPCompareAccuracy 605 to designate the floating point
compare tolerance value of 2.2204460492503131e-10; can be substituted by a numerical value of 1.
Usage
SetFPCompareAccuracy(fpcLowAccuracy)
or:
SetFPCompareAccuracy(1)
Example
Set the floating point compare accuracy to Low:
SetFPCompareAccuracy(fpcLowAccuracy);
6.5.13.5 fpCMedAccuracy
fpcMedAccuracy
Constant, used in combination with SetFPCompareAccuracy 605 to designate the floating point
compare tolerance value of 2.2204460492503131e-12; can be substituted by a numerical value of 2.
Usage
SetFPCompareAccuracy(fpcMedAccuracy)
or:
SetFPCompareAccuracy(2)
Example
Set the floating point compare accuracy to Medium:
SetFPCompareAccuracy(fpcMedAccuracy);
6.5.13.6 fpCVeryHighAccuracy
fpcVeryHighAccuracy
Constant, used in combination with SetFPCompareAccuracy 605 to designate the floating point
compare tolerance value of 2.2204460492503131e-16; can be substituted by a numerical value of 4.
Usage
SetFPCompareAccuracy(fpcVeryHighAccuracy)
or:
SetFPCompareAccuracy(4)
Example
Set the floating point compare accuracy to Very High:
SetFPCompareAccuracy(fpcVeryHighAccuracy);
6.5.13.7 fpCVeryLowAccuracy
fpcVeryLowAccuracy
Constant, used in combination with SetFPCompareAccuracy 605 to designate the floating point
compare tolerance value of 2.2204460492503131e-8; can be substituted by a numerical value of 0.
Usage
SetFPCompareAccuracy(fpcVeryLowAccuracy)
or:
SetFPCompareAccuracy(0)
Example
Set the floating point compare accuracy to Very Low:
SetFPCompareAccuracy(fpcVeryLowAccuracy);
6.5.13.8 RaiseRuntimeError
RaiseRunTimeError
Generates a run-time error and displays the specified error message.
A run-time error will cause the execution of the study to be aborted.
Usage
RaiseRunTimeError("Message")
Where: Message - a string expression specifying the error message
Example
Generate a run-time error and display the message "Strategy Stopped":
RaiseRunTimeError("Strategy Stopped");
6.5.13.9 SetFPCompareAccuracy
SetFPCompareAccuracy
Sets floating point compare accuracy by specifying the tolerance value to be used when floating point
values are compared.
Two floating point values will be considered equal if "abs(Value1 – Value2) <= ε", where ε is the
tolerance value.
By default, the tolerance value is 2.2204460492503131e-012.
Usage
SetFPCompareAccuracy(Accuracy)
Parameters
Accuracy - an FPC constant or a numerical expression specifying a tolerance value as follows:
fpcV 0 02.220
eryLo 446049
wAccu 250313
racy 1e-8
fpcL 1 12.220
owAcc 446049
uracy 250313
1e-10
fpcM 2 22.220
edAcc 446049
uracy 250313
1e-12
(Defaul
t)
fpcH 3 32.220
ighAc 446049
curac 250313
y 1e-14
fpcV 4 42.220
eryHi 446049
ghAcc 250313
uracy 1e-16
fpcE 5 50.00
xact
Example
Set floating point compare accuracy to High:
SetFPCompareAccuracy(3);
AbsValue
Returns the absolute value of the specified numerical expression.
Usage
AbsValue(Value)
Where: Value - a numerical expression
Example
AbsValue(45.275) will return a value of 45.275
AbsValue(-1385) will return a value of 1385
6.5.14.2 Arctangent
ArcTangent
Returns the arctangent value, in degrees, of the specified numerical expression.
Usage
ArcTangent(Value)
Where: Value - a numerical expression
Example
ArcTangent(2.318) will return a value of 66.66
6.5.14.3 AvgList
AvgList
Returns the average value of the specified numerical expressions.
Usage
AvgList(Value1,Value2,Value3, etc.)
Where: Value1, Value2, Value3, etc. - numerical expressions
Example
AvgList(45,40,0,35) will return a value of 30
AvgList(-40,20) will return a value of -10
6.5.14.4 Ceiling
Ceiling
Returns the smallest integer greater than or equal to the specified numerical expression.
Usage
Ceiling(Value)
Where: Value - a numerical expression
Example
Ceiling(9.1) will return a value of 10
Ceiling(-2.85) will return a value of -2
6.5.14.5 Cosine
Cosine
Returns the cosine value for an angle of the specified number of degrees.
Usage
Cosine(Value)
Where: Value - a numerical expression, specifying the number of degrees in the angle
Example
Cosine(60) will return a value of 0.5
6.5.14.6 Cotangent
Cotangent
Returns the cotangent value for an angle of the specified number of degrees.
Usage
Cotangent(Value)
Where: Value - a numerical expression, specifying the number of degrees in the angle
Example
Cotangent(30) will return a value of 1.732
6.5.14.7 ExpValue
ExpValue
Returns the exponential value of the specified numerical expression.
Usage
ExpValue(Value)
Where: Value - a numerical expression
Example
ExpValue(2.3) will return a value of 9.0250
6.5.14.8 Floor
Floor
Returns the greatest integer less than or equal to the specified numerical expression.
Usage
Floor(Value)
Where: Value - a numerical expression
Example
Floor(9.1) will return a value of 9
Floor(-2.85) will return a value of -3
6.5.14.9 FracPortion
FracPortion
Returns the fractional portion of the specified numerical expression while retaing the sign.
Usage
FracPortion(Value)
Where: Value - a numerical expression
Example
FracPortion(-45.275) will return a value of -0.275
FracPortion(1385) will return a value of 0
6.5.14.10 IntPortion
IntPortion
Returns the integer portion of the specified numerical expression while retaing the sign.
Usage
IntPortion(Value)
Where: Value - a numerical expression
Example
IntPortion(-45.75) will return a value of -45
IntPortion(1385) will return a value of 1385
6.5.14.11 Log
Log
Returns the natural logarithm of the specified numerical expression.
Usage
Log(Value)
Where: Value - a numerical expression
Example
Log(25) will return a value of 3.2189
6.5.14.12 MaxList
MaxList
Returns the value of the greatest of the specified numerical expressions.
Usage
MaxList(Value1,Value2,Value3, etc.)
Where: Value1, Value2, Value3, etc. - numerical expressions
Example
MaxList(-5,0,12,7) will return a value of 12
6.5.14.13 MaxList2
MaxList2
Returns the second highest value of the specified numerical expressions.
Usage
MaxList2(Value1,Value2,Value3, etc.)
Where: Value1, Value2, Value3, etc. - numerical expressions
Example
MaxList2(-5,0,12,7) will return a value of 7
6.5.14.14 MinList
MinList
Returns the lowest value of the specified numerical expressions.
Usage
MinList(Value1,Value2,Value3, etc.)
Where: Value1,Value2,Value3, etc. - numerical expressions
Example
MinList(-5,0,12,7) will return a value of -5
6.5.14.15 MinList2
MinList2
Returns the second lowest value of the specified numerical expressions.
Usage
MinList2(Value1,Value2,Value3, etc.)
Where: Value1,Value2,Value3, etc. - numerical expressions
Example
MinList(-5,0,12,7) will return a value of 0
6.5.14.16 Mod
Mod
Returns the remainder from dividing one specified numerical expression by another.
Usage
Mod(Dividend,Divisor)
Where: Dividend - a numerical expression
Divisor - a numerical expression
Example
Mod(25,7) will return a value of 4
6.5.14.17 Neg
Neg
Returns the negative absolute value of the specified numerical expression.
Usage
Neg(Value)
Where: Value - a numerical expression
Example
Neg(12) will return a value of -12
Neg(-7) will return a value of -7
6.5.14.18 NthMaxList
NthMaxList
Returns the Nth highest value of the specified numerical expressions.
Usage
NthMaxList(N,Value1,Value2,Value3, etc.)
Where: N - a numerical expression, indicating the rank of the value to be returned
Value1,Value2,Value3, etc. - numerical expressions
Example
NthMaxList(4,-15,-5,0,6,12) will return a value of -5
6.5.14.19 NthMinList
NthMinList
Returns the Nth lowest value of the specified numerical expressions.
Usage
NthMinList(N,Value1,Value2,Value3, etc.)
Where: N - a numerical expression, indicating the rank of the value to be returned
Value1, Value2, Value3, etc. - numerical expressions
Example
NthMinList(4,-15,-5,0,6,12) will return a value of 6
6.5.14.20 Pos
Pos
Same as AbsValue 606
6.5.14.21 Power
Power
Returns the value of one specified numerical expression to the power of another.
Usage
Power(Base,Exponent)
Where: Base - a numerical expression
Exponent - a numerical expression
Example
Power(5,3) will return a value of 125
6.5.14.22 Random
Random
Returns a pseudo-random number between 0 and the value of the specified numerical expression.
Usage
Random(Value)
Where: Value - a numerical expression
Example
Random(1.25) will return a random value anywhere between 0 and 1.25
Random(-10) will return a random value anywhere between -10 and 0
6.5.14.23 Round
Round
Returns the value of one specified numerical expression rounded to the number of decimal places
specified by another.
Usage
Round(Value,Precision)
Where: Value - a numerical expression
Precision - a numerical expression
Example
Round(1.237,2) will return a value of 1.24
Round(-5.7744,3) will return a value of –5.774
6.5.14.24 Sign
Sign
Returns a numerical value, indicating the sign of the value of the specified numerical expression.
A value of 1 is returned for a positive value, -1 is returned for a negative value, and 0 is returned for
the value of 0.
Usage
Sign(Value)
Where: Value - a numerical expression
Example
Sign(5) will return a value of 1
Sign(-2.85) will return a value of -1
Sign(0) will return a value of 0
6.5.14.25 Sine
Sine
Returns the sine value for an angle of the specified number of degrees.
Usage
Sine(Value)
Where: Value - a numerical expression, specifying the number of degrees in the angle
Example
Sine(30) will return a value of 0.5
6.5.14.26 Square
Square
Returns the square of the value of the specified numerical expression.
Usage
Square(Value)
Where: Value - a numerical expression
Example
Square(2.5) will return a value of 6.25
6.5.14.27 SquareRoot
SquareRoot
Returns the square root of the value of the specified numerical expression.
Usage
SquareRoot(Value)
Where: Value - a numerical expression
Example
SquareRoot(57.73) will return a value of 7.598
6.5.14.28 SumList
SumList
Returns a sum of the values of the specified numerical expressions.
Usage
SumList(Value1,Value2,Value3, etc.)
Where: Value1, Value2, Value3, etc. - numerical expressions
Example
SumList(45,-20,0,35) will return a value of 60
6.5.14.29 Tangent
Tangent
Returns the tangent value for an angle of the specified number of degrees.
Usage
Tangent(Value)
Where: Value - a numerical expression, specifying the number of degrees in the angle
Example
Tangent(40) will return a value of 0.839
6.5.15 Output
6.5.15.1 ClearDebug
ClearDebug
Clears the PowerLanguage Editor Output Log.
Usage
ClearDebug
Example
ClearDebug; will clear the PowerLanguage Editor Output Log
6.5.15.2 File
File
Used in Print statements to specify an ASCII file as the output location; must precede the
expressions to be printed and be followed by a comma. If the specified file does not exist, the file will
be created.
Usage
File("PathFilename")
Where: PathFilename - a string expression specifying the path and filename
Example
Print(File("C:\test.txt"),CurrentDate,CurrentTime); will save the output of
CurrentDate and CurrentTime to the test.txt file in the root directory of the C: hard drive
6.5.15.3 FileAppend
FileAppend
Appends the specified string expression to the end of the specified ASCII file; if the specified file
does not exist, the file will be created.
Usage
FileAppend("PathFilename","StringExpression")
Where: PathFilename - a string expression specifying the path and filename
StringExpression - the string expression to be appended to a file
Example
FileAppend("C:\test.txt","Appended Text"); will append the string expression
"Appended Text" to the end of the test.txt file in the root directory of the C: hard drive
6.5.15.4 FileDelete
FileDelete
Deletes the specified file.
Usage
FileDelete("PathFilename")
Where: PathFilename - a string expression specifying the path and filename of the file to be
deleted
Example
FileDelete("C:\test.txt"); will delete the file test.txt in the root directory of the C: hard drive
6.5.15.5 MessageLog
MessageLog
Displays one or more specified expressions in the PowerLanguage Editor Output Log. Any
combination of string, true/false, numerical series, or numerical expressions can be specified.
Usage
MessageLog(Expression1,Expression2,etc.)
Parameters
Expression - a string, true/false, numerical series, or numerical expression; any number of valid
expressions, separated by commas, can be used
The default output format for a numerical expression is two decimal places and a minimum of
seven characters.
If the number of decimal places in the numerical expression is more than the specified number,
the value will be will be rounded off to the specified number of decimal places.
If the number of characters in the output is less than the specified minimum, leading spaces will
be added to bring the output to the specified minimum value.
Example
MessageLog(.1); will display 0.10 in the PowerLanguage Editor Output Log, with three leading
spaces inserted
MessageLog(1.555555:6:3); will display 1.556 in the PowerLanguage Editor Output Log, with
one leading space inserted
MessageLog("Current Time is:",CurrentTime:5:0); will display the string expression
"Current Time is:", followed by the output of the CurrentTime, with one leading space inserted, in
the PowerLanguage Editor Output Log
6.5.15.6 PlaySound
PlaySound
Plays the specified wave (.wav) sound file.
Usage
PlaySound("PathFilename")
Where: PathFilename - a string expression specifying the path and filename of the wave file to be
played
Example
Play ding.wav sound file located in the root directory of the C: hard drive:
PlaySound("C:\ding.wav");
6.5.15.7 Print
Print
Sends one or more specified expressions to the PowerLanguage Editor Output Log or another output
target, if specified. Any combination of string, true/false, numerical series, or numerical expressions
can be specified.
Usage
Print([OutputTarget],Expression1,Expression2,etc.)
Parameter inside the square brackets is optional
Parameters
OutputTarget - an optional parameter; specifies an output target other then the
PowerLanguage Editor Output Log; the parameter must be followed by a comma.
Printer
Specifies the default printer as the output target.
File("PathFilename")
Where: PathFilename - a string expression specifying the path and filename
Specifies an ASCII file as the output target; if the specified file does not exist, the file will be
created.
If OutputTarget is not specified, the output will be sent to the PowerLanguage Editor Output
Log.
Expression - a string, true/false, numerical series, or numerical expression; any number of valid
expressions, separated by commas, can be used
The default output format for a numerical expression is two decimal places and a minimum of
seven characters.
If the number of decimal places in the numerical expression is more than the specified number,
the value will be will be rounded off to the specified number of decimal places.
If the number of characters in the output is less than the specified minimum, leading spaces will
be added to bring the output to the specified minimum value.
Example
Print(.1); will print 0.10 in the PowerLanguage Editor Output Log, with three leading spaces
inserted
Print(1.555555:6:3); will print 1.556 in the PowerLanguage Editor Output Log, with one
leading space inserted
Print(Printer,"Print Test"); will send the string expression "Print Test" to the default
printer
Print(File("C:\test.txt"),CurrentDate,CurrentTime); will save the output of
CurrentDate and CurrentTime to the test.txt file in the root directory of the C: hard drive
6.5.15.8 Printer
Printer
Used in Print statements to specify the default printer as the output target; must precede the
expressions to be printed and be followed by a comma.
Usage
Printer
Example
Print(Printer,"Print Test"); will send the string expression "Print Test" to the default
printer
6.5.16 Plotting
6.5.16.1 Default
Default
Used in plot statements to specify a default style. Default styles are set by the user.
For more information see Plot 648
Usage
Default
Example
Plot the closing price using the default styles (color and width):
Plot1(Close,"Close",Default,Default,Default);
6.5.16.2 GetBackgroundColor
GetBackgroundColor
Returns an RGB color number or a legacy color value that correspond to the background color of the
chart.
Usage
GetBackgroundColor
Example
Assign an RGB color number, corresponding to the background color of the chart, to Value1 variable:
Value1=GetBackgroundColor;
Assign a legacy color value, corresponding to the background color of the chart, to Value1 variable:
[LegacyColorValue=True];
Value1=GetBackgroundColor;
6.5.16.3 GetPlotColor
GetPlotColor
Returns an RGB color number or a legacy color value that correspond to the color of the specified
plot.
Usage
GetPlotColor(PlotNumber)
Where: PlotNumber - a numerical expression specifying the plot number; plot numbers range from
1 to 999
Example
Assign an RGB color number, corresponding to the color of Plot1, to Value1 variable:
Value1=GetPlotColor(1);
Assign a legacy color value, corresponding to the color of Plot1, to Value1 variable:
[LegacyColorValue=True];
Value1=GetPlotColor(1);
6.5.16.4 GetPlotWidth
GetPlotWidth
Returns the plot line width value of the specified plot. Plot line width values range from 0 to 14.
Usage
GetPlotWidth(PlotNumber)
Where: PlotNumber - a numerical expression specifying the plot number; plot numbers range from
1 to 999
Example
Assign the plot line width value of Plot1 to Value1 variable:
Value1=GetPlotWidth(1);
6.5.16.5 NoPlot
NoPlot
Removes a specified plot from the current bar.
A conditional plot that is already drawn will remain even if the conditions become no longer true
before the bar is closed. NoPlot can be used to remove the conditional plot from the current bar if the
conditions are no longer true.
Usage
NoPlot(PlotNumber)
Where: PlotNumber - a numerical expression specifying the plot number; plot numbers range from
1 to 999
Example
The example below uses NoPlot remove the PlotPaintBar plot "painted" over the chart’s bars for
which the High price is no longer less then the High price of the previous bar:
If High<High[1] Then Begin
PlotPaintBar(High,Low,"",Red);
End
Else Begin
NoPlot(1);
NoPlot(2);
End;
Without NoPlot, chart’s bars for which a High price was initially less then the High price of the
previous bar would remain partially “painted” even if a High price equal to or greater then the High
price of the previous bar was reached before the bar was closed.
6.5.16.6 Plot
Plot
Plots the specified numerical or string expression on a chart, up to 999 different plots can be used
simultaneously.
Numerical: Plot offset, name, color, and plot line width can be specified by using the optional
parameters.
String: Ability to show a user-defined text message on the status line of the chart or in the scanner.
Usage
Numerical: PlotN<[Offset]>(Expression <,"PlotName"<,PlotColor <,Scanner Cell
Background Color <,LineWidth >>>>)
Text: PlotN("String")
Parameters inside the angled brackets are optional
Parameters
N - a number used to identify the plot; plot numbers can range from 1 to 999
Offset - an optional parameter; a numerical expression specifying the plot offset, in bars; a
positive value will displace the plot to the left along the time axis, and a negative value will
displace the plot to the right along the time axis
Expression - the numerical expression to be plotted
PlotName - an optional parameter; assigns a name to the plot
PlotColor - an optional parameter; specifies the plot color
Plot color can be specified by a numerical expression representing an RGB color number or a
legacy color value, by one of 17 base color words, or by the word Default to specify the color
chosen by the user. In order for PlotColor to be used, PlotName parameter must also be used.
Scanner Cell Background Color - an optional parameter; sets the background color of the
scanner cell if this plot is applied to a scanner; use the word Default to specify the color chosen
by the user. In order for Scanner Cell Background Color to be used, PlotName and
PlotColor parameters must also be used.
LineWidth - an optional parameter; specifies the plot line width, ranging from 1 to 14
Plot line width can be specified as a numerical expression or by the word Default to specify the
line width chosen by the user. In order for LineWidth to be used, PlotName, PlotColor, and
Scanner Cell Background Color parameters must also be used.
String - text to be displayed
Example
Plot the closing price using the default plot color and line width:
Plot1(Close);
Plot the closing price using the default plot color and line width, and name the plot "Close":
Plot1(Close,"Close",Default,Default,Default);
Plot the closing price, offset back by 3 bars, using the plot color of blue, using cell background color
of green if this plot is applied to a scanner, line width of 3, and name the plot "Close 3 bars later":
Plot1[3](Close,"Close 3 bars later",Blue,Green,3);
Plot the closing price, offset forward by 3 bars, using the RGB color 2138336 (Orange), and name
the plot "Close 3 bars ago":
Plot1[-3](Close,"Close 3 bars ago",2138336);
Plot the closing price using the legacy color value of 4 (Green) and name the plot "Close":
[LegacyColorValue=True];
Plot1(Close,"Close",4);
Show the text "Attention!" on the status bar of the chart or in the scanner.
Plot1("Attention!");
Show the text "Attention!" on the status bar of the chart or in the scanner if the close price is greater
than 100.
If close > 100 then Plot1("Attention!");
6.5.16.7 PlotPaintBar
PlotPaintBar
Plots the specified numerical expressions in the form of a bar chart.
Plot name, color, and plot line width can be specified by using the optional parameters.
PlotPaintBar plot can be superimposed on top of one or more bars of a bar chart, effectively
"painting" the bars.
Usage
PlotPaintBar (BarHigh, BarLow, BarOpen, BarClose <,"PlotName"<,PlotColor <,
Default <,LineWidth >>>>)
Parameters inside the angled brackets are optional
Parameters
BarHigh, BarLow, BarOpen, BarClose - numerical expressions specifying the High, Low,
Open, & Close prices for the bars to be plotted; at least two of these parameters are required
PlotName - an optional parameter; assigns a name to the plot
PlotColor - an optional parameter; specifies the plot color
Plot color can be specified by a numerical expression representing an RGB color number or a
legacy color value, by one of 17 base color words, or by the word Default to specify the color
chosen by the user. In order for PlotColor to be used, PlotName parameter must also be used.
Default - an optional parameter reserved for future use; should be specified as Default; use of
this parameter is required in order for LineWidth to be used
LineWidth - an optional parameter; specifies the plot line width, ranging from 1 to 14
Plot line width can be specified as a numerical expression or by the word Default to specify the
line width chosen by the user. In order for LineWidth to be used, PlotName, PlotColor, and
Default parameters must also be used.
Notes
PlotPaintBar(BarHigh,BarLow,BarOpen,BarClose);
is the equivalent of:
Plot1(BarHigh);
Plot2(BarLow);
Plot3(BarOpen);
Plot4(BarClose);
In order for the PlotPaintBar plot to be displayed in the form of a bar chart, the plot type for each Plot
must be set, in the Style section of the General tab of the Format Indicator window, to Bar High, Bar
Low, Left Tick, and Right Tick, respectively.
Example
Paint red these bars of an OHLC chart for which the Open price is less then the Open price of the
previous bar:
If Open<Open[1] Then
PlotPaintBar(High,Low,Open,Close,"",Red);
6.5.16.8 PlotPB
PlotPB
Same as the PlotPaintBar 650
6.5.16.9 SetPlotColor
SetPlotColor
Assigns a specified color to the specified plot for the duration of the current bar.
Usage
SetPlotColor(PlotNumber,PlotColor)
Parameters
PlotNumber - a numerical expression specifying the plot number; plot numbers range from 1 to
999
PlotColor - an expression specifying the plot color
Plot color can be specified by a numerical expression representing an RGB color number or a
legacy color value, or by one of 17 base color words.
Example
Assign the color of blue to plot1 for the duration of the current bar:
SetPlotColor(1,Blue);
Assign RGB color 2138336 (Orange) to plot1 for the duration of the current bar:
SetPlotColor(1,2138336);
Assign legacy color 4 (Green) to plot1 for the duration of the current bar:
[LegacyColorValue=True];
SetPlotColor(1,4);
6.5.16.10 SetPlotBGColor
SetPlotBGColor
Assigns a specified color to the cell background for the indicated study plot for the duration of the
current bar.
Use of SetBGPlotColor is effective only for the Scanner.
Usage
SetPlotBGColor(PlotNumber,PlotColor)
Parameters
PlotNumber - a numerical expression specifying the plot number; plot numbers range from 1 to
999
PlotColor - an expression specifying the cell background color for the indicated plot. Cell
background color for the indicated plot can be specified by a numerical expression representing
an RGB color number, a legacy color value, or by one of 17 base color words.
Example
Assign the color of blue to the indicated cell of the plot1 for the duration of the current bar:
SetPlotBGColor(1,Blue);
Assign RGB color 2138336 (Orange) to the indicated cell of the plot1 for the duration of the current
bar:
SetPlotColor(1,2138336);
Assign legacy color 4 (Green) to the indicated cell of the plot1 for the duration of the current bar:
[LegacyColorValue=True];
SetPlotBGColor(1,4);
Portfolio_GrossLoss
Returns a negative numerical value, indicating the total currency value of all completed losing trades
for a portfolio.
Usage
Portfolio_GrossLoss
Notes
This function can only be used in signals intended to be used with the Portfolio Backtester.
Example
Portfolio_GrossLoss will return a value of -50 if there were a total of four losing trades, at 10, 5,
20, and 15
Portfolio_GrossLoss will return a value of 0 if no losing trades were completed during the entire
trading period
6.5.17.2 Portfolio_GrossProfit
Portfolio_GrossProfit
Returns a numerical value, indicating the total currency value of all completed winning trades for a
portfolio.
Usage
Portfolio_GrossProfit
Notes
This function can only be used in signals intended to be used with the Portfolio Backtester.
Example
Portfolio_GrossProfit will return a value of 50 if there were a total of four winning trades, at 10,
5, 20, and 15
Portfolio_GrossProfit will return a value of 0 if no winning trades were completed during the
entire trading period
6.5.17.3 Portfolio_MaxIDDrawdown
Portfolio_MaxIDDrawdown
Returns a negative numerical value, indicating the largest decline in equity for the entire portfolio
during the trading period.
Usage
Portfolio_MaxIDDrawdown
Notes
This function can only be used in signals intended to be used with the Portfolio Backtester.
Example
Portfolio_MaxIDDrawdown will return a value of -500 if the largest decline in equity during the
entire trading period was $500
6.5.17.4 Portfolio_NetProfit
Portfolio_NetProfit
Returns a numerical value, indicating the total currency value of all completed trades for a portfolio.
Usage
Portfolio_NetProfit
Notes
This function can only be used in signals intended to be used with the Portfolio Backtester.
Example
Portfolio_NetProfit will return a value of 20 if there were winning trades at 25 and 10, and
losing trades at 5 and 10
Portfolio_NetProfit will return a value of -15 if there were winning trades at 10 and 5, and
losing trades at 20 and 10
Portfolio_NetProfit will return a value of 0 no trades were completed during the entire trading
period
6.5.17.5 Portfolio_NumLossTrades
Portfolio_NumLossTrades
Returns a numerical value, indicating the number of all completed losing trades for a portfolio.
Usage
Portfolio_NumLossTrades
Notes
This function can only be used in signals intended to be used with the Portfolio Backtester.
Example
Portfolio_NumLossTrades will return a value of 5 if there were a total of five completed losing
trades
Portfolio_NumLossTrades will return a value of 0 if no losing trades were completed during the
entire trading period
6.5.17.6 Portfolio_NumWinTrades
Portfolio_NumWinTrades
Returns a numerical value, indicating the number of all completed winning trades for a portfolio.
Usage
Portfolio_NumWinTrades
Notes
This function can only be used in signals intended to be used with the Portfolio Backtester.
Example
Portfolio_NumWinTrades will return a value of 5 if there were a total of five completed winning
trades
Portfolio_NumWinTrades will return a value of 0 if no winning trades were completed during the
entire trading period
6.5.17.7 Portfolio_PercentProfit
Portfolio_PercentProfit
Returns a numerical value, indicating the percentage of winning trades in all trades completed for a
portfolio.
Usage
Portfolio_PercentProfit
Notes
This function can only be used in signals intended to be used with the Portfolio Backtester.
Example
Portfolio_PercentProfit will return a value of 70 if seven out of the total of 10 completed
trades were winning trades
6.5.17.8 Portfolio_StrategyDrawdown
Portfolio_StrategyDrawdown
Returns a negative numerical value, indicating the current decline in equity for the entire portfolio
from the peak value for the entire trading period.
Usage
Portfolio_StrategyDrawdown
Notes
This function can only be used in signals intended to be used with the Portfolio Backtester.
Example
Portfolio_StrategyDrawdown will return a value of -100 if the current decline in equity from the
peak value is $100
6.5.17.9 Portfolio_TotalTrades
Portfolio_TotalTrades
Returns a numerical value, indicating the total number of all completed trades for a portfolio.
Usage
Portfolio_TotalTrades
Notes
This function can only be used in signals intended to be used with the Portfolio Backtester.
Example
Portfolio_TotalTrades will return a value of 5 if there were a total of five completed trades
Portfolio_TotalTrades will return a value of 0 if no trades were completed during the entire
trading period
Portfolio_CalcMaxPotentialLossForEntry
Calculates and returns maximum potential loss (not including margin, commision or slippage) if user
entered the position with the number of Contracts and Price of entry.
Usage
Portfolio_CalcMaxPotentialLossForEntry (Side <,Contracts <,Price>>);
Parameters inside the angled brackets are optional
Parameters
Side is a numerical expression specifying the entry type (e.g. 1 Long entry or -1 Short entry).
Contracts is an optional parameter specifying the number of contracts. If the Contracts
parameter is not specified, then the number of contracts indicated in the Format Settings dialog
window under the Properties tab is used by default.
Price is an optional parameter specifying the price value. If the Price parameter is not
specified, then the Close price value of the current bar will be used by default. This parameter can
be rounded down if entered a Short position or rounded up if entered a Long position.
Notes
This function can only be used in signals intended to be used with the Portfolio Backtester.
Example
Portfolio_CalcMaxPotentialLossForEntry (0, 25, High) will return a value of 0, since
the parameter Side=0
Portfolio_CalcMaxPotentialLossForEntry (1, 100, Close) will return the maximum
potential loss (not including margin, commision or slippage) if user entered a Long position for 100
contracts at the Close price.
Portfolio_CalcMaxPotentialLossForEntry (-1, 5, Open) will return the maximum
potential loss (not including margin, commision or slippage) if user entered a Short position for 5
contracts at Open price.
Portfolio_CalcMaxPotentialLossForEntry (1) will return the maximum potential loss (not
including margin, commision or slippage) if the user entered a Long position for a number of
contracts indicated in the Format Settings dialog window under the Properties tab at Close price.
6.5.18.2 Portfolio_CurrentEntries
Portfolio_CurrentEntries
Returns a numerical value, indicating the combined number of entries currently open within a
portfolio.
Usage
Portfolio_CurrentEntries
Notes
This function can only be used in signals intended to be used with the Portfolio Backtester.
Example
Assign a value, indicating the combined number of entries currently open within a portfolio, to Value1
variable:
Value1=Portfolio_CurrentEntries;
6.5.18.3 Portfolio_MaxOpenPositionPotentialLoss
Portfolio_MaxOpenPositionPotentialLoss
Returns a dollar value indicating the combined potential loss (not including margin, commision or
slippage) for the traded symbols' open position within the portfolio.
Usage
SetStopPosition;
SetStopLoss(Portfolio_MaxOpenPositionPotentialLoss);
Notes
This function can only be used in signals intended to be used with the Portfolio Backtester.
Example
value1 = Portfolio_MaxOpenPositionPotentialLoss;
if value1 <> 0 then begin
SetStopPosition;
SetStopLoss (value1);
end;
6.5.18.4 Portfolio_OpenPositionProfit
Portfolio_OpenPositionProfit
Returns a numerical value, indicating the current combined profit or loss for all open positions within
a portfolio.
Usage
Portfolio_OpenPositionProfit
Notes
This function can only be used in signals intended to be used with the Portfolio Backtester.
Example
Portfolio_OpenPositionProfit will return a value of 0 if there are currently no open positions
within a portfolio
Portfolio_OpenPositionProfit will return a value of 100 if the combined value of all open
positions within a portfolio has increased by $100 since the positions were entered
Portfolio_OpenPositionProfit will return a value of -50 if the combined value of all open
positions within a portfolio has decreased by $50 since the positions were entered
6.5.18.5 Portfolio_SetMaxPotentialLossPerContract
Portfolio_SetMaxPotentialLossPerContract
Redefines the values for the indicated symbol. The values in the $ box if the Absolute Max Potential
Loss option is selected or the values in the % box if the Max Potential Loss is selected.
The newly set value is valid during the strategy calculation or until the
Portfolio_SetMaxPotentialLossPerContract is requested again assigning a new value.
Usage
Portfolio_SetMaxPotentialLossPerContract(NewValue);
Parameters
NewValue is a numerical value that can be:
· an absolute value in the range [-100, -0.001]; defines percentage of the maximum potential loss
per contract. (Max Potential Loss: %)
· a value in the range [0.001, 1e+29]; defines the maximum potential loss per contract in dollars.
(Absolute Max Potential Loss: $)
· equal 0; in this case the value entered in the Format Settings dialog window under the
Portfolio Settings tab is used.
Portfolio_SetMaxPotentialLossPerContract returns:
· True if the value is in one of the ranges indicated above. Redefining is considered to be
succesfull.
· False if the if the value is out of the ranges indicated above. Redefining is considered
unsuccessful and the Max Potential Loss value is unchanged.
Notes
This function can only be used in signals intended to be used with the Portfolio Backtester.
Example
If "MSFT"=SymbolName then Portfolio_SetMaxPotentialLossPerContract (-10);
the new value of -10 is assigned for the symbol "MSFT" only if such symbol is exist in the portfolio.
Portfolio_SetMaxPotentialLossPerContract (-5); redefines the percentage value of the
maximum potential loss per contract for 5%.
Portfolio_SetMaxPotentialLossPerContract (200); redefines the maximum potential
loss per contract for $200.
Portfolio_GetMarginPerContract
Returns:
· a numerical value indicated in the % of contract cost box multiplied by -1, if the Margin value
option is selected; or:
· the same value as a reserved word Margin 819 if the Absolute Margin Value option is selected.
Usage
Portfolio_GetMarginPerContract
Parameters
This function can only be used in signals intended to be used with the Portfolio Backtester.
Example
Portfolio_GetMarginPerContract will return a value of 0 if Absolute Margin Value option is
selected and the margin does not exist in the QuoteManager symbol settings. Not all of the securities
can be bought on margin. The margin value can be returned for futures or options.
Portfolio_GetMarginPerContract will return a value of 25 if Absolute Margin Value option is
selected and the margin box in the Edit Symbol dialog window under Future tab in QuoteManager
contains the value of 25.
Portfolio_GetMarginPerContract will return a value of -10 if the Margin Value option is
selected and the % of contract cost box contains the value of 10.
6.5.19.2 Portfolio_GetMaxPotentialLossPerContract
Portfolio_GetMaxPotentialLossPerContract
Returns:
· a numerical value indicated in the % box multiplied by -1, if the Max Potential Loss option is
selected in the Format Settings dialog window under the Portfolio Settings tab; or:
· a numerical value indicated in the $ box, if the Absolute Max Potential Loss option is selected in
the Format Settings dialog window under the Portfolio Settings tab.
Usage
Portfolio_GetMaxPotentialLossPerContract
Notes
This function can only be used in signals intended to be used with the Portfolio Backtester.
Example
Portfolio_GetMaxPotentialLossPerContract will return -5 if the Max Potential Loss option
is selected and % box value is 5 under the Portfolio Settings tab in the Format Settings dialog
window.
Portfolio_GetMaxPotentialLossPerContract will return 0.001 if the Absolute Max
Potential Loss option is selected and $ box value is 0.001 under the Portfolio Settings tab in the
Format Settings dialog window.
6.5.19.3 Portfolio_MaxRiskEquityPerPosPercent
Portfolio_MaxRiskEquityPerPosPercent
Returns the Max % of Equity at Risk per Position numerical value set by the user in the Portfolio
Settings tab of the Portfolio Backtester Format Settings window.
Usage
Portfolio_MaxRiskEquityPerPosPercent
Notes
This function can only be used in signals intended to be used with the Portfolio Backtester.
Example
Portfolio_MaxRiskEquityPerPosPercent will return the Max % of Equity at Risk per Position
numerical value set by the user
6.5.19.4 Portfolio_TotalMaxRiskEquityPercent
Portfolio_TotalMaxRiskEquityPercent
Returns the equity Exposure % numerical value set by the user in the Portfolio Settings tab of the
Portfolio Backtester Format Settings window.
Usage
Portfolio_TotalMaxRiskEquityPercent
Notes
This function can only be used in signals intended to be used with the Portfolio Backtester.
Example
Portfolio_TotalMaxRiskEquityPercent will return the equity Exposure % numerical value
set by the user.
6.5.19.5 PortfolioEntriesPriority
PortfolioEntriesPriority
Assigns a priority to each entry order within a portfolio.
If execution of all entries generated for a portfolio would cause the capital limits to be exceeded, the
entries with the highest priority will receive preference, while the entries with the lowest priority will
not be executed.
If PortfolioEntriesPriority is not specified, the entries will be executed according to the order the
symbols are listed in the symbol grid of the Portfolio Backtester.
Usage
PortfolioEntriesPriority=Priority
Where: Priority - a numerical expression specifying the entry order execution priority; a greater
value indicates a higher priority
Notes
This function can only be used in signals intended to be used with the Portfolio Backtester.
Example
Assign higher execution priority to entry orders for symbols with lower share prices:
PortfolioEntriesPriority=(-Close);
CurrentOpenInt
Returns a numerical value indicating the last known open interest for the symbol that the study is
applied to.
Usage
CurrentOpenInt
Notes
Quote Fields cannot be referenced historically.
Example
CurrentOpenInt will return the last known open interest
6.5.20.2 DailyClose
DailyClose
Returns a numerical value indicating the most recent Close price.
Usage
DailyClose
Notes
Quote Fields cannot be referenced historically.
Example
DailyClose will return the most recent Close price
6.5.20.3 DailyHigh
DailyHigh
Returns a numerical value indicating the High price for the current trading session.
Usage
DailyHigh
Notes
Quote Fields cannot be referenced historically.
Example
DailyHigh will return the High price for the current trading session
6.5.20.4 DailyLow
DailyLow
Returns a numerical value indicating the Low price for the current trading session.
Usage
DailyLow
Notes
Quote Fields cannot be referenced historically.
Example
DailyLow will return the Low price for the current trading session
6.5.20.5 DailyOpen
DailyOpen
Returns a numerical value indicating the opening price for the current trading session.
Usage
DailyOpen
Notes
Quote Fields cannot be referenced historically.
Example
DailyOpen will return the Open price for the current trading session
6.5.20.6 DailyVolume
DailyVolume
Returns a numerical value indicating the current total trade volume for the trading session.
Usage
DailyVolume
Notes
Quote Fields cannot be referenced historically.
Example
DailyVolume will return the current total trade volume
6.5.20.7 Description
Description
Returns a string expression containing the description for the symbol that the study is applied to; if no
description is available, a blank ("") string expression will be returned.
Usage
Description
Example
Description will return "GOOGLE INC" for Google
6.5.20.8 ExchListed
ExchListed
Returns a string expression containing the exchange name for the symbol that the study is applied to.
Usage
ExchListed
Example
ExchListed will return "NASD" for Google
ExchListed will return "CME" for E-mini S&P 500
6.5.20.9 InsideAsk
InsideAsk
Returns a numerical value indicating the current best Ask for the symbol that the study is applied to.
Usage
InsideAsk
Notes
Quote Fields cannot be referenced historically.
Example
InsideAsk will return the current best Ask
6.5.20.10 InsideBid
InsideBid
Returns a numerical value indicating the current best Bid for the symbol that the study is applied to.
Usage
InsideBid
Notes
Quote Fields cannot be referenced historically.
Example
InsideBid will return the current best Bid
6.5.20.11 Last
Last
Returns a numerical value indicating the price of the last completed trade.
Usage
Last
Notes
Quote Fields cannot be referenced historically.
Example
Last will return the price of the last trade
6.5.20.12 PrevClose
PrevClose
Returns a numerical value indicating the closing price of the previous trading session.
Usage
PrevClose
Notes
Quote Fields cannot be referenced historically.
Example
PrevClose will return the Close of the previous trading session
6.5.20.13 q_Ask
q_Ask
Retained for backward compatibility; replaced with InsideAsk 681 .
6.5.20.14 q_Bid
q_Bid
Retained for backward compatibility; replaced with InsideBid 682 .
6.5.20.15 q_BigPointValue
q_BigPointValue
Retained for backward compatibility; replaced with BigPointValue 427 .
6.5.20.16 q_Date
q_Date
Retained for backward compatibility; replaced with TradedDate 698 .
6.5.20.17 q_ExchangeListed
q_ExchangeListed
Retained for backward compatibility; replaced with ExchListed 680 .
6.5.20.18 q_Last
q_Last
Retained for backward compatibility; replaced with Last 683 .
6.5.20.19 q_OpenInterest
q_OpenInterest
Retained for backward compatibility; replaced with CurrentOpenInt 673 .
6.5.20.20 q_PreviousClose
q_PreviousClose
Retained for backward compatibility; replaced with PrevClose 684 .
6.5.20.21 q_Time
q_Time
Retained for backward compatibility; replaced with TradeTime 699 .
6.5.20.22 q_TotalVolume
q_TotalVolume
Retained for backward compatibility; replaced with DailyVolume 678 .
6.5.20.23 SetPlotWidth
SetPlotWidth
Assigns a specified line width to the specified plot for the duration of the current bar.
Usage
SetPlotWidth(PlotNumber,LineWidth)
Where: PlotNumber - a numerical expression specifying the plot number; plot numbers range from
1 to 999
LineWidth - a numerical expression specifying the plot line width; line width can range from
1 to 14
Example
Assign a plot line width of 10 to plot1 for the duration of the current bar:
SetPlotWidth(1,10);
6.5.20.24 Symbol
Symbol
Same as the SymbolName 697 .
6.5.20.25 SymbolName
SymbolName
Returns a string expression containing the name of the symbol that the study is applied to.
See also GetSymbolName 442
Usage
SymbolName
Example
SymbolName will return "GOOG" for Google
6.5.20.26 TradeDate
TradeDate
Returns a numerical value indicating the date of the most recent price field update for the symbol.
The date is indicated in the YYYMMdd format, where YYY is the number of years since 1900, MM is
the month, and dd is the day of the month.
Usage
TradeDate
Notes
Quote Fields cannot be referenced historically.
Example
TradeDate will return a value of 1071030 for October 30th, 2007
TradeDate will return a value of 990402 for April 2th, 1999
6.5.20.27 TradeTime
TradeTime
Returns a numerical value indicating the time of the most recent price field update for the symbol.
The time is indicated in the 24-hour HHmm format, where 1300 = 1:00 PM.
Usage
TradeTime
Notes
Quote Fields cannot be referenced historically.
Example
TradeTime will return a value of 1015 for 10:15 AM
TradeTime will return a value of 1545 for 3:45 PM
6.5.21 Sessions
6.5.21.1 AutoSession
AutoSession
Returns 0 and is used as an argument in session information functions.
6.5.21.2 RegularSession
RegularSession
Returns 1 and is used as an argument in session information functions.
6.5.21.3 Sess1EndTime
Sess1EndTime
This word is retained for backward compatibility.
6.5.21.4 Sess1FirstBarTime
Sess1FirstBarTime
Returns the First bar's time for the first session of the trading day in 24-hour format. Please note that
the Time Zone setting affects the value returned.
Example
Sess1FirstBarTime returns 0945 when applied to MSFT data with a 15-minute interval
Sess1FirstBarTime returns 0835 when applied to E-mini S&P500 Data with a 5-minute interval
6.5.21.5 Sess1StartTime
Sess1StartTime
This word is retained for backward compatibility.
6.5.21.6 Sess2EndTime
Sess2EndTime
This word is retained for backward compatibility.
6.5.21.7 Sess2FirstBarTime
Sess2FirstBarTime
Returns the First bar’s time for the second session of the trading day in 24-hour format. Please note
that the Time Zone setting affects the value returned.
Example
Sess2FirstBarTime returns 1725 when applied to US Treasury Bond Data with a 5-minute
interval.
6.5.21.8 Sess2StartTime
Sess2StartTime
This word is retained for backward compatibility.
6.5.21.9 SessionCount
SessionCount
Returns the number of sessions for the trading week.
Usage
SessionCount(SessionType);
Where: SessionType - a numerical expression: 0 = Auto Detect, 1 = Regular Session*
* Custom Sessions parameters will be used if selected in QuoteManager.
Example
In this example, we have assigned to Value 1 the total number of sessions for the week in the current
bar.
Value1 = SessionCount(0);
In this example, we have assigned to Value 1 the total number of regular sessions for the week in the
current bar.
Value1 = SessionCount(1);
6.5.21.10 SessionCountMS
SessionCountMS
Returns the number of merged sessions for the trading week. Merged sessions are sessions
beginning at the earliest start time for all symbols and ending at the latest end time for all symbols
each trading day.
Example
In this example, we have assigned to Value1 the total number of merged sessions for the week in the
current chart:
Value1=SessionCountMS
6.5.21.11 SessionEndDay
SessionEndDay
Returns a numerical value indicating the day of the week that the specified session ends, where 0 =
Sunday, 1 = Monday, etc.
Usage
SessionEndDay(SessionType,SessionNum)
Example
Assign a value, indicating the day of the week that the 4th regular session ends, to Value1 variable:
Value1=SessionEndDay(1,4)
6.5.21.12 SessionEndDayMS
SessionEndDayMS
Returns a numerical value indicating the day of the week the specified merged session in a multi-
data series chart ends, where 0 = Sunday, 1 = Monday, etc.
Merged session extends from the earliest start time to the latest end time of all sessions merged.
Usage
SessionEndDayMS(SessionNum)
Where: SessionNum - a numerical expression specifying the Session Number
Example
Assign a value, indicating the day of the week that the 4th merged session ends, to Value1 variable:
Value1 = SessionEndDayMS(4);
6.5.21.13 SessionEndTime
SessionEndTime
Returns a numerical value, indicating the time of the day that the specified session ends. The time is
indicated in the 24-hour HHmm format, where 1300 = 1:00 PM.
Usage
SessionEndTime(SessionType,SessionNum)
Where: SessionType - a numerical expression: 0 = Auto Detect, 1 = Regular Session*
SessionNum - a numerical expression specifying the Session Number
* Custom Sessions parameters will be used if selected in QuoteManager.
Example
Assign a value, indicating the time of the day that the 4th regular session ends, to Value1 variable:
Value1 = SessionEndTime(1,4);
6.5.21.14 SessionEndTimeMS
SessionEndTimeMS
Returns a numerical value, indicating the time of the day that the specified merged session in a multi-
data series chart ends. The time is indicated in the 24-hour HHmm format, where 1300 = 1:00 PM.
Merged session extends from the earliest start time to the latest end time of all sessions merged.
Usage
SessionEndTimeMS(SessionNum)
Where: SessionNum - a numerical expression specifying the Session Number
Example
Assign a value, indicating the time of the day that the 4th merged session ends, to Value1 variable:
Value1 = SessionEnd(4);
6.5.21.15 SessionStartDay
SessionStartDay
Returns a numerical value indicating the day of the week that the specified session starts, where 0 =
Sunday, 1 = Monday, etc.
Usage
SessionStartDay(SessionType,SessionNum)
Where: SessionType - a numerical expression: 0 = Auto Detect, 1 = Regular Session*
SessionNum - a numerical expression specifying the Session Number
* Custom Sessions parameters will be used if selected in QuoteManager.
Example
Assign a value, indicating the day of the week that the 4th regular session starts, to Value1 variable:
Value1 = SessionStartDay(1,4);
6.5.21.16 SessionStartDayMS
SessionStartDayMS
Returns a numerical value indicating the day of the week that the specified merged session in a
multi-data series chart starts, where 0 = Sunday, 1 = Monday, etc.
Merged session extends from the earliest start time to the latest end time of all sessions merged.
Usage
SessionStartDayMS(SessionNum)
Where: SessionNum - a numerical expression specifying the Session Number
Example
Assign a value, indicating the day of the week that the 4th merged session starts, to Value1 variable:
Value1 = SessionStartDayMS(4);
6.5.21.17 SessionStartTime
SessionStartTime
Returns a numerical value, indicating the time of the day that the specified session starts. The time is
indicated in the 24-hour HHmm format, where 1300 = 1:00 PM.
Usage
SessionStartTime(SessionType,SessionNum)
Where: SessionType - a numerical expression: 0 = Auto Detect, 1 = Regular Session*
SessionNum - a numerical expression specifying the Session Number
* Custom Sessions parameters will be used if selected in QuoteManager.
Example
Assign a value, indicating the time of the day that the 4th regular session starts, to Value1 variable:
Value1 = SessionStartTime(1,4);
6.5.21.18 SessionStartTimeMS
SessionStartTimeMS
Returns a numerical value, indicating the time of the day that the specified merged session in a multi-
data series chart starts. The time is indicated in the 24-hour HHmm format, where 1300 = 1:00 PM.
Merged session extends from the earliest start time to the latest end time of all sessions merged.
Usage
SessionStartTimeMS(SessionNum)
Where: SessionNum - a numerical expression specifying the Session Number
Example
Assign a value, indicating the time of day that the 4th merged session starts, to Value1 variable:
Value1 = SessionStartTimeMS(4);
A
A Skip Word. Skip Words serve solely to improve the readability of PowerLanguage code and are
skipped (ignored) during the compilation and execution.
The use of Skip Words is optional; they can be inserted anywhere within the PL code and will appear
in red in PowerLanguage Editor.
Example
The Skip Words in the example below are colored in red:
If an Open is < than Close of 4 Bars Ago was Then Buy This Bar on Close;
If Plot1 does Cross Above a 1350 Then Sell From Entry("My Entry") Next Bar
at the Market;
6.5.22.2 An
An
A Skip Word. Skip Words serve solely to improve the readability of PowerLanguage code and are
skipped (ignored) during the compilation and execution.
The use of Skip Words is optional; they can be inserted anywhere within the PL code and will appear
in red in PowerLanguage Editor.
Example
The Skip Words in the example below are colored in red:
If an Open is < than Close of 4 Bars Ago was Then Buy This Bar on Close;
If Plot1 does Cross Above a 1350 Then Sell From Entry("My Entry")Next Bar
at the Market;
6.5.22.3 At
At
A Skip Word. Skip Words serve solely to improve the readability of PowerLanguage code and are
skipped (ignored) during the compilation and execution.
The use of Skip Words is optional; they can be inserted anywhere within the PL code and will appear
in red in PowerLanguage Editor.
Example
The Skip Words in the example below are colored in red:
If an Open is < than Close of 4 Bars Ago was Then Buy This Bar on Close;
If Plot1 does Cross Above a 1350 Then Sell From Entry("My Entry")Next Bar
at the Market;
6.5.22.4 Based
Based
A Skip Word. Skip Words serve solely to improve the readability of PowerLanguage code and are
skipped (ignored) during the compilation and execution.
The use of Skip Words is optional; they can be inserted anywhere within the PL code and will appear
in red in PowerLanguage Editor.
Example
The Skip Words in the example below are colored in red:
If an Open is < than Close of 4 Bars Ago was Then Buy This Bar on Close;
If Plot1 does Cross Above a 1350 Then Sell From Entry("My Entry")Next Bar
at the Market;
6.5.22.5 By
By
A Skip Word. Skip Words serve solely to improve the readability of PowerLanguage code and are
skipped (ignored) during the compilation and execution.
The use of Skip Words is optional; they can be inserted anywhere within the PL code and will appear
in red in PowerLanguage Editor.
Example
The Skip Words in the example below are colored in red:
If an Open is < than Close of 4 Bars Ago was Then Buy This Bar on Close;
If Plot1 does Cross Above a 1350 Then Sell From Entry("My Entry")Next Bar
at the Market;
6.5.22.6 Does
Does
A Skip Word. Skip Words serve solely to improve the readability of PowerLanguage code and are
skipped (ignored) during the compilation and execution.
The use of Skip Words is optional; they can be inserted anywhere within the PL code and will appear
in red in PowerLanguage Editor.
Example
The Skip Words in the example below are colored in red:
If an Open is < than Close of 4 Bars Ago was Then Buy This Bar on Close;
If Plot1 does Cross Above a 1350 Then Sell From Entry("My Entry")Next Bar
at the Market;
6.5.22.7 From
From
A skip word; used in strategy exit statements in combination with Entry 740 word that ties an exit to
the particular entry that was assigned the EntryLabel name.
An exit can only be tied to an entry within the same signal; for more information, see Buy 733 or
SellShort 747 .
Skip Words serve solely to improve the readability of PowerLanguage code and are skipped
(ignored) during the compilation and execution.
The use of Skip Words is optional; they can be inserted anywhere within the PL code and will appear
in red in PowerLanguage Editor.
Usage
From Entry("EntryLabel")
Where: EntryLabel - the name that was assigned to the entry that the exit is to be tied to
From - a skip word and can be omitted
Example
Completely exit from the long position established by the entry labeled "Original Entry", at Market
price on open of next bar:
Sell From Entry("Original Entry")Next Bar at Open;
6.5.22.8 Is
Is
A Skip Word. Skip Words serve solely to improve the readability of PowerLanguage code and are
skipped (ignored) during the compilation and execution.
The use of Skip Words is optional; they can be inserted anywhere within the PL code and will appear
in red in PowerLanguage Editor.
Example
The Skip Words in the example below are colored in red:
If an Open is < than Close of 4 Bars Ago was Then Buy This Bar on Close;
If Plot1 does Cross Above a 1350 Then Sell From Entry("My Entry")Next Bar
at the Market;
6.5.22.9 Of
Of
A Skip Word. Skip Words serve solely to improve the readability of PowerLanguage code and are
skipped (ignored) during the compilation and execution.
The use of Skip Words is optional; they can be inserted anywhere within the PL code and will appear
in red in PowerLanguage Editor.
Example
The Skip Words in the example below are colored in red:
If an Open is < than Close of 4 Bars Ago was Then Buy This Bar on Close;
If Plot1 does Cross Above a 1350 Then Sell From Entry("My Entry")Next Bar
at the Market;
6.5.22.10 On
On
A Skip Word. Skip Words serve solely to improve the readability of PowerLanguage code and are
skipped (ignored) during the compilation and execution.
The use of Skip Words is optional; they can be inserted anywhere within the PL code and will appear
in red in PowerLanguage Editor.
Example
The Skip Words in the example below are colored in red:
If an Open is < than Close of 4 Bars Ago was Then Buy This Bar on Close;
If Plot1 does Cross Above a 1350 Then Sell From Entry("My Entry")Next Bar
at the Market;
6.5.22.11 Place
Place
A Skip Word retained for backward compatibility. Skip Words serve solely to improve the readability
of PowerLanguage code and are skipped (ignored) during the compilation and execution.
The use of Skip Words is optional; they can be inserted anywhere within the PL code and will appear
in red in PowerLanguage Editor.
Example
The Skip Words in the example below are colored in red:
If an Open is < than Close of 4 Bars Ago was Then Buy This Bar on Close;
If Plot1 does Cross Above a 1350 Then Sell From Entry("My Entry")Next Bar
at the Market;
6.5.22.12 Than
Than
A Skip Word. Skip Words serve solely to improve the readability of PowerLanguage code and are
skipped (ignored) during the compilation and execution.
The use of Skip Words is optional; they can be inserted anywhere within the PL code and will appear
in red in PowerLanguage Editor.
Example
The Skip Words in the example below are colored in red:
If an Open is < than Close of 4 Bars Ago was Then Buy This Bar on Close;
If Plot1 does Cross Above a 1350 Then Sell From Entry("My Entry")Next Bar
at the Market;
6.5.22.13 The
The
A Skip Word. Skip Words serve solely to improve the readability of PowerLanguage code and are
skipped (ignored) during the compilation and execution.
The use of Skip Words is optional; they can be inserted anywhere within the PL code and will appear
in red in PowerLanguage Editor.
Example
The Skip Words in the example below are colored in red:
If an Open is < than Close of 4 Bars Ago was Then Buy This Bar on Close;
If Plot1 does Cross Above a 1350 Then Sell From Entry("My Entry")Next Bar
at the Market;
6.5.22.14 Was
Was
A Skip Word. Skip Words serve solely to improve the readability of PowerLanguage code and are
skipped (ignored) during the compilation and execution.
The use of Skip Words is optional; they can be inserted anywhere within the PL code and will appear
in red in PowerLanguage Editor.
Example
The Skip Words in the example below are colored in red:
If an Open is < than Close of 4 Bars Ago was Then Buy This Bar on Close;
If Plot1 does Cross Above a 1350 Then Sell From Entry("My Entry")Next Bar
at the Market;
All
Used in strategy exit statements in place of a numerical expression, preceding the words Shares or
Contracts, to denote all of the shares or all of the contracts held without specifying the actual
number of shares or contracts.
Usage
All Contracts
Example
Sell all of the shares held at market price on open of next bar:
Sell All Shares Next Bar At Market;
6.5.23.2 Buy
Buy
Enters a long position as specified by the parameters.
The entry point is visually indicated on a chart by an Arrow and a Tick. The Arrow identifies the time
and the Tick identifies the price value of the entry point. Labels, displaying the entry name and the
number of contracts or shares traded, are displayed below the Buy Arrow.
An order is executed at the point specified by the parameters; if the order is not filled within the
specified bar, the order is cancelled.
When a Buy order is filled, any open short positions will also be closed.
Usage
Buy[("EntryLabel")][TradeSize]EntryType;
Parameters inside the square brackets are optional
Parameters
EntryLabel - an optional parameter; assigns a name that will be displayed in the name label
below the entry, and can be used to identify the particular entry and to tie an exit to it.
An exit can only be tied to an entry within the same signal; for more information, see Sell 745 .
If EntryLabel is not specified, the name "Buy" will be used for the first entry, "Buy#2" for the
second entry, "Buy#3" for the third entry, etc.
This Bar[On]Close
Where: - On 727 is a skip word and can be omitted
A Buy Arrow will be placed at the current bar's Close tick.
Example
Buy a user-set number of shares at Market price on close of this bar:
Buy This Bar On Close;
Buy 1 share at Market price on open of next bar and label the entry "Entry":
Buy("Entry")1 Share Next Bar At Open;
Buy 1 contract at Market price on open of next bar and label the entry "Entry":
Buy("Entry")1 Contract Next Bar Market;
Buy 2 shares within the next bar on the first tick with a price of 100 or less:
Buy 2 Shares Next Bar At 100 Limit;
Buy 10 contracts within the next bar on the first tick with a price of 50 or more:
Buy 10 Contracts Next Bar 50 Stop;
6.5.23.3 BuyToCover
BuyToCover
Completely or partially exits one or all of the short entries as specified by the parameters.
The exit point is visually indicated on a chart by an Arrow and a Tick. The Arrow identifies the time
and the Tick identifies the price value of the exit point. Labels, displaying the exit name and the
number of contracts or shares traded, are displayed below the Cover Arrow.
An order is executed at the point specified by the parameters; if the order is not filled within the
specified bar, the order is cancelled.
Usage
BuyToCover[("ExitLabel")][From Entry("EntryLabel")][TradeSize[Total]]Exit
or:
Buy To Cover[("ExitLabel")][From Entry("EntryLabel")][TradeSize[Total]]Exit
Parameters inside the square brackets are optional
Parameters
ExitLabel - an optional parameter; assigns a name that will be displayed in the name label
above the exit
If ExitLabel is not specified, the name "Cover" will be used for the first exit, "Cover#2" for the
second exit, "Cover#3" for the third exit, etc.
EntryLabel - an optional parameter; ties the exit to the particular entry that was assigned the
EntryLabel name; the name must be preceded by the word Entry, the word From 724 is a skip
word and can be omitted
An exit can only be tied to an entry within the same signal. For more information, see SellShort
747
If EntryLabel is not specified, all of the open short entries will be closed.
This Bar[On]Close
Where: - On 727 is a skip word and can be omitted
A Cover Arrow will be placed at the current bar's Close tick.
A Cover Arrow will be placed on the next bar at the first tick with a price value less than or equal
to Price ; if there are no such ticks within the next bar, the order will be cancelled.
Next Bar[At]Price Stop
Where: - Price is a numerical expression, specifying the Stop Price
- At 720 is a skip word and can be omitted
A Cover Arrow will be placed on the next bar at the first tick with a price value equal to or greater
than the Price ; if there are no such ticks within the next bar, the order will be cancelled.
Example
Completely exit all open short entries at Market price on close of this bar and label the exit "Complete
Exit":
BuyToCover("Complete Exit")This Bar On Close;
Completely exit from the short position established by the entry labeled "Original Entry", at Market
price on open of next bar:
BuyToCover From Entry("Original Entry")Next Bar At Open;
Cover 10 shares of the short position established by the entry labeled "Original Entry", at Market
price on open of next bar:
BuyToCover Entry("Original Entry")10 Shares Next Bar At Market;
Cover 5 contracts for each one of the open short entries at Market price on open of next bar:
BuyToCover 5 Contracts Next Bar Market;
Cover a total of 1 share, regardless of the number of open short entries, within the next bar on the
first tick with a price of 100 or less (the first share shorted will be covered if the price is met):
BuyToCover 1 Share Total Next Bar At 100 Limit;
Completely exit all short entries within the next bar on the first tick with a price of 50 or more:
BuyToCover Next Bar 50 Stop;
6.5.23.4 Contract
Contract
Same as Contracts 738
6.5.23.5 Contracts
Contracts
Used in strategy entry or exit statements in combination with a numerical expression to specify the
number of contracts or shares to trade.
Usage
TradeSize Contracts
Where: TradeSize - a numerical expression, specifying the number of contracts or shares
Example
Buy 2 contracts at Market price on open of next bar:
Buy 2 Contracts Next Bar At Market;
6.5.23.6 Cover
Cover
Used in combination with the words Buy To; same as BuyToCover 735 .
Usage
Buy To Cover[("ExitLabel")][From Entry("EntryLabel")][TradeSize[Total]]Exit
;
6.5.23.7 Entry
Entry
Used in strategy exit statements to tie an exit to the particular entry that was assigned the
EntryLabel name.
An exit can only be tied to an entry within the same signal; for more information, see Buy 733 or
SellShort 747 .
Usage
From Entry("EntryLabel")
Where: EntryLabel - the name that was assigned to the entry that the exit is to be tied to
From 724 - a skip word and can be omitted
Example
Completely exit from the long position established by the entry labeled "Original Entry", at Market
price on open of next bar:
Sell From Entry("Original Entry")Next Bar At Open;
6.5.23.8 Higher
Higher
Used in strategy entry or exit statements to specify a price range for an entry or an exit; must be
preceded by the word Or.
Usage
At Price Or Higher
Where: Price - a numerical expression, specifying the base Price
At 720 - a skip word and can be omitted
Notes
At Price Or Higher is an equivalent of a Limit when used with Sell or SellShort statements,
and an equivalent of a Stop when used with Buy or BuyToCover statements.
Example
Buy within the next bar on the first tick with a price of 100 or more:
Buy Next Bar At 100 Or Higher;
Sell short within the next bar on the first tick with a price of 50 or more:
SellShort Next Bar At 50 Or Higher;
6.5.23.9 Limit
Limit
Used in strategy entry or exit statements to specify a Limit price for an entry or an exit.
A Limit order will execute at the specified price or better. A better price is a lower price for Buy and
Buy to cover orders, and a higher price for Sell and Sell short orders.
Usage
At Price Limit
Where: Price - a numerical expression, specifying the Limit Price
At 720 - a skip word and can be omitted
Example
Buy within the next bar on the first tick with a price of 100 or less:
Buy Next Bar At 100 Limit;
Sell short within the next bar on the first tick with a price of 50 or more:
SellShort Next Bar 50 Limit;
6.5.23.10 Lower
Lower
Used in strategy entry or exit statements to specify a price range for an entry or an exit.
Must be preceded by the word Or.
Usage
At Price Or Lower
Where: Price - a numerical expression, specifying the base Price
At 720 - a skip word and can be omitted
Notes
At Price Or Lower is an equivalent of a Limit when used with Buy or BuyToCover statements,
and an equivalent of a Stop when used with Sell or SellShort statements.
Example
Buy within the next bar on the first tick with a price of 100 or less:
Buy Next Bar At 100 Or Lower;
Sell short within the next bar on the first tick with a price of 50 or less:
SellShort Next Bar At 50 Or Lower;
6.5.23.11 Market
Market
Used in strategy entry or exit statements to specify a Market price for an entry or an exit.
A Market Buy order will execute at the current ask price and a Maret Sell order will execute at the
current bid price.
Usage
At Market
Where: At 720 is a skip word and can be omitted
Example
Buy a user-set number of shares at Market price on open of next bar:
Buy Next Bar At Market;
6.5.23.12 Sell
Sell
Completely or partially exits one or all of the long entries as specified by the parameters.
The exit point is visually indicated on a chart by an Arrow and a Tick. The Arrow identifies the time
and the Tick identifies the price value of the exit point. Labels, displaying the exit name and the
number of contracts or shares traded, are displayed above the Sell Arrow.
An order is executed at the point specified by the parameters; if the order is not filled within the
specified bar, the order is cancelled.
Usage Sell[("ExitLabel")][From Entry("EntryLabel")][TradeSize[Total]]Exit
Parameters inside the square brackets are optional
Parameters
ExitLabel - an optional parameter; assigns a name that will be displayed in the name label
above the exit
If ExitLabel is not specified, the name "Sell" will be used for the first exit, "Sell#2" for the
second exit, "Sell#3" for the third exit, etc.
EntryLabel - an optional parameter; ties the exit to the particular entry that was assigned the
EntryLabel name; the name must be preceded by the word "Entry", the word "From 724 " is a
skip word and can be omitted
An exit can only be tied to an entry within the same signal. For more information, see Buy 733
If EntryLabel is not specified, all of the open long entries will be closed.
This Bar[On]Close
Where: - On 727 is a skip word and can be omitted
A Sell Arrow will be placed at the current bar's Close tick.
A Sell Arrow will be placed on the next bar at the first tick with a price value equal to or less than
the Price ; if there are no such ticks within the next bar, the order will be cancelled.
Example
Completely exit all open long entries at Market price on close of this bar and label the exit "Complete
Exit":
Sell("Complete Exit")This Bar On Close;
Completely exit from the long position established by the entry labeled "Original Entry", at Market
price on open of next bar:
Sell From Entry("Original Entry")Next Bar At Open;
Sell 10 shares of the long position established by the entry labeled "Original Entry", at Market price
on open of next bar:
Sell Entry("Original Entry")10 Shares Next Bar At Market;
Sell 5 contracts for each one of the open long entries at Market price on open of next bar:
Sell 5 Contracts Next Bar Market;
Sell a total of 1 share, regardless of the number of open long entries, within the next bar on the first
tick with a price of 100 or more (the longest-held share will be sold if the price is met):
Sell 1 Share Total Next Bar At 100 Limit;
Completely exit all long entries within the next bar on the first tick with a price of 50 or less:
Sell Next Bar 50 Stop;
6.5.23.13 SellShort
SellShort
Enters a short position as specified by the parameters.
The entry point is visually indicated on a chart by an Arrow and a Tick. The Arrow identifies the time
and the Tick identifies the price value of the entry point. Labels, displaying the entry name and the
number of contracts or shares traded, are displayed above the Short Arrow.
An order is executed at the point specified by the parameters; if the order is not filled within the
specified bar, the order is cancelled.
When a Sell Short order is filled, any open long positions will also be closed.
Usage
SellShort[("EntryLabel")][TradeSize]Entry
or:
Sell Short[("EntryLabel")][TradeSize]Entry
Parameters inside the square brackets are optional
Parameters
EntryLabel - an optional parameter; assigns a name that will be displayed in the name label
above the entry, and can be used to identify the particular entry and to tie an exit to it.
An exit can only be tied to an entry within the same signal; for more information, see BuyToCover
735 .
If EntryLabel is not specified, the name "Short" will be used for the first entry, "Short#2" for the
second entry, "Short#3" for the third entry, etc.
A Short Arrow will be placed on the next bar at the first tick with a price equal to or greater than
the Price ; if there are no such ticks within the next bar, the order will be cancelled.
Next Bar[At]Price Stop
Where: - Price is a numerical expression, specifying the Stop Price
- At 720 is a skip word and can be omitted
A Short Arrow will be placed on the next bar at the first tick with a price value less than or equal to
Price ; if there are no such ticks within the next bar, the order will be cancelled.
Example
SellShort a user-set number of shares at Market price on close of this bar:
SellShort This Bar On Close;
SellShort 1 share at Market price on open of next bar and label the entry "Entry":
SellShort("Entry")1 Share Next Bar At Open;
SellShort 1 contract at Market price on open of next bar and label the entry "Entry":
SellShort("Entry")1 Contract Next Bar Market;
SellShort 2 shares within the next bar on the first tick with a price of 100 or more:
SellShort 2 Shares Next Bar At 100 Limit;
SellShort 10 contracts within the next bar on the first tick with a price of 50 or less:
SellShort 10 Contracts Next Bar 50 Stop;
6.5.23.14 SetBreakeven
SetBreakEven
Closes out the entire position or the entry if it is at the breakeven point after the profit has reached
the specified value; generates the appropriate Stop order depending on whether the position is long
or short.
SetStopPosition 756 and SetStopContract 754 or SetStopShare 757 functions determine
whether SetBreakEven will be applied to the entire position or to each contract or share individually;
by default, SetBreakEven is applied to the entire position.
SetBreakEven function is evaluated intra-bar and not only on close of a bar, and can exit within the
same bar as the entry.
Usage
SetBreakEven(Profit)
Where: Profit - a numerical expression, specifying the currency value of the profit that must be
reached first
Notes
This function can only be used in signals.
SetBreakEven function does not factor in commissions or slippage.
Example
Generate an exit order for the entire position if it is at the breakeven point after position profit has
reached $50:
SetStopPosition;
SetBreakEven(50);
Generate an exit order for the entry if it is at the breakeven point after per contract profit has reached
$10:
SetStopContract;
SetBreakEven(10);
6.5.23.15 SetDollarTrailing
SetDollarTrailing
Closes out the entire position or the entry if the current profit is less than the maximum profit by the
specified amount; generates the appropriate Stop order depending on whether the position is long or
short.
For example, if the specified ammount is $50 and the profit has reached the maximum of $120, the
position will be closed once the profit drops to $70.
SetStopPosition 756 and SetStopContract 754 or SetStopShare 757 functions determine
whether SetDollarTrailing will be applied to the entire position or to each contract or share
individually; by default, SetDollarTrailing is applied to the entire position.
SetDollarTrailing function is evaluated intra-bar and not only on close of a bar, and can exit within the
same bar as the entry.
Usage
SetDollarTrailing(Amount)
Where: Amount - a numerical expression, specifying the currency value of the maximum loss of
profit
Notes
This function can only be used in signals.
Example
Generate an exit order for the entire position if position profit drops by $50:
SetStopPosition;
SetDollarTrailing(50);
Generate an exit order for the entry if per contract profit drops by $10:
SetStopContract;
SetDollarTrailing(10);
6.5.23.16 SetExitOnClose
SetExitOnClose
Closes out the current position at the Close tick of the last bar of the trading session on an intra-day
chart; generates the appropriate Market exit order depending on whether the position is long or short.
SetExitOnClose function uses the session closing time specified in the session settings for the
symbol in the QuoteManager.
Usage
SetExitOnClose
Notes
This function can only be used in signals.
Example
Generate an exit order at the Close tick of the last bar of the trading session:
SetExitOnClose;
6.5.23.17 SetPercentTrailing
SetPercentTrailing
Closes out the entire position or the entry if the specified percentage of the maximum profit is lost
after the profit has reached the specified value; generates the appropriate Stop order depending on
whether the position is long or short.
For example, if the specified profit is $100 and the specified percentage is 50, and the profit has
reached the maximum of $120, the position will be closed once the profit falls back to $60.
SetStopPosition 756 and SetStopContract 754 or SetStopShare 757 functions determine
whether SetPercentTrailing will be applied to the entire position or each contract or share individually;
by default, SetPercentTrailing is applied to the entire position.
SetPercentTrailing function is evaluated intra-bar and not only on close of a bar, and can exit within
the same bar as the entry.
Usage
SetPercentTrailing(Profit,Percentage)
Where: Profit - a numerical expression, specifying the currency value of the profit that must be
reached first
Percentage - a numerical expression, specifying the maximum loss of profit in percent
Notes
This function can only be used in signals.
Example
Generate an exit order for the entire position if 50 percent of maximum position profit is lost after the
profit has reached $25:
SetStopPosition;
SetPercentTrailing(25,50);
Generate an exit order for the entry if 25 percent of maximum per share profit is lost after the profit
has reached $5:
SetStopShare;
SetPercentTrailing(5,25);
6.5.23.18 SetProfitTarget
SetProfitTarget
Closes out the entire position or the entry if profit reaches the specified currency value; generates the
appropriate Limit exit order depending on whether the position is long or short.
SetStopPosition 756 and SetStopContract 754 or SetStopShare 757 functions determine
whether the profit target will be applied to the entire position or to each contract or share individualy;
by default, profit target is applied to the entire position.
SetProfitTarget function is evaluated intra-bar and not only on close of a bar, and can exit within the
same bar as the entry.
Usage
SetProfitTarget(Amount)
Where: Amount - a numerical expression, specifying the profit target amount
Notes
This function can only be used in signals.
Example
Generate an exit order for the entire position if the position profit reaches $100:
SetStopPosition;
SetProfitTarget(100);
Generate an exit order for the entry if the profit per contract reaches $10:
SetStopContract;
SetProfitTarget(10);
6.5.23.19 SetStopContract
SetStopContract
Forces the built-in strategy exit functions to be applied on per contract or share basis.
The built-in strategy exit functions are: SetStopLoss 755 , SetProfitTarget 753 ,
SetBreakEven 749 , SetDollarTrailing 750 , and SetPercentTrailing 752 .
Usage
SetStopContract
Notes
If SetStopPositon, SetStopContract, and SetStopShare were not used, the exit functions will
be applied on the entire position basis as a default.
If SetStopPositon, SetStopContract, and SetStopShare were used in multiple instances or in
different signals applied to the same chart, the last instance will be controlling.
Example
Force the SetStopLoss strategy exit function to be applied on per contract basis:
SetStopContract;
SetStopLoss(10);
An exit order for the entry will be generated if the loss per contract reaches $10.
6.5.23.20 SetStopLoss
SetStopLoss
Closes out the entire position or the entry if the loss reaches the specified currency value; generates
the appropriate Stop order depending on whether the position is long or short.
SetStopPosition 756 and SetStopContract 754 or SetStopShare 757 functions determine
whether the stop loss will be applied to the entire position or to each contract or share individually; by
default, stop loss is applied to the entire position.
SetStopLoss function is evaluated intra-bar and not only on close of a bar, and can exit within the
same bar as the entry.
Usage
SetStopLoss(Amount)
Where: Amount - a numerical expression, specifying the stop loss amount
Notes
This function can only be used in signals.
Example
Generate an exit order for the entire position if the position loss reaches $100:
SetStopPosition;
SetStopLoss(100);
Generate an exit order for the entry if the loss per contract reaches $10:
SetStopContract;
SetStopLoss(10);
6.5.23.21 SetStopPosition
SetStopPosition
Forces the built-in strategy exit functions to be applied on the entire position basis.
The built-in strategy exit functions are: SetStopLoss 755 , SetProfitTarget 753 ,
SetBreakEven 749 , SetDollarTrailing 750 , and SetPercentTrailing 752 .
Usage
SetStopPosition
Notes
If SetStopPositon, SetStopContract, and SetStopShare were not used, the exit functions will
be applied on the entire position basis as a default.
If SetStopPositon, SetStopContract, and SetStopShare were used in multiple instances or in
different signals applied to the same chart, the last instance will be controlling.
Example
Force SetStopLoss strategy exit function to be applied on the entire position basis:
SetStopPosition;
SetStopLoss(100);
An exit order for the entire position will be generated if the position loss reaches $100.
6.5.23.22 SetStopShare
SetStopShare
Same as SetStopContract 754
6.5.23.23 Share
Share
Same as Shares 759
6.5.23.24 Shares
Shares
Used in strategy entry or exit statements in combination with a numerical expression to specify the
number of shares or contracts to trade.
Usage
TradeSize Shares
Where: TradeSize - a numerical expression, specifying the number of shares or contracts
Example
Buy 2 shares at Market price on open of next bar:
Buy 2 Shares Next Bar At Market;
6.5.23.25 Short
Short
Used in combination with the word Sell; same as SellShort 747 .
Usage
Sell Short[("EntryLabel")][TradeSize]Entry;
6.5.23.26 Stop
Stop
Used in strategy entry or exit statements to specify a Stop price for an entry or an exit.
A Stop order will execute at the specified price or worse. A worse price is a higher price for Buy and
Buy to cover orders, and a lower price for Sell and Sell short orders.
Usage
At Price Stop
Where: Price - a numerical expression, specifying the Limit Price
At 720 - a skip word and can be omitted
Example
Sell within the next bar on the first tick with a price of 100 or less:
Sell Next Bar 100 Stop;
Cover within the next bar on the first tick with a price of 50 or more:
BuyToCover Next Bar At 50 Stop;
6.5.23.27 Total
Total
Used in strategy exit statements, following a numerical expression and the words Shares or
Contracts, to indicate that only the number of contracts or shares specified by the numerical
expression is to be sold or covered in total, regardless of the number of open entries. The contracts
or shares will be sold or covered in the same order they were bought or shorted: First In, First Out.
If the word Total is not used, the number of contracts or shares specified by the numerical
expression will be sold or covered for each one of the open entries.
Usage
TradeSize Shares Total
Where: TradeSize - a numerical expression, specifying the number of shares or contracts
Example
Sell a total of 2 contracts, regardless of the number of open long entries, at Market price on open of
next bar:
Sell 2 Contracts Total Next Bar At Market;
AvgBarsEvenTrade
Returns a numerical value, indicating the average number of bars a position was held during all
completed even trades.
Usage
AvgBarsEvenTrade
Notes
This function can only be used in signals.
Example
AvgBarsEvenTrade will return a value of 3.5 if four even trades held positions for 2, 5, 3, and 4
bars
6.5.24.2 AvgBarsLosTrade
AvgBarsLosTrade
Returns a numerical value, indicating the average number of bars a position was held during all
completed losing trades.
Usage
AvgBarsLosTrade
Notes
This function can only be used in signals.
Example
AvgBarsLosTrade will return a value of 3.5 if four losing trades held positions for 2, 5, 3, and 4 bars
6.5.24.3 AvgBarsWinTrade
AvgBarsWinTrade
Returns a numerical value, indicating the average number of bars a position was held during all
completed winning trades.
Usage
AvgBarsWinTrade
Notes
This function can only be used in signals.
Example
AvgBarsWinTrade will return a value of 3.5 if four winning trades held positions for 2, 5, 3, and 4
bars
6.5.24.4 AvgEntryPrice
AvgEntryPrice
Returns a numerical value, indicating the average entry price for all open entries in a pyramided
position.
Usage
AvgEntryPrice
Notes
This function can only be used in signals.
Example
AvgEntryPrice will return a value of 101 if there were three open entries at 95, 105, and 103
6.5.24.5 GrossLoss
GrossLoss
Returns a negative numerical value, indicating the total currency value of all completed losing trades.
Usage
GrossLoss
Notes
This function can only be used in signals.
Example
GrossLoss will return a value of -50 if there were a total of four losing trades, at 10, 5, 20, and 15
GrossLoss will return a value of 0 if no losing trades were completed during the entire trading period
6.5.24.6 GrossProfit
GrossProfit
Returns a numerical value, indicating the total currency value of all completed winning trades.
Usage
GrossProfit
Note
This function can only be used in signals.
Example
GrossProfit will return a value of 50 if there were a total of four winning trades, at 10, 5, 20, and
15
GrossProfit will return a value of 0 if no winning trades were completed during the entire trading
period
6.5.24.7 i_AvgEntryPrice
i_AvgEntryPrice
Same as AvgEntryPrice 766 except used in studies.
6.5.24.8 i_ClosedEquity
i_ClosedEquity
Returns the profit or loss realized when a position has been closed.
Usage
i_ClosedEquity
Notes
This function can only be used in studies.
Example
i_ClosedEquity will return 100 if the closed equity is 100.
6.5.24.9 i_CurrentContracts
i_CurrentContracts
Same as CurrentContracts 794 except used in studies.
6.5.24.10 i_CurrentShares
i_CurrentShares
Same as CurrentShares 796 except used in studies.
6.5.24.11 i_MarketPosition
i_MarketPosition
Returns a numerical value, indicating the type of the specified position.
A value of 1 indicates the current bar has a long position, -1 indicates the current bar has a short
position, and 0 is returned only if the current bar has a flat position.
Usage
i_MarketPosition
Notes
This function can only be used in studies.
Example
i_MarketPosition will return a value of 0 if the position on the current bar is flat
i_MarketPosition will return a value of 1 if the position on the current bar is long
i_MarketPosition will return a value of -1 if the position on the current bar is short
6.5.24.12 i_OpenEquity
i_OpenEquity
Returns the current gain or loss while a position is open.
Usage
i_OpenEquity
Notes
This function can only be used in studies.
Example
i_OpenEquity will return 100 if the gain on open positions is 100.
i_OpenEquity will return -100 if the loss on open positions is 100.
6.5.24.13 LargestLosTrade
LargestLosTrade
Returns a negative numerical value, indicating the currency value of the largest completed losing
trade.
Usage
LargestLosTrade
Notes
This function can only be used in signals.
Example
LargestLosTrade will return a value of -20 if there were a total of four losing trades at 10, 5, 20,
and 15
LargestLosTrade will return a value of 0 if no losing trades were completed during the entire
trading period
6.5.24.14 LargestWinTrade
LargestWinTrade
Returns a numerical value, indicating the currency value of the largest completed winning trade.
Usage
LargestWinTrade
Notes
This function can only be used in signals.
Example
LargestWinTrade will return a value of 20 if there were a total of four winning trades at 10, 5, 20,
and 15
LargestWinTrade will return a value of 0 if no winning trades were completed during the entire
trading period
6.5.24.15 MaxConsecLosers
MaxConsecLosers
Returns a numerical value, indicating the number of trades in the longest sequence of consecutive
completed losing trades.
Usage
MaxConsecLosers
Notes
This function can only be used in signals.
Example
MaxConsecLosers will return a value of 3 if there were three consecutive completed losing trades
MaxConsecLosers will return a value of 0 if no losing trades were completed during the entire
trading period
6.5.24.16 MaxConsecWinners
MaxConsecWinners
Returns a numerical value, indicating the number of trades in the longest sequence of consecutive
completed winning trades.
Usage
MaxConsecWinners
Notes
This function can only be used in signals.
Example
MaxConsecWinners will return a value of 3 if there were three consecutive completed winning
trades
MaxConsecWinners will return a value of 0 if no winning trades were completed during the entire
trading period
6.5.24.17 MaxContractsHeld
MaxContractsHeld
Returns a numerical value, indicating the maximum number of contracts or shares held at any one
time.
Usage
MaxContractsHeld
Notes
This function can only be used in signals.
Example
MaxContractsHeld will return a value of 10 if a maximum of ten contracts were held at any one
time
6.5.24.18 MaxIDDrawDown
MaxIDDrawDown
Returns a negative numerical value, indicating the largest decline in equity during the entire trading
period.
Usage
MaxIDDrawDown
Notes
This function can only be used in signals.
Example
MaxIDDrawDown will return a value of -500 if the largest decline in equity during the entire trading
period was $500
6.5.24.19 MaxSharesHeld
MaxSharesHeld
Same as MaxContractsHeld 779
6.5.24.20 NetProfit
NetProfit
Returns a numerical value, indicating the total currency value of all completed trades.
Usage
NetProfit
Notes
This function can only be used in signals.
Example
NetProfit will return a value of 20 if there were winning trades at 25 and 10, and losing trades at 5
and 10
NetProfit will return a value of -15 if there were winning trades at 10 and 5, and losing trades at 20
and 10
NetProfit will return a value of 0 no trades were completed during the entire trading period
6.5.24.21 NumEvenTrades
NumEvenTrades
Returns a numerical value, indicating the total number of all completed even trades.
Usage
NumEvenTrades
Notes
This function can only be used in signals.
Example
NumEvenTrades will return a value of 10 if there were ten completed even trades
NumEvenTrades will return a value of 0 if no even trades were completed during the entire trading
period
6.5.24.22 NumLosTrades
NumLosTrades
Returns a numerical value, indicating the number of all completed losing trades.
Usage
NumLosTrades
Notes
This function can only be used in signals.
Example
NumLosTrades will return a value of 5 if there were a total of five completed losing trades
NumLosTrades will return a value of 0 if no losing trades were completed during the entire trading
period
6.5.24.23 NumWinTrades
NumWinTrades
Returns a numerical value, indicating the number of all completed winning trades.
Usage
NumWinTrades
Notes
This function can only be used in signals.
Example
NumWinTrades will return a value of 5 if there were a total of five completed winning trades
NumWinTrades will return a value of 0 if no winning trades were completed during the entire trading
period
6.5.24.24 PercentProfit
PercentProfit
Returns a numerical value, indicating the percentage of winning trades in all trades completed.
Usage
PercentProfit
Notes
This function can only be used in signals.
Example
PercentProfit will return a value of 70 if seven out of the total of 10 completed trades were
winning trades
6.5.24.25 TotalBarsEvenTrades
TotalBarsEvenTrades
Returns a numerical value, indicating the total number of bars a position was held during all
completed even trades.
Usage
TotalBarsEvenTrades
Notes
This function can only be used in signals.
Example
TotalBarsEvenTrades will return a value of 14 if four even trades held positions for 2, 5, 3, and 4
bars
TotalBarsEvenTrades will return a value of 0 if no even trades were completed during the entire
trading period
6.5.24.26 TotalBarsLosTrades
TotalBarsLosTrades
Returns a numerical value, indicating the total number of bars a position was held during all
completed losing trades.
Usage
TotalBarsLosTrades
Notes
This function can only be used in signals.
Example
TotalBarsLosTrades will return a value of 14 if four losing trades held positions for 2, 5, 3, and 4
bars
TotalBarsLosTrades will return a value of 0 if no losing trades were completed during the entire
trading period
6.5.24.27 TotalBarsWinTrades
TotalBarsWinTrades
Returns a numerical value, indicating the total number of bars a position was held during all
completed winning trades.
Usage
TotalBarsWinTrades
Notes
This function can only be used in signals.
Example
TotalBarsWinTrades will return a value of 14 if four winning trades held positions for 2, 5, 3, and 4
bars
TotalBarsWinTrades will return a value of 0 if no winning trades were completed during the entire
trading period
6.5.24.28 TotalTrades
TotalTrades
Returns a numerical value, indicating the total number of all completed trades.
Usage
TotalTrades
Notes
This function can only be used in signals.
Example
TotalTrades will return a value of 5 if there were a total of five completed trades
TotalTrades will return a value of 0 if no trades were completed during the entire trading period
BarsSinceEntry
Returns a numerical value, indicating the number of bars since the initial entry into the specified
position.
Usage
BarsSinceEntry(PosBack)
Where: PosBack - a numerical expression, specifying the position:
0 - open position;
1 - one position back (the last position closed);
2 - two positions back, etc.
If PosBack is not specified, a value for the open position will be returned.
Notes
This function can only be used in signals.
Example
Assign a value, indicating the number of bars since the current position has been entered, to Value1
variable:
Value1=BarsSinceEntry;
Assign a value, indicating the number of bars since the most recently closed position has been
entered, to Value1 variable:
Value1=BarsSinceEntry(1);
6.5.25.2 BarsSinceExit
BarsSinceExit
Returns a numerical value, indicating the number of bars since a complete exit from the specified
position.
Usage
BarsSinceExit(PosBack)
Where: PosBack - a numerical expression, specifying the position:
1 - the last position closed (one position back);
2 - two positions back, etc.
Notes
This function can only be used in signals.
Example
Assign a value, indicating the number of bars since the last position has been closed, to Value1
variable:
Value1=BarsSinceExit(1);
6.5.25.3 ContractProfit
ContractProfit
Returns a numerical value, indicating the current profit or loss per each contract or share of a multi-
share or multi-contract position.
Usage
ContractProfit
Notes
This function can only be used in signals.
Example
Assign a value, indicating the current profit or loss per contract or share, to Value1 variable:
Value1=ContractProfit;
6.5.25.4 CurrentContracts
CurrentContracts
Returns an absolute numerical value, indicating the number of contracts or shares held in the current
position.
Usage
CurrentContracts
Notes
This function can only be used in signals.
Example
CurrentContracts will return a value of 1 for 1 contract long
CurrentContracts will return a value of 5 for 5 shares short
6.5.25.5 CurrentEntries
CurrentEntries
Returns a numerical value, indicating the number of open entries for the current position.
Usage
CurrentEntries
Notes
This function can only be used in signals.
Example
Assign a value, indicating the number of open entries in the current position, to Value1 variable:
Value1=CurrentEntries;
6.5.25.6 CurrentShares
CurrentShares
Same as CurrentContracts 794
6.5.25.7 EntryDate
EntryDate
Returns a numerical value, indicating the date of initial entry into the specified position. The date is
indicated in the YYYMMdd format, where YYY is the number of years since 1900, MM is the month,
and dd is the day of the month.
Usage
EntryDate(PosBack)
Where: PosBack - a numerical expression, specifying the position:
0 - open position;
1 - one position back (the last position closed);
2 - two positions back, etc.
If PosBack is not specified, a value for the open position will be returned.
Notes
This function can only be used in signals.
Example
Assign a value, indicating the date that the current position has been entered, to Value1 variable:
Value1=EntryDate;
Value 1 will equal to 1081030 for the entry date of October 30th, 2008
Assign a value, indicating the date that the most recently closed position has been entered, to Value1
variable:
Value1=EntryDate(1);
Value 1 will equal to 990402 for the entry date of April 2nd, 1999
6.5.25.8 EntryPrice
EntryPrice
Returns a numerical value, indicating the price at the initial entry into the specified position.
Usage
EntryPrice(PosBack)
Where: PosBack - a numerical expression, specifying the position:
0 - open position;
1 - one position back (the last position closed);
2 - two positions back, etc.
If PosBack is not specified, a value for the open position will be returned.
Notes
This function can only be used in signals.
Example
Assign a value, indicating the entry price for the current position, to Value1 variable:
Value1=EntryPrice;
Assign a value, indicating the entry price for the most recently closed position, to Value1 variable:
Value1=EntryPrice(1);
6.5.25.9 EntryTime
EntryTime
Returns a numerical value, indicating the time of initial entry into the specified position. The time is
indicated in the 24-hour HHmm format, where 1300 = 1:00 PM.
Usage
EntryTime(PosBack)
Where: PosBack - a numerical expression, specifying the position:
0 - open position;
1 - one position back (the last position closed);
2 - two positions back, etc.
If PosBack is not specified, a value for the open position will be returned.
Notes
This function can only be used in signals.
Example
Assign a value, indicating the time that the current position has been entered, to Value1 variable:
Value1=EntryTime;
Value 1 will equal to 1015 for 10:15 AM
Assign a value, indicating the time that the most recently closed position has been entered, to Value1
variable:
Value1=EntryTime(1);
Value 1 will equal to 1545 for 3:45 PM
6.5.25.10 ExitDate
ExitDate
Returns a numerical value, indicating the date of the complete exit from the specified position. The
date is indicated in the YYYMMdd format, where YYY is the number of years since 1900, MM is the
month, and dd is the day of the month.
Usage
ExitDate(PosBack)
Where: PosBack - a numerical expression, specifying the position:
1 - the last position closed (one position back);
2 - two positions back, etc.
Notes
This function can only be used in signals.
Example
Assign a value, indicating the date that the most recently closed position has been exited, to Value1
variable:
Value1=ExitDate(1);
Value 1 will equal to 1081030 for the exit date of October 30th, 2008
6.5.25.11 ExitPrice
ExitPrice
Returns a numerical value, indicating the price at a complete exit from the specified position.
Usage
ExitPrice(PosBack)
Where: PosBack - a numerical expression, specifying the position:
1 - the last position closed (one position back);
2 - two positions back, etc.
Notes
This function can only be used in signals.
Example
Assign a value, indicating the exit price of the most recently closed position, to Value1 variable:
Value1=ExitPrice(1);
6.5.25.12 ExitTime
ExitTime
Returns a numerical value, indicating the time at the complete exit from the specified position. The
time is indicated in the 24-hour HHmm format, where 1300 = 1:00 PM.
Usage
ExitTime(PosBack)
Where: PosBack - a numerical expression, specifying the position:
1 - the last position closed (one position back);
2 - two positions back, etc.
Notes
This function can only be used in signals.
Example
Assign a value, indicating the time that the most recently closed position has been exited, to Value1
variable:
Value1=ExitTime(1);
Value 1 will equal to 1545 for 3:45 PM
6.5.25.13 i_MarketPosition_at_Broker
i_MarketPosition_at_Broker
Returns a numerical value, indicating the type of the specified position at the broker for the symbol.
A value of 1 indicates a long position, -1 indicates a short position, and 0 is returned only if the
current position is specified and indicates that the current position is flat.
Usage
MarketPosition_at_Broker
Notes
This function can only be used in indicators.
This function differs from the marketposition keyword in that it cannot take an argument to reference
past values.
This function can only be used with Interactive Brokers, Patsystems, and Zen-Fire.
Example
i_MarketPosition_at_Broker will return a 1 if the current position at the broker for the strategy
is long.
i_MarketPosition_at_Broker will return a -1 if the current position at the broker for the strategy
is short.
i_MarketPosition_at_Broker will return a 0 if the current position at the broker for the strategy
is flat.
6.5.25.14 i_MarketPosition_at_Broker_for_The_Strategy
i_MarketPosition_at_Broker_for_The_Strategy
Returns a numerical value, indicating the type of the specified position at the broker for the strategy.
A value of 1 indicates a long position, -1 indicates a short position, and 0 is returned only if the
current position is specified and indicates that the current position is flat.
Usage
i_MarketPosition_at_Broker_for_The_Strategy
Notes
This function can only be used in indicators.
This function differs from the marketposition keyword in that it cannot take an argument to reference
past values.
Example
i_MarketPosition_at_Broker_for_The_Strategy will return a 1 if the current position at the
broker for the strategy is long.
i_MarketPosition_at_Broker_for_The_Strategy will return a -1 if the current position at the
broker for the strategy is short.
i_MarketPosition_at_Broker_for_The_Strategy will return a 0 if the current position at the
broker for the strategy is flat.
6.5.25.15 MarketPosition
MarketPosition
Returns a numerical value, indicating the type of the specified position.
A value of 1 indicates a long position, -1 indicates a short position, and 0 is returned only if the
current position is specified and indicates that the current position is flat.
Usage
MarketPosition(PosBack)
Where: PosBack - a numerical expression, specifying the position:
0 - open position;
1 - one position back (the last position closed);
2 - two positions back, etc.
If PosBack is not specified, a value for the open position will be returned.
Notes
This function can only be used in signals.
Example
MarketPosition will return a value of 0 if the current position is flat
MarketPosition (1) will return a value of -1 if the most recently closed position was a short
position
6.5.25.16 MarketPosition_at_Broker
MarketPosition_at_Broker
Returns a numerical value, indicating the type of the specified position at the broker for the symbol.
A value of 1 indicates a long position, -1 indicates a short position, and 0 is returned only if the
current position is specified and indicates that the current position is flat.
Usage
MarketPosition_at_Broker
Notes
This function can only be used in signals and functions.
This function differs from the marketposition keyword in that it cannot take an argument to reference
past values.
This function can only be used with Interactive Brokers, Patsystems, and Zen-Fire.
Example
MarketPosition_at_Broker will return a 1 if the current position at the broker for the strategy is
long.
MarketPosition_at_Broker will return a -1 if the current position at the broker for the strategy is
short.
MarketPosition_at_Broker will return a 0 if the current position at the broker for the strategy is
flat.
6.5.25.17 MarketPosition_at_Broker_for_The_Strategy
MarketPosition_at_Broker_for_The_Strategy
Returns a numerical value, indicating the type of the specified position at the broker for the strategy.
A value of 1 indicates a long position, -1 indicates a short position, and 0 is returned only if the
current position is specified and indicates that the current position is flat.
Usage
MarketPosition_at_Broker_for_The_Strategy
Notes
This function can only be used in signals and functions.
This function differs from the marketposition keyword in that it cannot take an argument to reference
past values.
Example
MarketPosition_at_Broker_for_The_Strategy will return a 1 if the current position at the
broker for the strategy is long.
MarketPosition_at_Broker_for_The_Strategy will return a -1 if the current position at the
broker for the strategy is short.
MarketPosition_at_Broker_for_The_Strategy will return a 0 if the current position at the
broker for the strategy is flat.
6.5.25.18 MaxContractProfit
MaxContractProfit
Returns a numerical value, indicating the largest gain reached per each contract or share of a current
multi-share or multi-contract position.
Usage
MaxContractProfit
Notes
This function can only be used in signals.
Example
Assign a value, indicating the largest gain reached per contract or share, to Value1 variable:
Value1=MaxContractProfit;
6.5.25.19 MaxContracts
MaxContracts
Returns an absolute numerical value, indicating the maximum number of contracts held during the
specified position.
Usage
MaxContracts(PosBack)
Where: PosBack - a numerical expression, specifying the position:
0 - open position;
1 - one position back (the last position closed);
2 - two positions back, etc.
If PosBack is not specified, a value for the open position will be returned.
Notes
This function can only be used in signals.
Example
MaxContracts will return a value of 0 if the current position is flat
MaxContracts (1) will return a value of 10 if the most recently closed position was long or short a
maximum of 10 contracts
6.5.25.20 MaxEntries
MaxEntries
Returns a numerical value, indicating the total number of entries for the specified position.
Usage
MaxEntries(PosBack)
Where: PosBack - a numerical expression, specifying the position:
0 - open position;
1 - one position back (the last position closed);
2 - two positions back, etc.
If PosBack is not specified, a value for the open position will be returned.
Notes
This function can only be used in signals.
Example
MaxEntries (1) will return a value of 2 if there were two separate entries for the most recently
closed position
6.5.25.21 MaxPositionAgo
MaxPositionAgo
Returns a numerical value, indicating the number of times that the strategy has held a
position; positions that have not been closed are not included in the count.
Usage
MaxPositionAgo
Example
MaxPositionAgo will return a value, indicating the number of times that the strategy has
held a position
6.5.25.22 MaxPositionLoss
MaxPositionLoss
Returns a negative numerical value, indicating the largest loss reached while the specified position
was held.
Usage
MaxPositionLoss(PosBack)
Where: PosBack - a numerical expression, specifying the position:
0 - open position;
1 - one position back (the last position closed);
2 - two positions back, etc.
If PosBack is not specified, a value for the open position will be returned.
Notes
This function can only be used in signals.
Example
MaxPositionLoss will return a value of 0 if the value of the open position has not dropped below
the entry price at any time while it was held
MaxPositionLoss (1) will return a value of -10 if the most recently closed position has dropped in
value as much as $10 while it was held
6.5.25.23 MaxPositionProfit
MaxPositionProfit
Returns a numerical value, indicating the largest gain reached while the specified position was held.
Usage
MaxPositionProfit(PosBack)
Where: PosBack - a numerical expression, specifying the position:
0 - open position;
1 - one position back (the last position closed);
2 - two positions back, etc.
If PosBack is not specified, a value for the open position will be returned.
Notes
This function can only be used in signals.
Example
MaxPositionProfit will return a value of 0 if the value of the open position has not increased at
any time while it was held
MaxPositionProfit (1) will return a value of 10 if the most recently closed position has gained in
value as much as $10 while it was held
6.5.25.24 MaxShares
MaxShares
Same as MaxContracts 809
6.5.25.25 OpenPositionProfit
OpenPositionProfit
Returns a numerical value, indicating the current profit or loss for the open position.
Usage
MarketPosition
Notes
This function can only be used in signals.
Example
OpenPositionProfit will return a value of 0 if the current position is flat
OpenPositionProfit will return a value of 10 if the value of the open position has increased by
$10 since it was entered
OpenPositionProfit will return a value of -5 if the value of the open position has decreased by
$5 since it was entered
6.5.25.26 PositionProfit
PositionProfit
Returns a numerical value, indicating the profit or loss for the specified position.
Usage
PositionProfit(PosBack)
Where: PosBack - a numerical expression, specifying the position:
0 - open position;
1 - one position back (the last position closed);
2 - two positions back, etc.
If PosBack is not specified, a value for the open position will be returned.
Notes
This function can only be used in signals.
Example
PositionProfit will return a value of 0 if the current position is flat
PositionProfit (0) will return a value of 5 if the value of the open position has increased by $5
since it was entered
PositionProfit (1) will return a value of -5 if the most recently closed position has generated a
loss of $5
Commission
Returns the commission currency value entered in the Strategy Properties window.
Usage
Commission
Notes
This function can only be used in signals.
Example
Commission will return a value of 10.00 if the commission has been set to $10
6.5.26.2 GetStrategyName
GetStrategyName
Retained for backward compatibility.
6.5.26.3 Margin
Margin
Returns a dollar value that indicates the margin value per contract.
Usage
Margin
Notes
The margin value may not be returned for all types of the securities. The margin value is returned for
futures and options.
Example
Margin
6.5.26.4 Slippage
Slippage
Returns the slippage currency value entered in the Strategy Properties window.
Usage
Slippage
Notes
This function can only be used in signals.
Example
Slippage will return a value of 0.25 if the slippage has been set to $0.25
Text_Delete
Removes a text object with the specified ID number from a chart; returns a value of 0 if the object
was successfully removed, and a value of -2 if the specified object ID number is invalid.
Usage
Text_Delete(ObjectID)
Where: ObjectID - a numerical expression specifying the object ID number
Notes
An object-specific ID number is returned by Text_New 838 when the text object is created.
Example
Remove the text object with an ID number of 3:
Value1=Text_Delete(3);
6.5.27.2 Text_GetActive
Text_GetActive
Returns a numerical value indicating the object ID number of the currently selected text object;
returns a value of -1 if no text objects are currently selected.
Usage
Text_GetActive
Notes
An object-specific ID number is assigned by Text_New 838 when the text object is created.
Example
Assign a value, indicating the object ID number of the currently selected text object, to Value1
variable:
Value1=Text_GetActive;
6.5.27.3 Text_GetAttribute
Text_GetAttribute
Returns a logical value indicating the setting for an attribute of a text object with the specified ID
number; returns a value of True if the attribute is set to on, and a value of False if the attribute is
set to off or if the specified object ID number is invalid.
The settings of the following attributes can be returned: border, bold, italic, strike-out, and underline.
Usage
Text_GetAttribute(ObjectID,Attribute)
Parameters
ObjectID - a numerical expression specifying the object ID number
Attribute - a numerical expression specifying the attribute:
0 - border
1 - bold
2 - italic
3 - strike-out
4 - underline
Notes
An object-specific ID number is returned by Text_New 838 when the text object is created.
Example
Assign a true/false value, indicating the setting of "bold" attribute for the text object with an ID
number of 3, to Bold variable:
Variable:Bold(False);
Bold=Text_GetAttribute(3,1);
6.5.27.4 Text_GetBGColor
Text_GetBGColor
Returns an RGB color number or a legacy color value that correspond to the background color of a
text object with the specified ID number; returns a value of -2 if the specified object ID number is
invalid.
Usage
Text_GetBGColor(ObjectID)
Where: ObjectID - a numerical expression specifying the object ID number
Notes
An object-specific ID number is returned by Text_New 838 when the text object is created.
Example
Assign an RGB color number, corresponding to the background color of the text object with an ID
number of 3, to Value1 variable:
Value1=Text_GetBGColor(3);
Assign a legacy color value, corresponding to the background color of the text object with an ID
number of 3, to Value1 variable:
[LegacyColorValue=True];
Value1=Text_GetBGColor(3);
6.5.27.5 Text_GetBorder
Text_GetBorder
Returns a logical value, indicating whether a border is added to a text object with the specified ID
number; returns a value of True if the border has been added, and a value of False if the border
has not been added or if the specified object ID number is invalid.
Usage
Text_GetBorder(ObjectID)
Where: ObjectID - a numerical expression specifying the object ID number
Notes
An object-specific ID number is returned by Text_New 838 when the text object is created.
Example
Assign a true/false value, indicating whether a border is added to the text object with an ID number of
3, to Border variable:
Variable:Border(False);
Border=Text_GetBorder(3);
6.5.27.6 Text_GetColor
Text_GetColor
Returns an RGB color number or a legacy color value that correspond to the color of the text
contained in a text object with the specified ID number; returns a value of -2 if the specified object ID
number is invalid.
Usage
Text_GetColor(ObjectID)
Where: ObjectID - a numerical expression specifying the object ID number
Notes
An object-specific ID number is returned by Text_New 838 when the text object is created.
Example
Assign an RGB color number, corresponding to the color of the text object with an ID number of 3, to
Value1 variable:
Value1=Text_GetColor(3);
Assign a legacy color value, corresponding to the color of the text object with an ID number of 3, to
Value1 variable:
[LegacyColorValue=True];
Value1=Text_GetColor(3);
6.5.27.7 Text_GetDate
Text_GetDate
Returns a numerical value, indicating the date of the bar at which a text object with the specified ID
number has been placed; returns a value of -2 if the specified object ID number is invalid.
The date is indicated in the YYYMMdd format, where YYY is the number of years since 1900, MM is
the month, and dd is the day of the month.
Usage
Text_GetDate(ObjectID)
Where: ObjectID - a numerical expression specifying the object ID number
Notes
An object-specific ID number is returned by Text_New 838 when the text object is created.
Example
Assign a value, indicating the date of the bar at which a text object with the ID number of 3 has been
placed, to Value1 variable:
Value1=Text_GetDate(3);
6.5.27.8 Text_GetFirst
Text_GetFirst
Returns a numerical value, indicating an object ID number of the oldest (the first to be added to the
current chart) text object of the specified origin; returns a value of -2 if the specified object ID number
is invalid.
Usage
Text_GetFirst (Origin)
Parameters
Origin - a numerical expression specifying the origin of the text object:
1 - added by the current study
2 - added by a study other then the current study, or drawn manually by the user
3 - added by any study, or drawn manually by the user
4 - added by the current study, or drawn manually by the user
5 - added by a study other then the current study
6 - added by any study
7 - added manually by the user
Notes
If the oldest (the first added) text object is deleted, the next oldest (the second added) text object
becomes the oldest (the first added) text object.
Example
Assign a value, indicating an object ID number of the oldest text object added to the chart by the
current study, to Value1 variable:
Value1=Text_GetFirst(1);
6.5.27.9 Text_GetFontName
Text_GetFontName
Returns a string expression corresponding to the name of the font assigned to a text object with the
specified ID number.
Usage
Text_GetFontName(ObjectID)
Where: ObjectID - a numerical expression specifying the object ID number
Notes
An object-specific ID number is returned by Text_New 838 when the text object is created.
Example
Text_GetFontName(3) will return a string expression corresponding to the name of the font
assigned to a text object with the ID number of 3
6.5.27.10 Text_GetHStyle
Text_GetHStyle
Returns the horizontal placement style of a text object with the specified ID number; returns a value
of -2 if the specified object ID number is invalid.
Usage
Text_GetHStyle(ObjectID)
Where: ObjectID - a numerical expression specifying the object ID number
Return
Horizontal placement style:
0 - to the right of the specified bar
1 - to the left of the specified bar
2 - centered on the specified bar
Notes
An object-specific ID number is returned by Text_New 838 when the text object is created.
Example
Assign a value, indicating the horizontal placement style of the text object with an ID number of 3, to
Value1 variable:
Value1=Text_GetHStyle(3);
6.5.27.11 Text_GetNext
Text_GetNext
Returns an ID number of the first existing text object added subsequent to a text object with the
specified ID number, with both objects of a specified origin; returns a value of -2 if the specified
object ID number is invalid.
Usage
Text_GetNext(ObjectID,Origin)
Parameters
ObjectID - a numerical expression specifying the object ID number
Origin - a numerical expression specifying the origin of the text objects:
1 - added by the current study
2 - added by a study other then the current study, or drawn manually by the user
3 - added by any study, or drawn manually by the user
4 - added by the current study, or drawn manually by the user
5 - added by a study other then the current study
6 - added by any study
7 - added manually by the user
Example
Assign a value to Value1 variable, indicating an ID number of the first existing text object added
subsequent to a text object with the ID number of 3, with both objects added by the current study:
Value1=Text_GetNext(3,1);
6.5.27.12 Text_GetSize
Text_GetSize
Returns a numerical value indicating the font size assigned to a text object with the specified ID
number; returns a value of -2 if the specified object ID number is invalid.
Usage
Text_GetSize(ObjectID)
Where: ObjectID - a numerical expression specifying the object ID number
Notes
An object-specific ID number is returned by Text_New 838 when the text object is created.
Example
Assign a value, indicating the font size of the text object with an ID number of 3, to Value1 variable:
Value1=Text_GetSize(3);
6.5.27.13 Text_GetString
Text_GetString
Returns a string expression corresponding to the text contained in a text object with the specified ID
number.
Usage
Text_GetString(ObjectID)
Where: ObjectID - a numerical expression specifying the object ID number
Notes
An object-specific ID number is returned by Text_New 838 when the text object is created.
Example
Text_GetString(3) will return a string expression corresponding to the text contained in the text
object with an ID number of 3
6.5.27.14 Text_GetTime
Text_GetTime
Returns a numerical value, indicating the time of the bar at which a text object with the specified ID
number has been placed; returns a value of -2 if the specified object ID number is invalid.
The time is indicated in the 24-hour HHmm format, where 1300 = 1:00 PM.
Usage
Text_GetTime(ObjectID)
Where: ObjectID - a numerical expression specifying the object ID number
Notes
An object-specific ID number is returned by Text_New 838 when the text object is created.
Example
Assign a value, indicating the time of the bar at which a text object with the ID number of 3 has been
placed, to Value1 variable:
Value1=Text_GetTime(3);
6.5.27.15 Text_GetTime_s
Text_GetTime_s
Returns a numerical value indicating the time, including seconds, of the bar at which a text object
with the specified ID number has been placed; returns a value of -2 if the specified object ID number
is invalid.
The time is indicated in the 24-hour HHmmss format, where 130000 = 1:00:00 PM.
Usage
Text_GetTime_s(ObjectID)
Where: ObjectID - a numerical expression specifying the object ID number
Notes
An object-specific ID number is returned by Text_New_s 839 when the text object is created.
Example
Assign a value, indicating the time of the bar at which a text object with the ID number of 3 has been
placed, to Value1 variable:
Value1=Text_GetTime_s(3);
6.5.27.16 Text_GetValue
Text_GetValue
Returns the price value (vertical position, corresponding to a value on the price scale of a chart), at
which a text object with the specified ID number has been placed; returns a value of -2 if the
specified object ID number is invalid.
Usage
Text_GetValue(ObjectID)
Where: ObjectID - a numerical expression specifying the object ID number
Notes
An object-specific ID number is returned by Text_New 838 when the text object is created.
Example
Assign a value, indicating the price value at which a text object with the ID number of 3 has been
placed, to Value1 variable:
Value1=Text_GetValue(3);
6.5.27.17 Text_GetVStyle
Text_GetVStyle
Returns the vertical placement style of a text object with the specified ID number; returns a value of -
2 if the specified object ID number is invalid.
Usage
Text_GetVStyle(ObjectID)
Where: ObjectID - a numerical expression specifying the object ID number
Return
Vertical placement style:
0 - below the specified price value
1 - above the specified price value
2 - centered on the specified price value
Price value represents the vertical position corresponding to a value on the price scale of a chart.
Notes
An object-specific ID number is returned by Text_New 838 when the text object is created.
Example
Assign a value, indicating the vertical placement style of the text object with an ID number of 3, to
Value1 variable:
Value1=Text_GetVStyle(3);
6.5.27.18 Text_New
Text_New
Displays a text object, consisting of the specified string expression located at the specified bar and
specified price value, on the chart that the study is based on; returns an object-specific ID number,
required to modify the object.
Usage
Text_New (BarDate, BarTime, PriceValue,"Text")
Parameters
BarDate - a numerical expression specifying the date of the bar at which the object is to be
placed; the date is indicated in the YYYMMdd format, where YYY is the number of years since
1900, MM is the month, and dd is the day of the month
BarTime - a numerical expression specifying the time of the bar at which the object is to be
placed; the time is indicated in the 24-hour HHmm format, where 1300 = 1:00 PM
PriceValue - a numerical expression specifying the price value (vertical position, corresponding
to a value on the price scale of a chart), where the object is to be placed
Text - the string expression to be displayed
Example
Place, on the chart that the study is based on, the text "UpT" at the top of a bar if the Open price has
increased incrementally over the last three bars:
If Open>Open[1] And Open[1]>Open[2] Then
Value1=Text_New(Date,Time,High,"UpT");
6.5.27.19 Text_New_s
Text_New_s
Displays a text object, consisting of the specified string expression located at the specified bar and
specified price value, on the chart that the study is based on; returns an object-specific ID number,
required to modify the object.
Usage
Text_New_s (BarDate, BarTime_s, PriceValue,"Text")
Parameters
BarDate - a numerical expression specifying the date of the bar at which the object is to be
placed; the date is indicated in the YYYMMdd format, where YYY is the number of years since
1900, MM is the month, and dd is the day of the month
BarTime_s - a numerical expression specifying the time of the bar, including seconds, at which
the object is to be placed; the time is indicated in the 24-hour HHmmss format, where 130000 =
1:00:00 PM
PriceValue - a numerical expression specifying the price value (vertical position, corresponding
to a value on the price scale of a chart), where the object is to be placed
Text - the string expression to be displayed
Example
Place, on the chart that the study is based on, the text "UpT" at the top of a bar if the Open price has
increased incrementally over the last three bars:
If Open>Open[1] And Open[1]>Open[2] Then
Value1=Text_New_s(Date,Time_s,High,"UpT");
6.5.27.20 Text_New_self
Text_New_self
Displays a text object, consisting of the specified string expression located at the specified bar and
specified price value, on the SubChart containing the study; returns an object-specific ID number,
required to modify the object.
Usage
Text_New_self (BarDate, BarTime, PriceValue,"Text")
Parameters
BarDate - a numerical expression specifying the date of the bar at which the object is to be
placed; the date is indicated in the YYYMMdd format, where YYY is the number of years since
1900, MM is the month, and dd is the day of the month
BarTime - a numerical expression specifying the time of the bar at which the object is to be
placed; the time is indicated in the 24-hour HHmm format, where 1300 = 1:00 PM
PriceValue - a numerical expression specifying the price value (vertical position, corresponding
to a value on the price scale of a chart), where the object is to be placed
Text - the string expression to be displayed
Example
Place, on the SubChart containing the study, the text "UpT" at the points of the plot where the Open
price has increased incrementally over the last three bars:
Plot1(Close);
If Open>Open[1] And Open[1]>Open[2] Then
Value1=Text_New_self(Date,Time,High,"UpT");
6.5.27.21 Text_New_self_s
Text_New_self_s
Displays a text object, consisting of the specified string expression located at the specified bar and
specified price value, on the SubChart containing the study; returns an object-specific ID number,
required to modify the object.
Usage
Text_New_self_s (BarDate, BarTime_s, PriceValue,"Text")
Parameters
BarDate - a numerical expression specifying the date of the bar at which the object is to be
placed; the date is indicated in the YYYMMdd format, where YYY is the number of years since
1900, MM is the month, and dd is the day of the month
BarTime_s - a numerical expression specifying the time of the bar, including seconds, at which
the object is to be placed; the time is indicated in the 24-hour HHmmss format, where 130000 =
1:00:00 PM
PriceValue - a numerical expression specifying the price value (vertical position, corresponding
to a value on the price scale of a chart), where the object is to be placed
Text - the string expression to be displayed
Example
Place, on the SubChart containing the study, the text "UpT" at the points of the plot where the Open
price has increased incrementally over the last three bars:
Plot1(Close);
If Open>Open[1] And Open[1]>Open[2] Then
Value1=Text_New_self_s(Date,Time_s,High,"UpT");
6.5.27.22 Text_SetAttribute
Text_SetAttribute
Sets an attribute of the text in a text object with the specified ID number; returns a value of 0 if the
attribute was successfully set, and a value of -2 if the specified object ID number is invalid.
The following text attributes can be set: border, bold, italic, strike-out, and underline.
Usage
Text_SetAttribute(ObjectID,Attribute,LogicalExpression)
Parameters
ObjectID - a numerical expression specifying the object ID number
Attribute - a numerical expression specifying the attribute:
0 - border
1 - bold
2 - italic
3 - strike-out
4 - underline
Notes
An object-specific ID number is returned by Text_New 838 when the text object is created.
Example
Set the attribute "bold" to on for the text in a text object with the ID number of 3:
Value1=Text_SetAttribute(3,1,True);
6.5.27.23 Text_SetBGColor
Text_SetBGColor
Assigns the specified background color to a text object with the specified ID number; returns a value
of 0 if the color was successfully assigned, and a value of -2 if the specified object ID number is
invalid.
Usage
Text_SetBGColor(ObjectID,BGColor)
Parameters
ObjectID - a numerical expression specifying the object ID number
BGColor - an expression specifying the background color
The color can be specified by a numerical expression representing an RGB color number or a
legacy color value, or by one of 17 base color words.
Notes
An object-specific ID number is returned by Text_New 838 when the text object is created.
Example
Assign the color blue to the background of a text object with the ID number of 3:
Value1=Text_SetBGColor(3,Blue);
Assign the RGB color 2138336 (Orange) to the background of a text object with the ID number of 3:
Value1=Text_SetBGColor(3,2138336);
Assign the legacy color 4 (Green) to the background of a text object with the ID number of 3:
[LegacyColorValue=True];
Value1=Text_SetBGColor(3,4);
6.5.27.24 Text_SetBorder
Text_SetBorder
Adds or removes a border around the text object with the specified ID number; returns a value of 0 if
the border was successfully set, and a value of -2 if the specified object ID number is invalid.
The color of the border is the same as the color of the text in the text object.
Usage
Text_SetBorder(ObjectID,LogicalExpression)
Where: ObjectID - a numerical expression specifying the object ID number
LogicalExpression - a logical value; True = Add and False = Remove
Notes
An object-specific ID number is returned by Text_New 838 when the text object is created.
Example
Add a border to the text object with an ID number of 3:
Value1=Text_SetBorder(3,True);
6.5.27.25 Text_SetColor
Text_SetColor
Assigns the specified color to the text of a text object with the specified ID number; returns a value of
0 if the color was successfully assigned, and a value of -2 if the specified object ID number is invalid.
Usage
Text_SetColor(ObjectID,TextColor)
Parameters
ObjectID - a numerical expression specifying the object ID number
TextColor - an expression specifying the text color
The color can be specified by a numerical expression representing an RGB color number or a
legacy color value, or by one of 17 base color words.
Notes
An object-specific ID number is returned by Text_New 838 when the text object is created.
Example
Assign the color blue to the text of a text object with the ID number of 3:
Value1=Text_SetColor(3,Blue);
Assign the RGB color 2138336 (Orange) to the text of a text object with the ID number of 3:
Value1=Text_SetColor(3,2138336);
Assign the legacy color 4 (Green) to the text of a text object with the ID number of 3:
[LegacyColorValue=True];
Value1=Text_SetColor(3,4);
6.5.27.26 Text_SetFontName
Text_SetFontName
Assigns the specified font to a text object with the specified ID number; returns a value of -2 if the
specified object ID number is invalid.
Any font in the Fonts folder can be used; the folder is accessible from the Control Panel in Windows
XP operating system.
Usage
Text_SetFontName(ObjectID,"FontName")
Where: ObjectID - a numerical expression specifying the object ID number
FontName - a string expression specifying the font name
Notes
An object-specific ID number is returned by Text_New 838 when the text object is created.
Example
Assign font Verdana to the text object with the ID number of 3:
Value1=Text_SetFontName(3,"Verdana");
6.5.27.27 Text_SetLocation
Text_SetLocation
Modifies the location of a text object with the specified ID number; returns a value of 0 if the location
of the object was successfully modified, and a value of -2 if the specified object ID number is invalid.
Usage
Text_SetLocation (ObjectID, BarDate, BarTime, PriceValue)
Parameters
ObjectID - a numerical expression specifying the object ID number
BarDate - a numerical expression specifying the date of the bar at which the object is to be
placed; the date is indicated in the YYYMMdd format, where YYY is the number of years since
1900, MM is the month, and dd is the day of the month
BarTime - a numerical expression specifying the time of the bar at which the object is to be
placed; the time is indicated in the 24-hour HHmm format, where 1300 = 1:00 PM
PriceValue - a numerical expression specifying the price value (vertical position, corresponding
to a value on the price scale of a chart), where the object is to be placed
Notes
An object-specific ID number is returned by Text_New 838 when the text object is created.
Example
Move the text object with an ID number of 3 to the top of the current bar:
Value1=Text_SetLocation(3,Date,Time,High);
6.5.27.28 Text_SetLocation_s
Text_SetLocation_s
Modifies the location of a text object with the specified ID number; returns a value of 0 if the location
of the object was successfully modified, and a value of -2 if the specified object ID number is invalid.
Usage
Text_SetLocation_s (ObjectID, BarDate, BarTime_s, PriceValue)
Parameters
ObjectID - a numerical expression specifying the object ID number
BarDate - a numerical expression specifying the date of the bar at which the object is to be
placed; the date is indicated in the YYYMMdd format, where YYY is the number of years since
1900, MM is the month, and dd is the day of the month
BarTime_s - a numerical expression specifying the time of the bar, including seconds, at which
the object is to be placed; the time is indicated in the 24-hour HHmmss format, where 130000 =
1:00:00 PM
PriceValue - a numerical expression specifying the price value (vertical position, corresponding
to a value on the price scale of a chart), where the object is to be placed
Notes
An object-specific ID number is returned by Text_New_s 839 when the text object is created.
Example
Move the text object with an ID number of 3 to the top of the current bar:
Value1=Text_SetLocation_s(3,Date,Time_s,High);
6.5.27.29 Text_SetSize
Text_SetSize
Assigns the specified font size to the text of a text object with the specified ID number; returns a
value of 0 if the font size was successfully assigned, and a value of -2 if the specified object ID
number is invalid.
Usage
Text_SetSize(ObjectID,FontSize)
Where: ObjectID - a numerical expression specifying the object ID number
FontSize - a numerical expression specifying the font size
Notes
An object-specific ID number is returned by Text_New 838 when the text object is created.
Example
Assign the font size of 16 to the text of a text object with the ID number of 3:
Value1=Text_SetSize(3,16);
6.5.27.30 Text_SetString
Text_SetString
Replaces with the specified string expression the text contained in a text object with the specified ID
number; returns a value of 0 if the string expression was successfully replaced, and a value of -2 if
the specified object ID number is invalid.
Usage
Text_SetString(ObjectID,"Text")
Where: ObjectID - a numerical expression specifying the object ID number
Text - the new string expression to be displayed in the text object
Notes
An object-specific ID number is returned by Text_New 838 when the text object is created.
Example
Replace the text, contained in a text object with the ID number of 3, with the string expression "New
Text":
Value1=Text_SetString(3,"New Text");
6.5.27.31 Text_SetStyle
Text_SetStyle
Sets the placement style of a text object relative to the bar and to the price value specified for the
object; returns a value of 0 if the placement style of the object was successfully modified, and a value
of -2 if the specified object ID number is invalid.
Usage
Text_SetStyle (ObjectID, HorizPl, VertPl)
Parameters
ObjectID - a numerical expression specifying the object ID number
HorizPl - a numerical expression specifying the horizontal placement style for the text object:
0 - to the right of the specified bar
1 - to the left of the specified bar
2 - centered on the specified bar
VertPl - a numerical expression specifying the vertical placement style for the text object:
0 - below the specified price value
1 - above the specified price value
2 - centered on the specified price value
Price value represents the vertical position corresponding to a value on the price scale of a chart.
Notes
An object-specific ID number is returned by Text_New 838 when the text object is created.
Example
Center the text object with an ID number of 3 on the bar and on the price value, specified for the
object:
Value1=Text_SetStyle(3,2,2);
DoubleQuote
Displays the double-quote (") character in a string.
Example
This example demonstrates how the word Hello in double quotes can be displayed on the last bar
above High:
Variable: ID(-1);
If LastBarOnChart Then
ID = Text_New(Date, Time, High + 1 Point, DoubleQuote + "Hello" +
DoubleQuote);
6.5.28.2 InStr
InStr
Returns the position of a specified string expression inside another specified string expression.
The position of the string being located is indicated by the number of characters from the left side of
the string being evaluated.
Usage
InStr(String1,String2)
Where: String1 - a string to be evaluated
String2 - a string to be located
Notes
In case the search returns no results 0 is returned
In case if the sought word occurs more than once, the first position will be returned
Search is case sensetive
Example
InStr("Friday is the expiration day", "Friday");
will return a value of 1, indicating that the string "Friday" begins at position 1 of the String "Friday is
the expiration day"
6.5.28.3 LeftStr
LeftStr
Returns one or more leftmost characters from the specified string expression.
Usage
LeftStr(String,sSize)
Where: String - a string expression from which the characters are to be taken
sSize - a numerical expression specifying the number of characters to be returned
Example
LeftStr("Hello World",5); will return a string expression "Hello"
6.5.28.4 LowerStr
LowerStr
Converts the uppercase letters of a specified string expression to a lowercase.
Usage
LowerStr("String")
Where: String - a string expression to be converted
Example
LowerStr("Return on Account"); will return a string expression "return on account"
6.5.28.5 MidStr
MidStr
Returns a part, starting from a specified position and of a specified length, of a specified string
expression.
Usage
MidStr("String",Pos,Num)
Where: String - a string expression the specified part is to be taken from
Pos - a numerical expression specifying the position, from the left side of the string, of the
starting character of the part
Num - a numerical expression specifying the length, in characters, of the part
Example
MidStr("Largest winning trade",1,7); will return a string expression "Largest"
6.5.28.6 NewLine
NewLine
Starts a new line and returns carriage.
Notes
Use the "+" character to add NewLine to a string expression.
Example
FileAppend("c:\testfile.txt","We can see a new bar for"+ NumToStr(Date,0)+
NewLine);
6.5.28.7 NumToStr
NumToStr
Returns a specified numerical expression in the form of a string expression.
Usage
NumToStr(Expression,Dec)
Where: Expression - a numerical expression to be converted to a string expression
Dec - a numerical expression specifying the number of decimal places the returned string
expression is to contain
Example
NumToStr(1500.5,3); will return a string expression "1500.500"
6.5.28.8 RightStr
RightStr
Returns one or more rightmost characters from the specified string expression.
Usage
RightStr(String,sSize)
Where: String - a string expression from which the characters are to be taken
sSize - a numerical expression specifying the number of characters to be returned
Example
RightStr("Hello World",5); will return a string expression "World"
6.5.28.9 Spaces
Spaces
Returns a string expression consisting of a specified number of spaces.
Usage
Spaces(Num)
Where: Num - a numerical expression specifying the number of spaces
Example
The example inserts two blank spaces between the letters "a" and "b":
Print("a"+Spaces(2)+"b");
6.5.28.10 StrLen
StrLen
Returns the length, in characters, of a specified string expression.
Usage
StrLen("String")
Where: String - a string expression to be evaluated
Example
StrLen("Drawdown"); will return a value of 8
6.5.28.11 StrToNum
StrToNum
Converts a specified string expression to a numerical value.
Usage
StrToNum("String")
Where: String - a string expression to be converted
Notes
If non-numeric characters are encountered the rest of the expression is ignored.
Example
StrToNum("2500.70"); will return a value of 2500.70
6.5.28.12 Text
Text
Returns the string, formed up by the transferred arguments.
Usage
Text(Param1, Param2, ..., ParamN);
Where: Param(i) is string expression, numeric expression or True/False value.
Example
Text_new(D,T,C,Text("Bar Date/Time is ",Date:0:0,"/",Time:0:0));
6.5.28.13 UpperStr
UpperStr
Converts the lowercase letters of a specified string expression to uppercase.
Usage
UpperStr("String")
Where: String - a string expression to be converted
Example
UpperStr("msft"); will return a string expression "MSFT"
TL_Delete
Removes a trendline with the specified ID number from a chart; returns a value of 0 if the trendline
was successfully removed, and a value of -2 if the specified trendline ID number is invalid.
Usage
TL_Delete(TL_ID)
Where: TL_ID - a numerical expression specifying the trendline ID number
Notes
A trendline-specific ID number is returned by TL_New 886 when the trendline is created.
Example
Remove the trendline with an ID number of 3:
Value1=TL_Delete(3);
6.5.29.2 TL_GetActive
TL_GetActive
Returns a numerical value indicating the trendline ID number of the currently selected trendline;
returns a value of -1 if no trendlines are currently selected.
Usage
TL_GetActive
Notes
A trendline-specific ID number is assigned by TL_New 886 when the trendline is created.
Example
Assign a value, indicating the trendline ID number of the currently selected trendline, to Value1
variable:
Value1=TL_GetActive;
6.5.29.3 TL_GetAlert
TL_GetAlert
Returns the alert status for a trendline with the specified ID number; returns a value of -2 if the
specified trendline ID number is invalid.
Usage
TL_GetAlert(TL_ID)
Where: TL_ID - a numerical expression specifying the trendline ID number
Return
Alert status:
0 - Alert disabled
1 - Breakout intra-bar
An alert is triggered if the High crosses over the trendline or the Low crosses under the trendline.
Alert triggering conditions are evaluated intra-bar.
2 - Breakout on close
An alert is triggered if the Close of the previous bar was below the trendline and the Close of the
current bar is above the trendline, or if the Close of the previous bar was above the trendline and the
Close of the current bar is below the trendline. Alert triggering conditions are evaluated at Close of a
bar.
Notes
A trendline-specific ID number is returned by TL_New 886 when the trendline is created.
Example
Assign a value, indicating the alert status for a trendline with the ID number of 3, to Value1 variable:
Value1=TL_GetAlert(3);
6.5.29.4 TL_GetBeginDate
TL_GetBeginDate
Returns a numerical value, indicating the date of the starting point of a trendline with the specified ID
number; returns a value of -2 if the specified trendline ID number is invalid.
Of the two end points of a trendline, the point with the earlier date and time is always considered to
be the starting point; if the trendline is vertical, the point with the lower price value is considered to be
the starting point.
The date is indicated in the YYYMMdd format, where YYY is the number of years since 1900, MM is
the month, and dd is the day of the month.
Usage
TL_GetBeginDate(TL_ID)
Where: TL_ID - a numerical expression specifying the trendline ID number
Notes
A trendline-specific ID number is returned by TL_New 886 when the trendline is created.
Example
Assign a value, indicating the date of the starting point of a trendline with the ID number of 3, to
Value1 variable:
Value1=TL_GetBeginDate(3);
6.5.29.5 TL_GetBeginTime
TL_GetBeginTime
Returns a numerical value, indicating the time of the starting point of a trendline with the specified ID
number; returns a value of -2 if the specified trendline ID number is invalid.
Of the two end points of a trendline, the point with the earlier date and time is always considered to
be the starting point; if the trendline is vertical, the point with the lower price value is considered to be
the starting point.
The time is indicated in the 24-hour HHmm format, where 1300 = 1:00 PM.
Usage
TL_GetBeginTime(TL_ID)
Where: TL_ID - a numerical expression specifying the trendline ID number
Notes
A trendline-specific ID number is returned by TL_New 886 when the trendline is created.
Example
Assign a value, indicating the time of the starting point of a trendline with the ID number of 3, to
Value1 variable:
Value1=TL_GetBeginTime(3);
6.5.29.6 TL_GetBeginTime_s
TL_GetBeginTime_s
Returns a numerical value indicating the time, including seconds, of the starting point of a trendline
with the specified ID number; returns a value of -2 if the specified trendline ID number is invalid.
Of the two end points of a trendline, the point with the earlier date and time is always considered to
be the starting point; if the trendline is vertical, the point with the lower price value is considered to be
the starting point.
The time is indicated in the 24-hour HHmmss format, where 130000 = 1:00:00 PM.
Usage
TL_GetBeginTime_s(TL_ID)
Where: TL_ID - a numerical expression specifying the trendline ID number
Notes
A trendline-specific ID number is returned by TL_New_s 887 when the trendline is created.
Example
Assign a value, indicating the time of the starting point of a trendline with the ID number of 3, to
Value1 variable:
Value1=TL_GetBeginTime_s(3);
6.5.29.7 TL_GetBeginVal
TL_GetBeginVal
Returns the price value (vertical position, corresponding to a value on the price scale of a chart) of
the starting point of a trendline with the specified ID number; returns a value of -2 if the specified
trendline ID number is invalid.
Of the two end points of a trendline, the point with the earlier date and time is always considered to
be the starting point; if the trendline is vertical, the point with the lower price value is considered to be
the starting point.
Usage
TL_GetBeginVal(TL_ID)
Where: TL_ID - a numerical expression specifying the trendline ID number
Notes
A trendline-specific ID number is returned by TL_New 886 when the trendline is created.
Example
Assign a value, indicating the price value of the starting point of a trendline with the ID number of 3,
to Value1 variable:
Value1=TL_GetBeginVal(3);
6.5.29.8 TL_GetColor
TL_GetColor
Returns an RGB color number or a legacy color value that correspond to the color of a trendline with
the specified ID number; returns a value of -2 if the specified trendline ID number is invalid.
Usage
TL_GetColor(TL_ID)
Where: TL_ID - a numerical expression specifying the trendline ID number
Notes
A trendline-specific ID number is returned by TL_New 886 when the trendline is created.
Example
Assign an RGB color number, corresponding to the color of a trendline with the ID number of 3, to
Value1 variable:
Value1=TL_GetColor(3);
Assign a legacy color value, corresponding to the color of a trendline with the ID number of 3, to
Value1 variable:
[LegacyColorValue=True];
Value1=TL_GetColor(3);
6.5.29.9 TL_GetEndDate
TL_GetEndDate
Returns a numerical value, indicating the date of the ending point of a trendline with the specified ID
number; returns a value of -2 if the specified trendline ID number is invalid.
Of the two end points of a trendline, the point with the later date and time is always considered to be
the ending point; if the trendline is vertical, the point with the higher price value is considered to be
the ending point.
The date is indicated in the YYYMMdd format, where YYY is the number of years since 1900, MM is
the month, and dd is the day of the month.
Usage
TL_GetEndDate(TL_ID)
Where: TL_ID - a numerical expression specifying the trendline ID number
Notes
A trendline-specific ID number is returned by TL_New 886 when the trendline is created.
Example
Assign a value, indicating the date of the ending point of a trendline with the ID number of 3, to
Value1 variable:
Value1=TL_GetEndDate(3);
6.5.29.10 TL_GetEndTime
TL_GetEndTime
Returns a numerical value, indicating the time of the ending point of a trendline with the specified ID
number; returns a value of -2 if the specified trendline ID number is invalid.
Of the two end points of a trendline, the point with the later date and time is always considered to be
the ending point; if the trendline is vertical, the point with the higher price value is considered to be
the ending point.
The time is indicated in the 24-hour HHmm format, where 1300 = 1:00 PM.
Usage
TL_GetEndTime(TL_ID)
Where: TL_ID - a numerical expression specifying the trendline ID number
Notes
A trendline-specific ID number is returned by TL_New 886 when the trendline is created.
Example
Assign a value, indicating the time of the ending point of a trendline with the ID number of 3, to
Value1 variable:
Value1=TL_GetEndTime(3);
6.5.29.11 TL_GetEndTime_s
TL_GetEndTime_s
Returns a numerical value indicating the time, including seconds, of the ending point of a trendline
with the specified ID number; returns a value of -2 if the specified trendline ID number is invalid.
Of the two end points of a trendline, the point with the later date and time is always considered to be
the ending point; if the trendline is vertical, the point with the higher price value is considered to be
the ending point.
The time is indicated in the 24-hour HHmmss format, where 130000 = 1:00:00 PM.
Usage
TL_GetEndTime_s(TL_ID)
Where: TL_ID - a numerical expression specifying the trendline ID number
Notes
A trendline-specific ID number is returned by TL_New_s 887 when the trendline is created.
Example
Assign a value, indicating the time of the ending point of a trendline with the ID number of 3, to
Value1 variable:
Value1=TL_GetEndTime_s(3);
6.5.29.12 TL_GetEndVal
TL_GetEndVal
Returns the price value (vertical position, corresponding to a value on the price scale of a chart) of
the ending point of a trendline with the specified ID number; returns a value of -2 if the specified
trendline ID number is invalid.
Of the two end points of a trendline, the point with the later date and time is always considered to be
the ending point; if the trendline is vertical, the point with the higher price value is considered to be
the ending point.
Usage
TL_GetEndVal(TL_ID)
Where: TL_ID - a numerical expression specifying the trendline ID number
Notes
A trendline-specific ID number is returned by TL_New 886 when the trendline is created.
Example
Assign a value, indicating the price value of the ending point of a trendline with the ID number of 3, to
Value1 variable:
Value1=TL_GetEndVal(3);
6.5.29.13 TL_GetExtLeft
TL_GetExtLeft
Returns a logical value, indicating whether the trendline with the specified ID number is extended to
the left; returns a value of True if the trendline is extended, and a value of False if the trendline is
not extended or if the specified trendline ID number is invalid.
Usage
TL_GetExtLeft(TL_ID)
Where: TL_ID - a numerical expression specifying the trendline ID number
Notes
A trendline-specific ID number is returned by TL_New 886 when the trendline is created.
Example
Assign a true/false value, indicating whether the trendline with an ID number of 3 is extended to the
left, to ExtL variable:
Variable:ExtL(False);
ExtL=TL_GetExtLeft(3);
6.5.29.14 TL_GetExtRight
TL_GetExtRight
Returns a logical value, indicating whether the trendline with the specified ID number is extended to
the right; returns a value of True if the trendline is extended, and a value of False if the trendline is
not extended or if the specified trendline ID number is invalid.
Usage
TL_GetExtRight(TL_ID)
Where: TL_ID - a numerical expression specifying the trendline ID number
Notes
A trendline-specific ID number is returned by TL_New 886 when the trendline is created.
Example
Assign a true/false value, indicating whether the trendline with an ID number of 3 is extended to the
right, to ExtR variable:
Variable:ExtR(False);
ExtR=TL_GetExtRight(3);
6.5.29.15 TL_GetFirst
TL_GetFirst
Returns a numerical value, indicating the trendline ID number of the oldest (the first to be drawn on
the current chart) trendline of the specified origin; returns a value of -2 if the specified trendline ID
number is invalid.
Usage
TL_GetFirst (Origin)
Parameters
Origin - a numerical expression specifying the origin of the trendline:
1 - drawn by the current study
2 - drawn by a study other then the current study, or drawn manually by the user
3 - drawn by any study, or drawn manually by the user
4 - drawn by the current study, or drawn manually by the user
5 - drawn by a study other then the current study
6 - drawn by any study
7 - drawn manually by the user
Notes
If the oldest (the first to be drawn) trendline is deleted, the next oldest (the second to be drawn)
trendline becomes the oldest (the first drawn) trendline.
Example
Assign a value, indicating the trendline ID number of the oldest trendline drawn on the chart by the
current study, to Value1 variable:
Value1=TL_GetFirst(1);
6.5.29.16 TL_GetNext
TL_GetNext
Returns an ID number of the first existing trendline drawn subsequent to a trendline with the specified
ID number, with both trendlines of a specified origin; returns a value of -2 if the specified object ID
number is invalid.
Usage
TL_GetNext (TL_ID,Origin)
Parameters
TL_ID - a numerical expression specifying the trendline ID number
Origin - a numerical expression specifying the origin of the trendlines:
1 - drawn by the current study
2 - drawn by a study other then the current study, or drawn manually by the user
3 - drawn by any study, or drawn manually by the user
4 - drawn by the current study, or drawn manually by the user
5 - drawn by a study other then the current study
6 - drawn by any study
7 - drawn manually by the user
Example
Assign a value to Value1 variable, indicating the ID number of the first existing trendline drawn
subsequent to a trendline with the ID number of 3, with both trendlines drawn by the current study:
Value1=TL_GetNext(3,1);
6.5.29.17 TL_GetSize
TL_GetSize
Returns a numerical value indicating the width of a trendline with the specified ID number; returns a
value of -2 if the specified trendline ID number is invalid.
Usage
TL_GetSize(TL_ID)
Where: TL_ID - a numerical expression specifying the trendline ID number
Notes
A trendline-specific ID number is returned by TL_New 886 when the trendline is created.
Example
Assign a value, indicating the width of a trendline with the ID number of 3, to Value1 variable:
Value1=TL_GetSize(3);
6.5.29.18 TL_GetStyle
TL_GetStyle
Returns a numerical value, indicating the style of a trendline with the specified ID number; returns a
value of -2 if the specified trendline ID number is invalid.
Usage
TL_GetStyle(TL_ID)
Where: TL_ID - a numerical expression specifying the trendline ID number
Return
Trendline styles:
1 T________
o ________
o ______
l
S
o
l
i
d
2 T- - - - - - - -
o- - - - - - - -
o- - -
l
D
a
s
h
e
d
3 T.................
o .................
o ..........
l
D
o
t
t
e
d
4 T__ _ __ _
o __ _ __ _
o __ _ __
l
D
a
s
h
e
d
2
5 T___ _ _
o ___ _ _
o ___ _ _
l ___
D
a
s
h
e
d
3
Notes
Example
Assign a value, indicating the style of a trendline with the ID number of 3, to Value1 variable:
Value1=TL_GetStyle(3);
6.5.29.19 TL_GetValue
TL_GetValue
Returns a price value, at the specified date and time, of a trendline with the specified ID number;
returns a value of -2 if the specified trendline ID number is invalid.
If the trendline does not extend to the specified date and time, a price value along the same slope as
the trendline will be returned.
Usage
TL_GetValue (TL_ID, Date, Time)
Parameters
TL_ID - a numerical expression specifying the trendline ID number
Date - a numerical expression specifying the date; the date is indicated in the YYYMMdd format,
where YYY is the number of years since 1900, MM is the month, and dd is the day of the month
Time - a numerical expression specifying the time; the time is indicated in the 24-hour HHmm
format, where 1300 = 1:00 PM
Notes
A trendline-specific ID number is returned by TL_New 886 when the trendline is created.
Example
Assign the price value, at 10:00 AM on January 17th, of a trendline with the ID number of 3, to
Value1 variable:
Value1=TL_GetValue(3,1080117,1000);
6.5.29.20 TL_GetValue_s
TL_GetValue_s
Returns a price value, at the specified date and time, of a trendline with the specified ID number;
returns a value of -2 if the specified trendline ID number is invalid.
If the trendline does not extend to the specified date and time, a price value along the same slope as
the trendline will be returned.
Usage
TL_GetValue_s (TL_ID, Date, Time_s)
Parameters
TL_ID - a numerical expression specifying the trendline ID number
Date - a numerical expression specifying the date; the date is indicated in the YYYMMdd format,
where YYY is the number of years since 1900, MM is the month, and dd is the day of the month
Time_s - a numerical expression specifying the time, including seconds; the time is indicated in
the 24-hour HHmmss format, where 130000 = 1:00:00 PM
Notes
A trendline-specific ID number is returned by TL_New_s 887 when the trendline is created.
Example
Assign the price value, at 10:00:00 AM on January 17th, of a trendline with the ID number of 3, to
Value1 variable:
Value1=TL_GetValue_s(3,1080117,100000);
6.5.29.21 TL_New
TL_New
Displays a trendline, with the specified starting and ending points, on the chart that the study is
based on; returns a trendline-specific ID number, required to modify the trendline.
Usage
TL_New (sDate, sTime, sPriceValue, eDate, eTime, ePriceValue)
Parameters
sDate - a numerical expression specifying the trendline starting point date; the date is indicated in
the YYYMMdd format, where YYY is the number of years since 1900, MM is the month, and dd is
the day of the month
sTime - a numerical expression specifying the trendline starting point time; the time is indicated in
the 24-hour HHmm format, where 1300 = 1:00 PM
sPriceValue - a numerical expression specifying the trendline starting point price value (vertical
position, corresponding to a value on the price scale of a chart)
eDate - a numerical expression specifying the trendline ending point date
eTime - a numerical expression specifying the trendline ending point time
ePriceValue - a numerical expression specifying the trendline ending point price value
Example
Display a trendline, that begins at 9:00 AM at a price value of 1381, and ends at 3:00 PM at a price
value of 1337, on January 17th, 2008, on the chart that the study is based on:
Value1=TL_New(1080117,900,1381,1080117,1500,1337);
6.5.29.22 TL_New_s
TL_New_s
Displays a trendline, with the specified starting and ending points, on the chart that the study is
based on; returns a trendline-specific ID number, required to modify the trendline.
Usage
TL_New_s (sDate, sTime_s, sPriceValue, eDate, eTime_s, ePriceValue)
Parameters
sDate - a numerical expression specifying the trendline starting point date; the date is indicated in
the YYYMMdd format, where YYY is the number of years since 1900, MM is the month, and dd is
the day of the month
sTime_s - a numerical expression specifying the trendline starting point time, including seconds;
the time is indicated in the 24-hour HHmmss format, where 130000 = 1:00:00 PM
sPriceValue - a numerical expression specifying the trendline starting point price value (vertical
position, corresponding to a value on the price scale of a chart)
eDate - a numerical expression specifying the trendline ending point date
eTime_s - a numerical expression specifying the trendline ending point time, including seconds
ePriceValue - a numerical expression specifying the trendline ending point price value
Example
Display a trendline, that begins at 9:00:00 AM at a price value of 1381, and ends at 3:00:00 PM at a
price value of 1337, on January 17th, 2008, on the chart that the study is based on:
Value1=TL_New_s(1080117,90000,1381,1080117,150000,1337);
6.5.29.23 TL_New_self
TL_New_self
Displays a trendline, with the specified starting and ending points, on the SubChart containing the
study; returns a trendline-specific ID number, required to modify the trendline.
Usage
TL_New_self (sDate, sTime, sPriceValue, eDate, eTime, ePriceValue)
Parameters
sDate - a numerical expression specifying the trendline starting point date; the date is indicated in
the YYYMMdd format, where YYY is the number of years since 1900, MM is the month, and dd is
the day of the month
sTime - a numerical expression specifying the trendline starting point time; the time is indicated in
the 24-hour HHmm format, where 1300 = 1:00 PM
sPriceValue - a numerical expression specifying the trendline starting point price value (vertical
position, corresponding to a value on the price scale of a chart)
eDate - a numerical expression specifying the trendline ending point date
eTime - a numerical expression specifying the trendline ending point time
ePriceValue - a numerical expression specifying the trendline ending point price value
Example
Display a trendline, that begins at 9:00 AM at a price value of 1381, and ends at 3:00 PM at a price
value of 1337, on January 17th, 2008, on the SubChart containing the study:
Value1=TL_New_self(1080117,900,1381,1080117,1500,1337);
6.5.29.24 TL_New_self_s
TL_New_Self_s
Displays a trendline, with the specified starting and ending points, on the SubChart containing the
study; returns a trendline-specific ID number, required to modify the trendline.
Usage
TL_New_s (sDate, sTime_s, sPriceValue, eDate, eTime_s, ePriceValue)
Parameters
sDate - a numerical expression specifying the trendline starting point date; the date is indicated in
the YYYMMdd format, where YYY is the number of years since 1900, MM is the month, and dd is
the day of the month
sTime_s - a numerical expression specifying the trendline starting point time, including seconds;
the time is indicated in the 24-hour HHmmss format, where 130000 = 1:00:00 PM
sPriceValue - a numerical expression specifying the trendline starting point price value (vertical
position, corresponding to a value on the price scale of a chart)
eDate - a numerical expression specifying the trendline ending point date
eTime_s - a numerical expression specifying the trendline ending point time, including seconds
ePriceValue - a numerical expression specifying the trendline ending point price value
Example
Display a trendline, that begins at 9:00:00 AM at a price value of 1381, and ends at 3:00:00 PM at a
price value of 1337, on January 17th, 2008, on the SubChart containing the study:
Value1=TL_New_s(1080117,90000,1381,1080117,150000,1337);
6.5.29.25 TL_SetAlert
TL_SetAlert
Sets the alert status for a trendline with the specified ID number; returns a value of 0 if alert status
was successfully modified, and a value of -2 if the specified trendline ID number is invalid.
Usage
TL_SetAlert(TL_ID,AlertStatus)
Parameters
TL_ID - a numerical expression specifying the trendline ID number
AlertStatus - a numerical expression specifying the alert status for the trendline:
0 - Alert disabled
1 - Breakout intra-bar
An alert is triggered if the High crosses over the trendline or the Low crosses under the trendline.
Alert triggering conditions are evaluated intra-bar.
2 - Breakout on close
An alert is triggered if the Close of the previous bar was below the trendline and the Close of the
current bar is above the trendline, or if the Close of the previous bar was above the trendline and
the Close of the current bar is below the trendline. Alert triggering conditions are evaluated at
Close of a bar.
Notes
A trendline-specific ID number is returned by TL_New 886 when the trendline is created.
Example
Set alert status to "Breakout on close" for a trendline with the ID number of 3:
Value1=TL_SetAlert(3,2);
6.5.29.26 TL_SetBegin
TL_SetBegin
Modifies the starting point location of a trendline with the specified ID number; returns a value of 0 if
the starting point location was successfully modified, and a value of -2 if the specified trendline ID
number is invalid.
Of the two end points of a trendline, the point with the earlier date and time is always considered to
be the starting point; if the trendline is vertical, the point with the lower price value is considered to be
the starting point.
Usage
TL_SetBegin (TL_ID, sDate, sTime, sPriceValue)
Parameters
TL_ID - a numerical expression specifying the trendline ID number
sDate - a numerical expression specifying the new starting point date; the date is indicated in the
YYYMMdd format, where YYY is the number of years since 1900, MM is the month, and dd is the
day of the month
sTime - a numerical expression specifying the new starting point time; the time is indicated in the
24-hour HHmm format, where 1300 = 1:00 PM
sPriceValue - a numerical expression specifying the new starting point price value (vertical
position, corresponding to a value on the price scale of a chart)
Notes
A trendline-specific ID number is returned by TL_New 886 when the trendline is created.
Example
Move the starting point of the trendline with an ID number of 3 to 10:00 AM on January 17th at a price
value of 1365:
Value1=TL_SetBegin(3,1080117,1000,1365);
6.5.29.27 TL_SetBegin_s
TL_SetBegin_s
Modifies the starting point location of a trendline with the specified ID number; returns a value of 0 if
the starting point location was successfully modified, and a value of -2 if the specified trendline ID
number is invalid.
Of the two end points of a trendline, the point with the earlier date and time is always considered to
be the starting point; if the trendline is vertical, the point with the lower price value is considered to be
the starting point.
Usage
TL_SetBegin_s (TL_ID, sDate, sTime_s, sPriceValue)
Parameters
TL_ID - a numerical expression specifying the trendline ID number
sDate - a numerical expression specifying the new starting point date; the date is indicated in the
YYYMMdd format, where YYY is the number of years since 1900, MM is the month, and dd is the
day of the month
sTime_s - a numerical expression specifying the new starting point time, including seconds; the
time is indicated in the 24-hour HHmmss format, where 130000 = 1:00:00 PM
sPriceValue - a numerical expression specifying the new starting point price value (vertical
position, corresponding to a value on the price scale of a chart)
Notes
A trendline-specific ID number is returned by TL_New_s 887 when the trendline is created.
Example
Move the starting point of the trendline with an ID number of 3 to 10:00:00 AM on January 17th at a
price value of 1365:
Value1=TL_SetBegin_s(3,1080117,100000,1365);
6.5.29.28 TL_SetColor
TL_SetColor
Assigns the specified color to a trendline with the specified ID number; returns a value of 0 if the
color was successfully assigned, and a value of -2 if the specified trendline ID number is invalid.
Usage
TL_SetColor(TL_ID,TL_Color)
Parameters
TL_ID - a numerical expression specifying the trendline ID number
TL_Color - an expression specifying the trendline color
Trendline color can be specified by a numerical expression representing an RGB color number or
a legacy color value, or by one of 17 base color words.
Notes
A trendline-specific ID number is returned by TL_New 886 when the trendline is created.
Example
Assign the color blue to the trendline with an ID number of 3:
Value1=TL_SetColor(3,Blue);
Assign the RGB color 2138336 (Orange) to the trendline with an ID number of 3:
Value1=TL_SetColor(3,2138336);
6.5.29.29 TL_SetEnd
TL_SetEnd
Modifies the ending point location of a trendline with the specified ID number; returns a value of 0 if
the ending point location was successfully modified, and a value of -2 if the specified trendline ID
number is invalid.
Of the two end points of a trendline, the point with the later date and time is always considered to be
the ending point; if the trendline is vertical, the point with the higher price value is considered to be
the ending point.
Usage
TL_SetEnd (TL_ID, eDate, eTime, ePriceValue)
Parameters
TL_ID - a numerical expression specifying the trendline ID number
eDate - a numerical expression specifying the new ending point date; the date is indicated in the
YYYMMdd format, where YYY is the number of years since 1900, MM is the month, and dd is the
day of the month
eTime - a numerical expression specifying the new ending point time; the time is indicated in the
24-hour HHmm format, where 1300 = 1:00 PM
ePriceValue - a numerical expression specifying the new ending point price value (vertical
position, corresponding to a value on the price scale of a chart)
Notes
A trendline-specific ID number is returned by TL_New 886 when the trendline is created.
Example
Move the ending point of the trendline with an ID number of 3 to 14:15 PM on January 17th at a price
value of 1350:
Value1=TL_SetEnd(3,1080117,1415,1350);
6.5.29.30 TL_SetEnd_s
TL_SetEnd_s
Modifies the ending point location of a trendline with the specified ID number; returns a value of 0 if
the ending point location was successfully modified, and a value of -2 if the specified trendline ID
number is invalid.
Of the two end points of a trendline, the point with the later date and time is always considered to be
the ending point; if the trendline is vertical, the point with the higher price value is considered to be
the ending point.
Usage
TL_SetEnd_s (TL_ID, eDate, eTime_s, ePriceValue)
Parameters
TL_ID - a numerical expression specifying the trendline ID number
eDate - a numerical expression specifying the new ending point date; the date is indicated in the
YYYMMdd format, where YYY is the number of years since 1900, MM is the month, and dd is the
day of the month
eTime_s - a numerical expression specifying the new ending point time, including seconds; the
time is indicated in the 24-hour HHmmss format, where 130000 = 1:00:00 PM
ePriceValue - a numerical expression specifying the new ending point price value (vertical
position, corresponding to a value on the price scale of a chart)
Notes
A trendline-specific ID number is returned by TL_New_s 887 when the trendline is created.
Example
Move the ending point of the trendline with an ID number of 3 to 14:15:00 PM on January 17th at a
price value of 1350:
Value1=TL_SetEnd_s(3,1080117,141500,1350);
6.5.29.31 TL_SetExtLeft
TL_SetExtLeft
Adds or removes a left-side extension for a trendline with the specified ID number; returns a value of
0 if the operation was performed successfully, and a value of -2 if the specified trendline ID number is
invalid.
Usage
TL_SetExtLeft(TL_ID,LogicalExpression)
Where: TL_ID - a numerical expression specifying the trendline ID number
LogicalExpression - a logical value; True = Add and False = Remove
Notes
A trendline-specific ID number is returned by TL_New 886 when the trendline is created.
Example
Add a left-side extension to the trendline with an ID number of 3:
Value1=TL_SetExtLeft(3,True);
6.5.29.32 TL_SetExtRight
TL_SetExtRight
Adds or removes a right-side extension for a trendline with the specified ID number; returns a value
of 0 if the operation was performed successfully, and a value of -2 if the specified trendline ID
number is invalid.
Usage
TL_SetExtRight(TL_ID,LogicalExpression)
Where: TL_ID - a numerical expression specifying the trendline ID number
LogicalExpression - a logical value; True = Add and False = Remove
Notes
A trendline-specific ID number is returned by TL_New 886 when the trendline is created.
Example
Add a right-side extension to the trendline with an ID number of 3:
Value1=TL_SetExtRight(3,True);
6.5.29.33 TL_SetSize
TL_SetSize
Assigns the specified width to a trendline with the specified ID number; returns a value of 0 if the line
width was successfully assigned, and a value of -2 if the specified trendline ID number is invalid.
Usage
TL_SetSize(TL_ID,LineWidth)
Where: TL_ID - a numerical expression specifying the trendline ID number
LineWidth - a numerical expression specifying the trendline width; trendline width can
range from 0 to 6
Notes
A trendline-specific ID number is returned by TL_New 886 when the trendline is created.
Example
Assign the width of 5 to the trendline with an ID number of 3:
Value1=TL_SetSize(3,5);
6.5.29.34 TL_SetStyle
TL_SetStyle
Assigns the specified style to a trendline with the specified ID number; returns a value of 0 if the
trendline style was successfully assigned, and a value of -2 if the specified trendline ID number is
invalid.
Usage
TL_SetStyle(TL_ID,TL_Style)
Parameters
TL_ID - a numerical expression specifying the trendline ID number
TL_Style - a TL style constant or a numerical expression specifying the trendline style as
follows:
Tool_ 1 ______
Solid ______
______
____
Tool_ 2 -----
Dashe -----
d -----
----
Tool_ 3 ...........
Dotte ...........
d ...........
...........
Tool_ 4 __ _ __
Dashe _ __ _
d2 __ _ __
_ __
Tool_ 5 ___ _ _
Dashe ___ _ _
d3 ___ _ _
___
Notes
A trendline-specific ID number is returned by TL_New 886 when the trendline is created.
Example
Set the style of the trendline with an ID number of 3 to Tool Dashed:
Value1=TL_SetStyle(3, 2);
6.5.29.35 Tool_Dashed
Tool_Dashed
Constant, used in combination with TL_SetStyle 899 to designate the Tool Dashed style; can be
substituted by a numerical value of 2.
Usage
TL_SetStyle(TL_ID, Tool_Dashed)
or:
TL_SetStyle(TL_ID, 2)
Example
Set the style of the trendline with an ID number of 3 to Tool Dashed:
Value1=TL_SetStyle(3, 2);
6.5.29.36 Tool_Dashed2
Tool_Dashed2
Constant, used in combination with TL_SetStyle 899 to designate the Tool Dashed2 style; can be
substituted by a numerical value of 4.
Usage
TL_SetStyle(TL_ID, Tool_Dashed2)
or:
TL_SetStyle(TL_ID, 4)
Example
Set the style of the trendline with an ID number of 3 to Tool Dashed2:
Value1=TL_SetStyle(3, 4);
6.5.29.37 Tool_Dashed3
Tool_Dashed3
Constant, used in combination with TL_SetStyle 899 to designate the Tool Dashed3 style; can be
substituted by a numerical value of 5.
Usage
TL_SetStyle(TL_ID, Tool_Dashed3)
or:
TL_SetStyle(TL_ID, 5)
Example
Set the style of the trendline with an ID number of 3 to Tool Dashed3:
Value1=TL_SetStyle(3, 5);
6.5.29.38 Tool_Dotted
Tool_Dotted
Constant, used in combination with TL_SetStyle 899 to designate the Tool Dotted style; can be
substituted by a numerical value of 3.
Usage
TL_SetStyle(TL_ID, Tool_Dotted)
or:
TL_SetStyle(TL_ID, 3)
Example
Set the style of the trendline with an ID number of 3 to Tool Dotted:
Value1=TL_SetStyle(3, 3);
6.5.29.39 Tool_Solid
Tool_Solid
Constant, used in combination with TL_SetStyle 899 to designate the Tool Solid style; can be
substituted by a numerical value of 1.
Usage
TL_SetStyle(TL_ID, Tool_Solid)
or:
TL_SetStyle(TL_ID, 1)
Example
Set the style of the trendline with an ID number of 3 to Tool Solid:
Value1=TL_SetStyle(3, 1);