Define week number
-
Hello,
Does anyone know how to define weeks in FxDreema? E.g. Mon - Fri = 1, next Mon - Fri = 2?
The week may not always be Mon - Fri. For example, the first of September was Wednesday so Week 1 would be Wed - Fri
-
@ftsio You can create a counter variable that adds +1 every time a new weekly candle is open.
-
@l-andorrà this won’t work for me as the weekly candles encompass dates from different months. I need to consider days only in the current month.
An example: 30/08/21, 31/08/21 and 01/09/21, 02/09/21 will be within the same weekly candle. I would only like to trade in August.
-
@l-andorrà please see above.
@jstap Ive seen you write create some very impressive logic on here before.
Any idea how I could tackle this?
-
-
@ftsio Than you can add a second filter specifying that trades are withing the same monthly candle. That filter should apply before that of the weekly filter. Obviously these filters whould be checked on a daily basis.
-
@l-andorrà @jstap thanks for this. I’ve got it working with a variation of what you’ve provided.
Do you know if there is a way to stop the EA and then start again from where it left off? E.g. I stop the EA in week 2 and then start again how can I make it start at week 2 again without resetting back to week 1?
-
@ftsio AFAIK it is not possible is teh Ea is removed from the chart because all variables will be reinitialized. The only option I see is you manualley inserting the week value as an input parameter when you rerun the EA.
-
@ftsio @l-andorrà is correct you can stop EA without removing then start again when condition matches, if you set a terminal variable (global variable) it will log on the platform, then EA can read, maybe what you want, this can be reset with custom code but to add into multiple conditions can be difficult..