ProRealCode Studio is on its way. As soon as it is published, this button will take you straight to its Chrome Web Store page.
ProRealCode Studio comes with ready-made examples. Here you open the first one, run it on your chart, save it under your own name and find it again. No code to write.
1
2
3
4
1
2
input(), one of Studio's additions. A code without additions runs on ProRealTime too (chapter 00).19input(period, 20, "MA period", int)20input(source, 0, "0 = close, 1 = typical price", int)28ma = ExponentialAverage[period](src)32band = ma + Average[period](abs(close - ma))36RETURN ma AS "EMA" COLOURED(90, 170, 255) STYLE(line, 2), band AS "Envelope" COLOURED(90, 170, 255, 120) STYLE(dottedline2, 1)
Lines 19 and 20 declare two settings. The period starts at 20; you can change it later without touching the code (chapter 08).
Lines 28 and 32 compute the two curves: an exponential average, and the same average lifted by its usual distance to the price.
Line 36 draws them, with a name, a colour and a style each. It is one long line, wrapped here to fit the page.
Both curves move with the price, so Studio draws them over the candles. A code whose values sit far from the price, an oscillator for instance, gets its own panel under the chart instead (chapter 12).
COLOURED(90, 170, 255) with COLOURED(255, 140, 0).The button now reads “Run ●”: the editor holds a change the chart has not seen yet.
| Chip | What it means |
|---|---|
| unsaved | The editor holds changes that are not saved yet. Ctrl + S saves them. |
| saved | Saved in this browser. There is no account to sync it to: connect one to find your codes on another computer (chapter 05). |
| to sync | Saved in this browser, and waiting to reach your prorealcode.com account. |
| synced | Saved, and in sync with your account. |
1
2
3
4
5
You opened a read-only example, ran it, watched it draw on the chart and saved a copy under your own name. That copy is in “My codes”, ready to reopen or to put on the chart again.
The other examples work the same way. The one below, from the same folder, draws a shaded ribbon and a table in the corner of the chart.
| In the editor | Does |
|---|---|
| Ctrl + Enter | Run |
| Ctrl + S | Save |
The tab was already linked to a saved code, so Studio wrote over it. That is the case after a first save, or when one of your codes already has that name.
No. Examples are read-only. Your changes live in your tab, and “Save” stores them under your own name.
In this browser. The chip reads “saved”. Connect a prorealcode.com account to sync your codes (chapter 05).
Yes. Each click on the chart icon in “My codes” adds one more copy, each with its own settings (chapter 08).
Chapter 03 · A tour of the interface