From ec50bb61e4cded79dc466cace063ae788774bdd0 Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Fri, 5 Jul 2019 17:45:08 +0200 Subject: [PATCH 1/7] Update README.md --- README.md | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) diff --git a/README.md b/README.md index 789f59b54..6abea78d9 100644 --- a/README.md +++ b/README.md @@ -156,3 +156,118 @@ Notice the red horizontal bars indicating the _stop_ value for each period (cand ![Trading-Simulation-Trades](https://user-images.githubusercontent.com/13994516/58574801-1a76f700-8241-11e9-9144-0db81636dace.gif)

+ +## Strategy Designer + +The Strategy Designer organizes strategies following the framework established by the _Superalgos Protocol_. If you are not familiar with the protocol, please read either of the following articles: + +* Superalgos Protocol V0.1 - the Short Version, for Experienced Traders. + +* Superalgos Protocol V0.1 - the Long Version, for Beginner Traders. + +The Strategy Designer provides a Graphic User Interface for traders to input the rules and _formulas_ that determine the behaviour of the strategy. Overall, traders need to define the rules to _trigger on_ and _trigger off_ the strategy, to _take a position_, to manage _take profit_ targets and _stop loss_. + +The protocol calls any set of rules a _situation_, in the sense that you are trying to determine what is going on with the market and if the 'situation' is right, certain _actions_ or _events_ should be triggered. + +In other words, you define _situations_ in which you wish a certain _event_ to happen (i.e.: trigger on the strategy, take a position, etc.) and each situation is described as a set of _conditions_ that need to be met in order for the _event_ to be triggered. + +When all _conditions_ within a _situation_ evaluate _true_, then the _situation_ evaluates _true_. + +Events may be triggered in different situations, meaning that you are free to define different _situations_ upon which the event would be triggered. In such case, when any of the _situations_ evaluate _true_, then the event shall be triggered. + +In order to define _conditions_ you will create _statements_ using any of the available _variables_ that describe what is happening with the market. Remember, _conditions_ need to evaluate either _true_ or _false_. + +**For example:** + +Situation 1 + + Condition A: candle.close > bollingerBand.MovingAverage + Condition B: candle.previous.max > bollingerBand.MovingAverage + +In the example above, conditions A and B are mathematical comparison statements that may evaluate either _true_ or _false_. In the case both would evaluate _true_ then Situation 1 would be true. + +### Available Variables + +#### Candles + +**candle.min:** +**candle.max:** +**candle.open:** +**candle.close:** +**candle.begin:** +**candle.end:** +**candle.direction (Down | Up | Side):** +**candle.previous:** + +Bollinger Band + +**bollingerBand.begin:** +**bollingerBand.end:** +**bollingerBand.movingAverage:** +**bollingerBand.standardDeviation:** +**bollingerBand.deviation:** +**bollingerBand.direction (Down | Up | Side):** +**bollingerBand.previous:** + +Percentage Bandwidth + +**percentageBandwidth.begin:** +**percentageBandwidth.end:** +**percentageBandwidth.value:** +**percentageBandwidth.movingAverage:** +**percentageBandwidth.bandwith:** +**percentageBandwidth.direction (Down | Up | Side):** +**percentageBandwidth.previous:** + +Bollinger Channels + +**bollingerChannel.begin:** +**bollingerChannel.end:** +**bollingerChannel.direction (Down | Up | Side):** +**bollingerChannel.period:** +**bollingerChannel.firstMovingAverage:** +**bollingerChannel.lastMovingAverage:** +**bollingerChannel.firstDeviation:** +**bollingerChannel.lastDeviation:** +**bollingerChannel.previous:** + +Bollinger SubChannels + +**bollingerSubChannel.begin:** +**bollingerSubChannel.end:** +**bollingerSubChannel.direction (Down | Up | Side):** +**bollingerSubChannel.slope (Steep | Medium | Gentle | Side):** +**bollingerSubChannel.period:** +**bollingerSubChannel.firstMovingAverage:** +**bollingerSubChannel.lastMovingAverage:** +**bollingerSubChannel.firstDeviation:** +**bollingerSubChannel.lastDeviation:** +**bollingerSubChannel.previous:** + +Internal + +**strategyStage (No Stage | Trigger Stage | Open Stage | Manage Stage | Close Stage):** + +**stopLoss:** +**stopLossPhase (0 | 1 | ...):** + +**takeProfit:** +**takeProfitPhase:** + +**positionRate:** +**positionSize:** +**positionInstant:** + +**balanceAssetA:** +**balanceAssetB:** + +**lastTradeProfitLoss:** +**lastTradeROI:** + +**profit:** +**roundtrips:** +**fails:** +**hits:** +**periods:** + + From 2597f591041725911da208cc68185122d26f2ee5 Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Fri, 5 Jul 2019 18:05:39 +0200 Subject: [PATCH 2/7] Update README.md --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 6abea78d9..559260e47 100644 --- a/README.md +++ b/README.md @@ -190,14 +190,14 @@ In the example above, conditions A and B are mathematical comparison statements #### Candles -**candle.min:** -**candle.max:** -**candle.open:** -**candle.close:** -**candle.begin:** -**candle.end:** -**candle.direction (Down | Up | Side):** -**candle.previous:** +**candle.min:** The minimum value of the current candle. +**candle.max:** The maximum value of the current candle. +**candle.open:** The value at which the current candle opened. +**candle.close:** The latest value of the current candle. +**candle.begin:** Datetime in which the current period started (UNIX Epoch time). +**candle.end:** Datetime in which the current period ends (UNIX Epoch time). +**candle.direction:** Down: candle.close > candle.open | Up: candle.close < candle.open | Side: candle.close = candle.open +**candle.previous:** Refers to the previous candle Bollinger Band From cdd4fc5c74ed56a200ed300b5a678381afa5ad9f Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Fri, 5 Jul 2019 18:07:02 +0200 Subject: [PATCH 3/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 559260e47..88412392c 100644 --- a/README.md +++ b/README.md @@ -199,7 +199,7 @@ In the example above, conditions A and B are mathematical comparison statements **candle.direction:** Down: candle.close > candle.open | Up: candle.close < candle.open | Side: candle.close = candle.open **candle.previous:** Refers to the previous candle -Bollinger Band +Bollinger Band **bollingerBand.begin:** **bollingerBand.end:** From 7971e6d9574a448e4b48a4def148670b3a2e7a17 Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Fri, 5 Jul 2019 18:09:13 +0200 Subject: [PATCH 4/7] Update README.md --- README.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/README.md b/README.md index 88412392c..b3df1b779 100644 --- a/README.md +++ b/README.md @@ -191,57 +191,93 @@ In the example above, conditions A and B are mathematical comparison statements #### Candles **candle.min:** The minimum value of the current candle. + **candle.max:** The maximum value of the current candle. + **candle.open:** The value at which the current candle opened. + **candle.close:** The latest value of the current candle. + **candle.begin:** Datetime in which the current period started (UNIX Epoch time). + **candle.end:** Datetime in which the current period ends (UNIX Epoch time). + **candle.direction:** Down: candle.close > candle.open | Up: candle.close < candle.open | Side: candle.close = candle.open + **candle.previous:** Refers to the previous candle Bollinger Band **bollingerBand.begin:** + **bollingerBand.end:** + **bollingerBand.movingAverage:** + **bollingerBand.standardDeviation:** + **bollingerBand.deviation:** + **bollingerBand.direction (Down | Up | Side):** + **bollingerBand.previous:** Percentage Bandwidth **percentageBandwidth.begin:** + **percentageBandwidth.end:** + **percentageBandwidth.value:** + **percentageBandwidth.movingAverage:** + **percentageBandwidth.bandwith:** + **percentageBandwidth.direction (Down | Up | Side):** + **percentageBandwidth.previous:** Bollinger Channels **bollingerChannel.begin:** + **bollingerChannel.end:** + **bollingerChannel.direction (Down | Up | Side):** + **bollingerChannel.period:** + **bollingerChannel.firstMovingAverage:** + **bollingerChannel.lastMovingAverage:** + **bollingerChannel.firstDeviation:** + **bollingerChannel.lastDeviation:** + **bollingerChannel.previous:** Bollinger SubChannels **bollingerSubChannel.begin:** + **bollingerSubChannel.end:** + **bollingerSubChannel.direction (Down | Up | Side):** + **bollingerSubChannel.slope (Steep | Medium | Gentle | Side):** + **bollingerSubChannel.period:** + **bollingerSubChannel.firstMovingAverage:** + **bollingerSubChannel.lastMovingAverage:** + **bollingerSubChannel.firstDeviation:** + **bollingerSubChannel.lastDeviation:** + **bollingerSubChannel.previous:** Internal @@ -249,25 +285,35 @@ Internal **strategyStage (No Stage | Trigger Stage | Open Stage | Manage Stage | Close Stage):** **stopLoss:** + **stopLossPhase (0 | 1 | ...):** **takeProfit:** + **takeProfitPhase:** **positionRate:** + **positionSize:** + **positionInstant:** **balanceAssetA:** + **balanceAssetB:** **lastTradeProfitLoss:** + **lastTradeROI:** **profit:** + **roundtrips:** + **fails:** + **hits:** + **periods:** From 6c93b5cc1dc454ac58e76d53c58f93fe847f4127 Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Fri, 5 Jul 2019 18:37:46 +0200 Subject: [PATCH 5/7] Update README.md --- README.md | 52 ++++++++++++++++++++-------------------------------- 1 file changed, 20 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index b3df1b779..59faac4a9 100644 --- a/README.md +++ b/README.md @@ -161,28 +161,28 @@ Notice the red horizontal bars indicating the _stop_ value for each period (cand The Strategy Designer organizes strategies following the framework established by the _Superalgos Protocol_. If you are not familiar with the protocol, please read either of the following articles: -* Superalgos Protocol V0.1 - the Short Version, for Experienced Traders. +* Superalgos Protocol V0.1 - the Short Version, for Experienced Traders (link pending). -* Superalgos Protocol V0.1 - the Long Version, for Beginner Traders. +* Superalgos Protocol V0.1 - the Long Version, for Beginner Traders (link pending). -The Strategy Designer provides a Graphic User Interface for traders to input the rules and _formulas_ that determine the behaviour of the strategy. Overall, traders need to define the rules to _trigger on_ and _trigger off_ the strategy, to _take a position_, to manage _take profit_ targets and _stop loss_. +The Strategy Designer provides a Graphic User Interface for traders to input the rules and _formulas_ that determine the behaviour of the strategy. Traders need to define the rules to _trigger on_ and _trigger off_ the strategy, to _take a position_, to manage _take profit_ targets and _stop loss_. -The protocol calls any set of rules a _situation_, in the sense that you are trying to determine what is going on with the market and if the 'situation' is right, certain _actions_ or _events_ should be triggered. +The protocol calls these sets of rules _situations_, in the sense that you are trying to determine what is going on with the market and, if the 'situation' is right, certain _actions_ or _events_ should be triggered. In other words, you define _situations_ in which you wish a certain _event_ to happen (i.e.: trigger on the strategy, take a position, etc.) and each situation is described as a set of _conditions_ that need to be met in order for the _event_ to be triggered. -When all _conditions_ within a _situation_ evaluate _true_, then the _situation_ evaluates _true_. +When **all** _conditions_ within a _situation_ evaluate _true_, then the _situation_ evaluates _true_. -Events may be triggered in different situations, meaning that you are free to define different _situations_ upon which the event would be triggered. In such case, when any of the _situations_ evaluate _true_, then the event shall be triggered. +Events may be triggered in different situations, meaning that you are free to define different _situations_ upon which the event would be triggered. In such case, when **any** of the _situations_ evaluate _true_, then the event shall be triggered. -In order to define _conditions_ you will create _statements_ using any of the available _variables_ that describe what is happening with the market. Remember, _conditions_ need to evaluate either _true_ or _false_. +In order to define _conditions_ you will use _statements_ using any of the available _variables_ that describe what is happening with the market. Remember, _conditions_ need to evaluate either _true_ or _false_. **For example:** Situation 1 - Condition A: candle.close > bollingerBand.MovingAverage - Condition B: candle.previous.max > bollingerBand.MovingAverage +* Condition A: candle.close > bollingerBand.MovingAverage +* Condition B: candle.previous.max > bollingerBand.MovingAverage In the example above, conditions A and B are mathematical comparison statements that may evaluate either _true_ or _false_. In the case both would evaluate _true_ then Situation 1 would be true. @@ -198,35 +198,23 @@ In the example above, conditions A and B are mathematical comparison statements **candle.close:** The latest value of the current candle. -**candle.begin:** Datetime in which the current period started (UNIX Epoch time). - -**candle.end:** Datetime in which the current period ends (UNIX Epoch time). - **candle.direction:** Down: candle.close > candle.open | Up: candle.close < candle.open | Side: candle.close = candle.open -**candle.previous:** Refers to the previous candle +**candle.previous:** Refers to the previous candle. You may use _candle.previous_ to fetch any of the variables of the previous candle (i.e.: candle.previous.close). You may also use as many _.previous_ as required to fetch values of more than one period behind the current one (i.e.: candle.previous.previous.max returns the maximum value of two candles before the current one). -Bollinger Band +#### Bollinger Band -**bollingerBand.begin:** +**bollingerBand.movingAverage:** The value of the current Moving Average (20 periods). -**bollingerBand.end:** +**bollingerBand.standardDeviation:** The value of current the [Standard Deviation](https://en.wikipedia.org/wiki/Standard_deviation). -**bollingerBand.movingAverage:** +**bollingerBand.deviation:** bollingerBand.standardDeviation * 2 -**bollingerBand.standardDeviation:** +**bollingerBand.direction:** Down: bollingerBand.previous.movingAverage > bollingerBand.movingAverage | Up: bollingerBand.previous.movingAverage < bollingerBand.movingAverage | Side: bollingerBand.previous.movingAverage = bollingerBand.movingAverage) -**bollingerBand.deviation:** +**bollingerBand.previous:** Use _.previous_ like with candles (see _candle.previous_ above). -**bollingerBand.direction (Down | Up | Side):** - -**bollingerBand.previous:** - -Percentage Bandwidth - -**percentageBandwidth.begin:** - -**percentageBandwidth.end:** +#### Percentage Bandwidth **percentageBandwidth.value:** @@ -238,7 +226,7 @@ Percentage Bandwidth **percentageBandwidth.previous:** -Bollinger Channels +#### Bollinger Channels **bollingerChannel.begin:** @@ -258,7 +246,7 @@ Bollinger Channels **bollingerChannel.previous:** -Bollinger SubChannels +#### Bollinger SubChannels **bollingerSubChannel.begin:** @@ -280,7 +268,7 @@ Bollinger SubChannels **bollingerSubChannel.previous:** -Internal +#### Internal **strategyStage (No Stage | Trigger Stage | Open Stage | Manage Stage | Close Stage):** From e4ddbcb374055cce431ef645380d319ed4c91da5 Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Fri, 5 Jul 2019 18:58:20 +0200 Subject: [PATCH 6/7] Update README.md --- README.md | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 59faac4a9..350adada7 100644 --- a/README.md +++ b/README.md @@ -190,41 +190,47 @@ In the example above, conditions A and B are mathematical comparison statements #### Candles -**candle.min:** The minimum value of the current candle. +**candle.min:** The minimum price of the current candle. -**candle.max:** The maximum value of the current candle. +**candle.max:** The maximum price of the current candle. -**candle.open:** The value at which the current candle opened. +**candle.open:** The price at which the current candle opened. -**candle.close:** The latest value of the current candle. +**candle.close:** The latest price of the current candle. **candle.direction:** Down: candle.close > candle.open | Up: candle.close < candle.open | Side: candle.close = candle.open -**candle.previous:** Refers to the previous candle. You may use _candle.previous_ to fetch any of the variables of the previous candle (i.e.: candle.previous.close). You may also use as many _.previous_ as required to fetch values of more than one period behind the current one (i.e.: candle.previous.previous.max returns the maximum value of two candles before the current one). +**candle.previous:** Refers to the previous candle. You may use _candle.previous_ to fetch any of the variables of the previous candle (i.e.: _candle.previous.close_). You may also use as many _.previous_ as required to fetch values of more than one period behind the current one (i.e.: _candle.previous.previous.max_ returns the maximum value of two candles before the current one). -#### Bollinger Band +#### [Bollinger Band](https://en.wikipedia.org/wiki/Bollinger_bands) -**bollingerBand.movingAverage:** The value of the current Moving Average (20 periods). +**bollingerBand.movingAverage:** The value of the current moving average (20 periods). -**bollingerBand.standardDeviation:** The value of current the [Standard Deviation](https://en.wikipedia.org/wiki/Standard_deviation). +**bollingerBand.standardDeviation:** The value of current the [standard deviation](https://en.wikipedia.org/wiki/Standard_deviation). **bollingerBand.deviation:** bollingerBand.standardDeviation * 2 -**bollingerBand.direction:** Down: bollingerBand.previous.movingAverage > bollingerBand.movingAverage | Up: bollingerBand.previous.movingAverage < bollingerBand.movingAverage | Side: bollingerBand.previous.movingAverage = bollingerBand.movingAverage) +**bollingerBand.direction:** +* Down: bollingerBand.previous.movingAverage > bollingerBand.movingAverage +* Up: bollingerBand.previous.movingAverage < bollingerBand.movingAverage +* Side: bollingerBand.previous.movingAverage = bollingerBand.movingAverage) **bollingerBand.previous:** Use _.previous_ like with candles (see _candle.previous_ above). #### Percentage Bandwidth -**percentageBandwidth.value:** +**percentageBandwidth.value:** The current value of the percentage bandwidth. -**percentageBandwidth.movingAverage:** +**percentageBandwidth.movingAverage:** The current value of the percentage bandwidth moving average. -**percentageBandwidth.bandwith:** +**percentageBandwidth.bandwith:** The current bandwith. -**percentageBandwidth.direction (Down | Up | Side):** +**percentageBandwidth.direction:** +* Down: percentageBandwidth.previous.movingAverage > percentageBandwidth.movingAverage +* Up: percentageBandwidth.previous.movingAverage < percentageBandwidth.movingAverage +* Side: percentageBandwidth.previous.movingAverage = percentageBandwidth.movingAverage) -**percentageBandwidth.previous:** +**percentageBandwidth.previous:** Use _.previous_ like with candles (see _candle.previous_ above). #### Bollinger Channels From dd33e982ffc7ce659a2ec9f59da6086eab1453e6 Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Fri, 5 Jul 2019 18:59:39 +0200 Subject: [PATCH 7/7] Update README.md --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 350adada7..21ad13fcd 100644 --- a/README.md +++ b/README.md @@ -186,9 +186,9 @@ Situation 1 In the example above, conditions A and B are mathematical comparison statements that may evaluate either _true_ or _false_. In the case both would evaluate _true_ then Situation 1 would be true. -### Available Variables +## Available Variables -#### Candles +### Candles **candle.min:** The minimum price of the current candle. @@ -202,7 +202,7 @@ In the example above, conditions A and B are mathematical comparison statements **candle.previous:** Refers to the previous candle. You may use _candle.previous_ to fetch any of the variables of the previous candle (i.e.: _candle.previous.close_). You may also use as many _.previous_ as required to fetch values of more than one period behind the current one (i.e.: _candle.previous.previous.max_ returns the maximum value of two candles before the current one). -#### [Bollinger Band](https://en.wikipedia.org/wiki/Bollinger_bands) +### [Bollinger Band](https://en.wikipedia.org/wiki/Bollinger_bands) **bollingerBand.movingAverage:** The value of the current moving average (20 periods). @@ -217,7 +217,7 @@ In the example above, conditions A and B are mathematical comparison statements **bollingerBand.previous:** Use _.previous_ like with candles (see _candle.previous_ above). -#### Percentage Bandwidth +### Percentage Bandwidth **percentageBandwidth.value:** The current value of the percentage bandwidth. @@ -232,7 +232,7 @@ In the example above, conditions A and B are mathematical comparison statements **percentageBandwidth.previous:** Use _.previous_ like with candles (see _candle.previous_ above). -#### Bollinger Channels +### Bollinger Channels **bollingerChannel.begin:** @@ -252,7 +252,7 @@ In the example above, conditions A and B are mathematical comparison statements **bollingerChannel.previous:** -#### Bollinger SubChannels +### Bollinger SubChannels **bollingerSubChannel.begin:** @@ -274,7 +274,7 @@ In the example above, conditions A and B are mathematical comparison statements **bollingerSubChannel.previous:** -#### Internal +### Internal **strategyStage (No Stage | Trigger Stage | Open Stage | Manage Stage | Close Stage):**