Demo Mode implemented at the UI
This commit is contained in:
1 parent
216dbbc7d2
commit
40772b09af
4 files changed
+42
-1
No files matched your search
@@ -42,6 +42,13 @@ function newAlgorithmicTradingFunctionLibraryTradingSessionFunctions() {
|
||||
}
|
||||
|
||||
function runSession(node, resume, callBackFunction) {
|
||||
|
||||
if (UI.environment.DEMO_MODE === true) {
|
||||
node.payload.uiObject.setWarningMessage('Superalgos is running is DEMO MODE. This means that you can not RUN Sessions.', 5)
|
||||
callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE)
|
||||
return
|
||||
}
|
||||
|
||||
let validationsResult = validations(node)
|
||||
if (validationsResult === undefined) {
|
||||
/* If something fails at validations we just quit. */
|
||||
@@ -195,6 +202,13 @@ function newAlgorithmicTradingFunctionLibraryTradingSessionFunctions() {
|
||||
}
|
||||
|
||||
function stopSession(node, callBackFunction) {
|
||||
|
||||
if (UI.environment.DEMO_MODE === true) {
|
||||
node.payload.uiObject.setWarningMessage('Superalgos is running is DEMO MODE. This means that you can not STOP Sessions.', 5)
|
||||
callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE)
|
||||
return
|
||||
}
|
||||
|
||||
let validationsResult = validations(node)
|
||||
if (validationsResult === undefined) {
|
||||
/* If something fails at validations we just quit. */
|
||||
|
||||
Reference in new issue
Block a user