Cycleanalytic v1.2 User Guide
Cycleanalytic v1.2 User Guide
Long signal:
Short signal:
Exits:
Programming xux99
Indicators KROUFR
Before installing this expert advisor go to Tools → Options → Expert Advisors and make sure that “Allow DLL
imports” is enabled and “Confirm DLL function calls” is disabled.
Entry and Exit Conditions
An entry is valid if all conditions are met at the same time. Exits are handled by the rule whichever exit signal
comes first closes the trade. Indicator based exits are valid only once. Fresh signal means that at the previous
candle we had a false entry signal and at the current candle a true one. A number of settings within this EA use a
multi digit value as opposed to a user specified value of true/false. The first number refers to entry, the second one
to exit, the third one to a fresh signal and the fourth one to timeframe. For the first two numbers 0 means the signal
is ignored, 1 means a closed candle gives a signal and 2 means an unclosed candle gives a signal. For the third
number 0 means a fresh signal should occur, 1 means a fresh signal is not required and 2 means a fresh signal of
this particular condition is an absolute prerequisite. If we have more than one conditions with a 0 third number, at
least one of them should be a fresh signal. If we have more than one conditions with a 2 third number all of them
should be a fresh signal. If we have more than one conditions with a 1 third number, the existence or not of a fresh
signal for these conditions is not taken into account. For the fourth number, 0 means current timeframe but if a
different timeframe is used, set its name as shown in the Periodicity toolbar of Metatrader 4. Any multi digit
indicator with a value of 0000 means that the indicator is not used.
For example, if we want a closed candle entry signal, an unclosed candle exit signal, we don’t care if the signal is
fresh or not and the timeframe of the indicator is one hour then the multi digit value is 121H1.
ZZPastBars: For an entry signal, a closed candle semaphore should have appeared within the defined past bars. It
is valid only if an entry signal of a closed candle semaphore is used.
EntryZZSemaphore: For an entry signal, the defined or greater semaphore should appear.
ExitZZSemaphore: For an exit signal, the defined or greater semaphore should appear.
CycleSignal: Cycle KROUFR should be below its oversold level for long signal and above its overbought level for a
short signal.
CycleLevel: Long trades are opened if Cycle KROUFR is below CycleLevel and short trades if Cycle KROUFR is
above 100-CycleLevel.
ExitOnOppositeSignal: The entire trade or any remaining partial lots are closed when an opposite entry signal,
defined by the entry settings, occurs.
ReverseSignals: A long signal opens a short trade, closes a long trade and vice versa.
Order Settings
TradesPerDirection: Maximum allowed number of simultaneously open trades of the same direction. It can be up
to 99.
TradesPerSession: Maximum number of trades that can be opened during each trading session. If there are no
trading sessions, it refers to the whole day. 0 disables this option.
MagicNumber: Magic number of the trade. If more than one chart of the same pair is opened the magic numbers
should be different. Different pairs can have the same magic number.
TradeComment: Comment of the trade as shown at the Metatrader terminal.
SwingSL: False means the stop loss value is relative to entry price. True means the stop loss is relative to the
nearest swing plus spread for shorts. All stop loss and take profit settings are hidden from the broker.
MinimumSLPips: If SwingSL is selected, minimum stop loss should be at least the defined pips. SwingSL is valid
only if MinimumSLPips is greater than zero.
MaximumSLPips: If stop loss is greater than the defined pips, it is reduced to MaximumSLPips. 0 disables this
option.
StopLossType: Type of stop loss. 0 means pips, 1 means ATR based and StopLoss value is a multiplier of ATR. The
same types apply to the following settings as well.
VisibleSL: Stop loss visible to brokers used in case of disconnection. It is a multiplier of hidden stop loss value.
We can have up or four take profit levels and each of them can have a different type.
VisibleTP: Take profit visible to brokers used in case of disconnection. It is a multiplier of hidden take profit
value.
BreakEven: The stop loss moves to the entry price after price is in profit for the defined value.
LockProfit: The stop loss moves to the entry price plus the defined value after price reaches BreakEven level.
TrailingStop: Value of trailing stop loss. Stop loss is continuously modified so that its distance from current price
is always the defined value. 0 disables this option.
TrailingStep: The trailing stop loss is modified when price exceeds the level at which the previous trailing stop
modification occurred, for the defined value.
CloseProfitableAfterMinutes: At the defined minutes after its opening, a profitable trade are closed.
CloseLosingAfterMinutes: At the defined minutes after its opening, an unprofitable trade are closed.
MaxSpread: No trades are opened when spread is greater than the defined pips. 0 disables this option.
CloseOnProfit: True means that if an opposite or exit signal occurs, only profitable or breakeven trades are
closed.
Hedge: True means that a long and short trade can be simultaneously open.
MinOrdersDistance: Each trade should be opened in a distance from the most recent open trade. This distance
should be at least the defined value. 0 disables this option.
NewHighLow: 1 means each new trade should be opened lower for shorts or higher for longs, 2 means each new
trade should be opened higher for shorts or lower for longs, from the most recent open trade of the same direction.
0 disables this option.
CandleTimeFrame: Only one trade per direction can be opened during a candle. By setting the candle timeframe
we indirectly define the time till the next trade. 0 means the chart timeframe and we can set the timeframe name as
shown in the Periodicity toolbar of Metatrader 4.
SendEmail: 0 means no email, 1 means an email is sent only when a trade is opened, 2 an email is sent only when a
trade is closed, 3 an email is sent in both cases.
Alerts: 0 means no alerts, 1 alerts only when a trade is opened, 2 alerts only when a trade is closed, 3 alerts in
both cases.
AlertSound: Play the defined sound file with an alert. The sound file should be placed in the sounds directory of
Metatrader. Set it to blank for no sound.
ScreenShots: Screenshots are saved in the files folder at the opening and closing of a trade. 0 means no
screenshots, 1 means a screenshot is saved only when a trade is opened, 2 means a screenshot is saved only when
a trade is closed, 3 means a screenshot is saved in both cases.
AutoGMTOffset: Difference between server time and GMT, defined automatically by the EA. It can’t be used during
backtests.
DSTOffset: If ManualGMTOffset is used, Daylight Saving Time correction is automatically applied according to the
European Union rules.
MondayOpenHour: For each week, new trades are only opened after this hour of Monday. It is in hhmm format.
Set it to blank to disable this option.
FridayCloseHour: Hour of Friday when all trades are closed and no new ones are opened to avoid the weekend
gap. It is in hhmm format. Set it to blank to disable this option.
FridayCloseTrades: At FridayCloseHour open trades are closed. 0 means no trades are closed, 1 means only
profitable trades are closed, 2 means only losing trades are closed, 3 means all trades are closed.
MinutesBeforeNews: The NewsFilter is active for the defined number of minutes before news.
MinutesAfterNews: The NewsFilter is active for the defined number of minutes after news.
PartialClose1: Percent of the initial lots that is closed when the first exit occurs.
PartialClose2: Percent of the initial lots that is closed when the second exit occurs.
PartialClose3: Percent of the initial lots that is closed when the third exit occurs. If there are any remaining lots,
they are closed by the fourth exit.
An indicator based partial exit can happen only once, no matter which indicator caused it.
MoneyManagement: True means that the lot size is defined by the money management.
StopLossRisk: Percent of account balance to risk for each trade, if it hits stop loss. 0 disables this option. Only one
of EquityPercent or StopLossRisk can be used.
LotPercent: The lot size of the trades after the first one can be increased or decreased by the defined percent of
the lots of the first trade. A positive number means the lot size is increased and a negative number means it is
decreased. 0 disables this option.
StartProgression: Lot change starts at the defined number of trades that have been opened. It is independently
calculated for long or short trades. If certain trades of the progression have been closed this has no effect as they
are still taken into account.
MaxProgression: Lot change ends at the defined number of trades that have been opened. After that the trades
take the lot size of the MaxProgression trade. It is independently calculated for long or short trades. If certain
trades of the progression have been closed this has no effect as they are still taken into account.
CloseAllProfit: All open trades are closed when their total profit reaches the defined percent of account balance. 0
disables this option.
CloseAllLoss: All open trades are closed when their total loss reaches the defined percent of account balance. 0
disables this option.
CloseOneDirection: Long or short trades are taken into account separately to calculate the profit or loss for the
CloseAllProfit and CloseAllLoss options.