Available translations

Tutorial Step - Manage Stage

foundations.png
manage-stage.png
The Manage Stage is where the bot checks if it has to Take Profit or a Stop Loss
In this stage the bot checks if the price has hit Take Profit (TP) or Stop Loss (SL). Initial conditions for my strategy were to set a SL at 20% from entry and a TP at 100% or when MA50 cross under MA200.
Stop Loss formula:
 tradingEngine.tradingCurrent.position.entryTargetRate.value * 0.8
Take Profit formula is a little bit more elaborate:
 if (chart.at04hs.popularSMA.sma50 > chart.at04hs.popularSMA.sma200) {tradingEngine.tradingCurrent.position.entryTargetRate.value * 2} else {chart.at04hs.candle.close}
Previous
Tutorial Step - Open Stage
Next
Tutorial Step - Close Stage