A lot of decisions that users need to make are time-based. Eg: close an open position automatically after some time has passed or trade only if x time has passed since the previous trade.

These time-based conditions are typically linked to a reference value which, in most cases, is the time value when the trade happened. The 'TIME' block helps create such complex time-based conditions.

How does it work

The 'TIME' block simply checks the amount of time that has passed since the last trade happened and if that amount is 'greater than' or 'lesser than' the reference value. Users can set up the value in minutes, hours or days.

 

mceclip0.png

Note:

- The 'TIME' block checks conditions at whatever is the lowest timeframe on the strategy. It intrinsically does not have a 'time frame' of its own. So if you have a condition set up with time elapsed > 5 mins, but the lowest time frame on which the strategy is running is 1h then the condition will be checked only at the end of the hourly candle

- When no trade has happened, the starting point of the strategy is taken as the reference value to compare

Sample strategy conditions:

Below are a few examples of how a strategy condition can be set up 

Condition 1:

Trigger an event when the 'TIME' passed since last trade is greater than 4 hours

mceclip1.png

Condition 2:

Trigger an event when the 'TIME' passed since the last trade is lesser than 15 mins.

mceclip2.png

Use blocks instead of code to create your trading strategies, only at Mudrex Build. Join now!

Was this article helpful?
0 out of 1 found this helpful