From 5c4783dfd939f449055a0353db8e161160c9450b Mon Sep 17 00:00:00 2001 From: Alexandre Catarino Date: Thu, 7 Mar 2024 23:29:03 +0000 Subject: [PATCH] Fixes Broken PHP --- .../07 Research/01 Getting Started/07 Rename Notebooks.php | 1 + .../99 Version Control/03 Push Changes to Git.php | 4 ++-- .../11 Research/01 Getting Started/07 Rename Notebooks.php | 1 + .../05 Consolidate Quote Ticks.php | 1 + .../07 Interactive Brokers/08 Settlement.php | 3 ++- .../01 Getting Started/07 Rename Notebooks.php | 1 + .../03 Datasets/08 Equity Options/04 Get Historical Data.php | 5 ++--- .../03 Datasets/12 Futures/04 Get Historical Data.php | 5 ++--- .../03 Datasets/12 Futures/07 Data Normalization.php | 2 +- .../14 Futures Options/04 Get Historical Data.php | 2 +- .../03 Datasets/22 Index Options/04 Get Historical Data.php | 3 ++- Resources/cli/version-control/push-changes-to-git.php | 2 +- Resources/initialization/set-time-zone.php | 2 +- Resources/projects/ide/keyboard-shortcuts.php | 2 +- Resources/projects/structure/parameters.php | 2 +- Resources/securities/data-normalization.php | 2 +- code-generators/SinglePageDocGenerator.py | 4 +++- 17 files changed, 24 insertions(+), 18 deletions(-) diff --git a/01 Cloud Platform/07 Research/01 Getting Started/07 Rename Notebooks.php b/01 Cloud Platform/07 Research/01 Getting Started/07 Rename Notebooks.php index aaba1a4114..7b21fbe523 100644 --- a/01 Cloud Platform/07 Research/01 Getting Started/07 Rename Notebooks.php +++ b/01 Cloud Platform/07 Research/01 Getting Started/07 Rename Notebooks.php @@ -1,5 +1,6 @@ diff --git a/02 Local Platform/08 Projects/99 Version Control/03 Push Changes to Git.php b/02 Local Platform/08 Projects/99 Version Control/03 Push Changes to Git.php index 79a91bd4cf..27289a4dde 100644 --- a/02 Local Platform/08 Projects/99 Version Control/03 Push Changes to Git.php +++ b/02 Local Platform/08 Projects/99 Version Control/03 Push Changes to Git.php @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/03 Writing Algorithms/18 Consolidating Data/02 Consolidator Types/01 Time Period Consolidators/05 Consolidate Quote Ticks.php b/03 Writing Algorithms/18 Consolidating Data/02 Consolidator Types/01 Time Period Consolidators/05 Consolidate Quote Ticks.php index deb4308dfb..9066425cc2 100644 --- a/03 Writing Algorithms/18 Consolidating Data/02 Consolidator Types/01 Time Period Consolidators/05 Consolidate Quote Ticks.php +++ b/03 Writing Algorithms/18 Consolidating Data/02 Consolidator Types/01 Time Period Consolidators/05 Consolidate Quote Ticks.php @@ -9,6 +9,7 @@ $typeOf = "Tick"; $createConsolidatorExtraArgs = ", TickType.Quote"; $resolveConsolidatorExtraArgsC = ", typeof(QuoteBar)"; +$resolveConsolidatorExtraArgsPy = ""; $resolutionArgExtraExamplesC = ""; $resolutionArgExtraExamplesPy = ""; $consolidationHandlerType = "QuoteBar"; diff --git a/03 Writing Algorithms/24 Reality Modeling/05 Brokerages/02 Supported Models/07 Interactive Brokers/08 Settlement.php b/03 Writing Algorithms/24 Reality Modeling/05 Brokerages/02 Supported Models/07 Interactive Brokers/08 Settlement.php index aed6527f07..7146f84c9d 100644 --- a/03 Writing Algorithms/24 Reality Modeling/05 Brokerages/02 Supported Models/07 Interactive Brokers/08 Settlement.php +++ b/03 Writing Algorithms/24 Reality Modeling/05 Brokerages/02 Supported Models/07 Interactive Brokers/08 Settlement.php @@ -3,8 +3,9 @@

The following table shows which settlement model the InteractiveBrokersBrokerageModel uses based on the security type and your account type:

- diff --git a/04 Research Environment/01 Key Concepts/01 Getting Started/07 Rename Notebooks.php b/04 Research Environment/01 Key Concepts/01 Getting Started/07 Rename Notebooks.php index aaba1a4114..7b21fbe523 100644 --- a/04 Research Environment/01 Key Concepts/01 Getting Started/07 Rename Notebooks.php +++ b/04 Research Environment/01 Key Concepts/01 Getting Started/07 Rename Notebooks.php @@ -1,5 +1,6 @@ diff --git a/04 Research Environment/03 Datasets/08 Equity Options/04 Get Historical Data.php b/04 Research Environment/03 Datasets/08 Equity Options/04 Get Historical Data.php index 36318b73d5..aad9c76253 100644 --- a/04 Research Environment/03 Datasets/08 Equity Options/04 Get Historical Data.php +++ b/04 Research Environment/03 Datasets/08 Equity Options/04 Get Historical Data.php @@ -4,10 +4,9 @@ $underlyingSymbolVariablePy = "equity_symbol"; $underlyingSymbolVariableC = "equitySymbol"; -$contractVariableC = "contractSymbol"; -$contractVariablePy = "contract_symbol"; - $underlyingAssetClass = "Equity"; $supportsTicks = false; +$contractVariableC = "contractSymbol"; +$contractVariablePy = "contract_symbol"; include(DOCS_RESOURCES."/datasets/research-environment/get-historical-data.php"); ?> diff --git a/04 Research Environment/03 Datasets/12 Futures/04 Get Historical Data.php b/04 Research Environment/03 Datasets/12 Futures/04 Get Historical Data.php index 120a7c0e2d..6194089d55 100644 --- a/04 Research Environment/03 Datasets/12 Futures/04 Get Historical Data.php +++ b/04 Research Environment/03 Datasets/12 Futures/04 Get Historical Data.php @@ -4,10 +4,9 @@ $underlyingSymbolVariablePy = "future.Symbol"; $underlyingSymbolVariableC = "future.Symbol"; -$contractVariableC = "contractSymbol"; -$contractVariablePy = "contract_symbol"; - $underlyingAssetClass = ""; $supportsTicks = true; +$contractVariableC = "contractSymbol"; +$contractVariablePy = "contract_symbol"; include(DOCS_RESOURCES."/datasets/research-environment/get-historical-data.php"); ?> diff --git a/04 Research Environment/03 Datasets/12 Futures/07 Data Normalization.php b/04 Research Environment/03 Datasets/12 Futures/07 Data Normalization.php index f62a849388..35dc6e4718 100644 --- a/04 Research Environment/03 Datasets/12 Futures/07 Data Normalization.php +++ b/04 Research Environment/03 Datasets/12 Futures/07 Data Normalization.php @@ -1,4 +1,4 @@ - +

The following data normalization modes are available for continuous Futures contracts:

diff --git a/04 Research Environment/03 Datasets/14 Futures Options/04 Get Historical Data.php b/04 Research Environment/03 Datasets/14 Futures Options/04 Get Historical Data.php index 2ba55752ff..2bd544bb9b 100644 --- a/04 Research Environment/03 Datasets/14 Futures Options/04 Get Historical Data.php +++ b/04 Research Environment/03 Datasets/14 Futures Options/04 Get Historical Data.php @@ -6,7 +6,7 @@ $underlyingAssetClass = "Futures contract"; $supportsTicks = false; -$contractVariablePy ="fop_contract_symbol"; $contractVariableC ="fopContractSymbol"; +$contractVariablePy ="fop_contract_symbol"; include(DOCS_RESOURCES."/datasets/research-environment/get-historical-data.php"); ?> diff --git a/04 Research Environment/03 Datasets/22 Index Options/04 Get Historical Data.php b/04 Research Environment/03 Datasets/22 Index Options/04 Get Historical Data.php index cafc856dfb..8950a96fde 100644 --- a/04 Research Environment/03 Datasets/22 Index Options/04 Get Historical Data.php +++ b/04 Research Environment/03 Datasets/22 Index Options/04 Get Historical Data.php @@ -5,7 +5,8 @@ $underlyingSymbolVariableC = "option.Symbol"; $underlyingAssetClass = "Index"; -$contractVariablePy = "\"SPX\""; +$supportsTicks = false; $contractVariableC = "\"SPX\""; +$contractVariablePy = "\"SPX\""; include(DOCS_RESOURCES."/datasets/research-environment/get-historical-data.php"); ?> diff --git a/Resources/cli/version-control/push-changes-to-git.php b/Resources/cli/version-control/push-changes-to-git.php index 99696fb1bf..e7d8e25802 100644 --- a/Resources/cli/version-control/push-changes-to-git.php +++ b/Resources/cli/version-control/push-changes-to-git.php @@ -6,7 +6,7 @@
$ lean cloud pull
-
  • AOpen a terminal in your organization workspace and then add the project directories and the Library.
  • +
  • AOpen a terminal in your organization workspace and then add the project directories and the Library.
  • $ git add Library/
     $ git add <projectDirectory1>/
    diff --git a/Resources/initialization/set-time-zone.php b/Resources/initialization/set-time-zone.php
    index 923b4ef1e0..efb7f38d77 100644
    --- a/Resources/initialization/set-time-zone.php
    +++ b/Resources/initialization/set-time-zone.php
    @@ -5,7 +5,7 @@
     
    -
    SetTimeZone("Europe/London");
    +
    SetTimeZone("Europe/London");
     SetTimeZone(NodaTime.DateTimeZone.Utc);
     SetTimeZone(TimeZones.Chicago);
     
    diff --git a/Resources/projects/ide/keyboard-shortcuts.php b/Resources/projects/ide/keyboard-shortcuts.php index ac7d620e93..37c9acf106 100644 --- a/Resources/projects/ide/keyboard-shortcuts.php +++ b/Resources/projects/ide/keyboard-shortcuts.php @@ -3,7 +3,7 @@

    Follow these steps to view the keyboard shortcuts of your account:

      -
    1. Open a project.
    2. +
    3. Open a project.
    4. Press F1.
    5. Enter "Preferences: Open Keyboard Shortcuts".
    6. Click Preferences: Open Keyboard Shortcuts.
    7. diff --git a/Resources/projects/structure/parameters.php b/Resources/projects/structure/parameters.php index eae7c340f6..81b6146a3d 100644 --- a/Resources/projects/structure/parameters.php +++ b/Resources/projects/structure/parameters.php @@ -1 +1 @@ -

      Algorithm parameters are hard-coded values for variables in your project that are set outside of the code files. Add parameters to your projects to remove hard-coded values from your code files and to perform parameter optimizations. To get the parameter values into your algorithm, see Get Parameters. The parameter values are sent to your algorithm when you deploy the algorithm, so it's not possible to change the parameter values while the algorithm runs.

      +

      Algorithm parameters are hard-coded values for variables in your project that are set outside of the code files. Add parameters to your projects to remove hard-coded values from your code files and to perform parameter optimizations. To get the parameter values into your algorithm, see Get Parameters. The parameter values are sent to your algorithm when you deploy the algorithm, so it's not possible to change the parameter values while the algorithm runs.

      diff --git a/Resources/securities/data-normalization.php b/Resources/securities/data-normalization.php index a99078cfee..10614fcf49 100644 --- a/Resources/securities/data-normalization.php +++ b/Resources/securities/data-normalization.php @@ -1,4 +1,4 @@ -

      The data normalization mode defines how historical data is adjusted for corporate actions. The data normalization mode affects the data that LEAN passes to OnData and the data from history requests. By default, LEAN adjusts US Equity data for splits and dividends to produce a smooth price curve, but the following data normalization modes are available:

      +

      The data normalization mode defines how historical data is adjusted for corporate actions. The data normalization mode affects the data that LEAN passes to OnData and the data from history requests. By default, LEAN adjusts US Equity data for splits and dividends to produce a smooth price curve, but the following data normalization modes are available:

      diff --git a/code-generators/SinglePageDocGenerator.py b/code-generators/SinglePageDocGenerator.py index 611c01eedb..140fbecc19 100644 --- a/code-generators/SinglePageDocGenerator.py +++ b/code-generators/SinglePageDocGenerator.py @@ -254,7 +254,9 @@ def ExtractImage(content: str) -> dict: images = soup.findAll('img') for image in images: - url = image["src"] + url = image["src"].strip() + if not url: + continue path = f'{IMAGE_DIR}/{url.split("/")[-1].split("?")[0]}' try: if url and not os.path.exists(path):