UltimateTrend Master User’s Guide
How does it work?
This expert advisor trades based on trendlines drawn on the chart. It executes four types of orders: buys on upward breakouts, sells on downward breakouts, sells on touching the trendline from below in a downtrend, and buys on touching the trendline from above in an uptrend.
When any of these conditions are met, the trendline is deleted, regardless of whether an order was executed.
To use it, you need to rename the drawn trendline to "buy", "sell", "buy limit", or "sell limit". These labels can be customized in the settings.
Important: The "Ray" option must be checked in the properties of the trendline for proper functionality.
It is recommended to set the magnet sensitivity to zero in chart settings, otherwise, the trendline may shift.
Testing
There are two methods for testing. The first is using the automatic trendline drawing feature found in the settings. When enabled, these lines will appear in the tester. However, it's important to note that these lines are for testing purposes only and are not recommended for live trading due to their inaccuracies.
The second method involves renaming the trendline drawn on the chart, saving it as a template, and then loading the template in the strategy tester.
Settings
Fix_Lot = 0.01: Use a fixed lot size
Auto_Lot = false: Enable automatic lot sizing, where the loss will be a percentage of the balance when the stop loss is reached.
Risk_Percentage_of_Balance = 1.0: Define the risk percentage
Stop_Loss = 50.0: If auto lot is enabled and stop loss is 0, no position will be opened
Take_profit = 50.0
Use_ATR_for_SL_and_TP = false: Set stop loss and take profit based on ATR
ATR_Period = 14.0
ATR_Multiply_SL = 4.0: Stop loss will be four times the ATR
ATR_Multiply_TP = 6.0: Take profit will be six times the ATR
Trailing_Stop = false: Enable trailing stop
Trailing_Stop_Start = 20.0: Trailing stop activates at 20 pips profit
TS_Start_Percentage_of_SL = false: Trailing stop activation is determined by a percentage of the stop loss distance
Percentage_of_Stop = 50.0: Trailing stop activates when profit reaches 50% of the stop loss
Trailing_Stop_Distance = 10.0: Trailing stop follows the price at a distance of 10 pips
Trailing_Stop_Step = 2.0: Trailing stop moves every 2 pips
Break_Even = false: Enable break even point
Break_Even_Pips_on_Profit = 50.0: Break even activates at 50 pips profit
Breakeven_Percentage_of_SL = false: Activate break even with a percentage of the stop loss
BE_Percentage_of_SL = 100.0: Set break even point when profit reaches 100% of the stop loss
Breakeven_Percentage_of_TP = false: Activate break even with a percentage of the take profit
BE_Percentage_of_TP = 50.0: Break even activates when profit reaches 50% of the take profit
Break_Even_Point_Offset = 5.0: When break even is activated, it sets the stop loss to 5 pips in profit from the entry price
Partially_Close_in_Pips = false: Enable partial closure
Close_Volume_Percentage = 50.0: Close 50% of the position
Pips_Away = 20.0: Activates at 20 pips profit
Partially_Close_SL_Percentage = false: Set partial closure with a percentage of the stop loss
Close_Volume_Percentage_SL = 50.0: Close 50% of the position when profit reaches the specified percentage of the stop loss
Pips_Away_SL_Percentage = 100.0: Activates partial closure when profit reaches 100% of the stop loss
Partially_Close_TP_Percentage = false: Set partial closure with a percentage of the take profit
Close_Volume_Percentage_TP = 50.0: Close 50% of the position when profit reaches the specified percentage of the take profit
Pips_Away_TP_Percentage = 50.0: Activates partial closure when profit reaches 50% of the take profit
Filters
Breakout_Distance_Filter = false: Filter breakout distance
Min_Distance_Pips = 5.0: At breakout, the closing value of the candle must be at least 5 pips away from the trendline
Max_Distance_Pips = 15.0: At breakout, the closing value of the candle must be at most 15 pips away from the trendline
Spread_Filter = 5.0: Do not open trades if the spread is more than 5 pips
Time_Filter = false: Set time filter
Start_Trading_Time = "00:00": Trading is allowed from 00:00 server time
End_Trading_Time = "23:59": Trading is allowed until 23:59 server time
Trendline Settings
Trendline_Name_Buy = "buy": Name of the trendline for buy breakout
Trendline_Name_Sell = "sell": Name of the trendline for sell breakout
Trendline_Name_Buy_Limit = "buy limit": Name of the trendline for buying on touch in a rising trend
Trendline_Name_Sell_Limit = "sell limit": Name of the trendline for selling on touch in a falling trend
Only for Testing Purposes
Enable Automatic Trendline Drawing:
Auto_Trendline_Buy = false
Auto_Trendline_Sell = false
Auto_Trendline_Buy_Limit = false
Auto_Trendline_Sell_Limit = false