Merge pull request #657 from Luis-Fernando-Molina/develop
Contribution: Docs update on how stages are closed.
This commit is contained in:
1 file changed
+2
-7
+2
-7
@@ -58,11 +58,6 @@
|
||||
"text": "ABSOLUTE_DUST_IN_QUOTED_ASSET: is a numeric value that represents the distance that you allow to be between the Size Filled and the Target Side for a stage, measured in Base Asset. It's default value is Zero and you can define it at the config of a Stage node using the absoluteDustInQuotedAsset property.",
|
||||
"updated": 1615054151393
|
||||
},
|
||||
{
|
||||
"style": "Note",
|
||||
"text": "The parameter that will actually be used from the two previous ones will depend on how you dedined your Target Size, either in Base Asset or Quoted Asset.",
|
||||
"updated": 1615054261790
|
||||
},
|
||||
{
|
||||
"style": "Subtitle",
|
||||
"text": "Implementation",
|
||||
@@ -74,8 +69,8 @@
|
||||
},
|
||||
{
|
||||
"style": "Javascript",
|
||||
"text": "switch (tradingEngineStage.stageDefinedIn.value) {\n case 'Base Asset': {\n if (\n tradingEngineStage.stageBaseAsset.sizeFilled.value\n * \n ROUNDING_ERROR_CORRECTION_FACTOR\n +\n ABSOLUTE_DUST_IN_BASE_ASSET\n >=\n tradingEngineStage.stageBaseAsset.targetSize.value\n ) {\n positionFilled()\n } else {\n checkCloseStageEvent(tradingSystemStage)\n }\n break\n }\n case 'Quoted Asset': {\n if (\n tradingEngineStage.stageQuotedAsset.sizeFilled.value\n * \n ROUNDING_ERROR_CORRECTION_FACTOR\n +\n ABSOLUTE_DUST_IN_QUOTED_ASSET\n >=\n tradingEngineStage.stageQuotedAsset.targetSize.value\n ) {\n positionFilled()\n } else {\n checkCloseStageEvent(tradingSystemStage)\n }\n break\n }\n }",
|
||||
"updated": 1615054391439
|
||||
"text": " if (\n tradingEngineStage.stageBaseAsset.sizeFilled.value\n *\n ROUNDING_ERROR_CORRECTION_FACTOR\n +\n ABSOLUTE_DUST_IN_BASE_ASSET\n >=\n tradingEngineStage.stageBaseAsset.targetSize.value\n ) {\n positionFilled()\n } else if (\n tradingEngineStage.stageQuotedAsset.sizeFilled.value\n *\n ROUNDING_ERROR_CORRECTION_FACTOR\n +\n ABSOLUTE_DUST_IN_QUOTED_ASSET\n >=\n tradingEngineStage.stageQuotedAsset.targetSize.value\n ) {\n positionFilled()\n } else {\n checkCloseStageEvent(tradingSystemStage)\n }",
|
||||
"updated": 1615296774086
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user