mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-30 05:52:23 +00:00
adds images and embeds demonstartion routine file.
This commit is contained in:
@@ -31,13 +31,13 @@ With the macro recorder, it is easy to get started; just enter `record`. To foll
|
||||
record/stocks/load qqq/forecast/expo QQQ/autoselect QQQ/stop
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
The routine has been successfully captured, and the next time the Terminal is opened, this routine will be visible when calling the `exe` function.
|
||||
|
||||

|
||||

|
||||
|
||||
## Editing & Inserting Arguments
|
||||
|
||||
@@ -75,7 +75,7 @@ Open the file with a text editor, make the changes, save the file, and then run
|
||||
exe demo_routine.openbb --input SPY
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
Additional variables can be assigned to perform other functions, a date for example. Let's modify the routine file to include a start date as part of the `load` function. For those following along at home, modify the second command in the script to be:
|
||||
|
||||
@@ -89,13 +89,13 @@ The additional argument is added to the previous `exe` syntax as a comma-separat
|
||||
exe demo_routine.openbb --input SPY,2022-01-01
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
This process is limited only to the imagination. Large, reptitive, tasks can be automated by extrapolating on the process above.
|
||||
|
||||
## Commenting
|
||||
|
||||
Commenting within an OpenBB routine file provides the creator to communicate with the end-user. Commented lines - beginning with, "#" - are passed over during execution of the routine. Let's update the example routine file with a few commments to illustrate.
|
||||
Commenting within an OpenBB routine file is how the author of a script can communicate to the end-user. Commented lines - beginning with, "#" - are passed over during execution of the routine. Let's update the example routine file with a few commments to illustrate.
|
||||
|
||||
```console
|
||||
# This routine is a demonstration of the OpenBB routine files.
|
||||
@@ -113,5 +113,7 @@ expo $ARGV[0]
|
||||
autoselect $ARGV[0]
|
||||
|
||||
# End of routine
|
||||
# Please note that the outputs of this routine will be different than depicted, because, you are now in the future.
|
||||
# Please note that the outputs of this routine will be different than the depictions above, because, you are now in the future.
|
||||
```
|
||||
|
||||
For convenience, the routine file constructed in the example above can be downloaded directly [here](https://github.com/OpenBB-finance/OpenBBTerminal/files/10763257/demo_routine.openbb.zip).
|
||||
|
||||
Reference in New Issue
Block a user