Tuesday, December 26, 2023

Download the Lion Gold MT4/MT5 EA for FREE [Updated Version].

Download the Lion Gold MT4/MT5 EA for FREE [Updated Version].


The Lion Gold MT4 EA harnesses the inherent volatility of gold as a trading pair, employing a strategy centered on detecting and responding to breakouts at daily support and resistance levels. This straightforward yet highly effective approach is particularly well-suited for the notable volatility of the gold market. By concentrating on these pivotal points, the EA capitalizes on significant market movements, enabling traders to profit from substantial price fluctuations.

Distinguished by its versatility, the Lion EA does not rely on a singular strategy; instead, it incorporates seven distinct built-in strategies that operate synergistically. This multifaceted approach ensures adaptability to diverse market conditions, fostering a steady growth trajectory for investments. While acknowledging that losses are inherent in trading, these varied strategies ensure a controlled and transparent trading process without any manipulation.

A noteworthy aspect of the Gold MT5 EA is its steadfast commitment to risk management. The EA deliberately steers clear of high-risk trading styles such as grids and martingale, known for their potential to amplify losses. Opting for a more conservative approach, it prioritizes sustainable trading tactics to safeguard the long-term financial well-being of the trader.

Every trade executed by the Lion MT5 EA is accompanied by predefined take profit (TP) and stop loss (SL) levels, establishing clear targets and limits for each position. Additionally, the EA employs a trailing stop loss strategy: as a trade moves favorably, the stop loss is adjusted to secure profits while allowing for further growth. This dynamic approach serves to minimize risks while maximizing potential gains.


Before deploying the Gold MT4 Robot in a live trading account, it is advisable to conduct a week-long testing period in a demo account. Familiarize yourself with the robot's operations and functionalities to ensure a thorough understanding before transitioning to real trading.


Gold MT4 EA Recommendations:

  • Maintain a minimum account balance of $200.
  • For accounts with balances between $200 and $400, consider employing only strategies 2, 4, and 7, as they exhibit the lowest drawdowns.
  • While specifically designed for XAUUSD, the EA is adaptable to any currency pair.
  • While it performs best on the Daily TimeFrame, it remains effective across various TimeFrames.
  • Optimize stability by running the EA continuously on a dependable VPS; we recommend using a reliable FOREX VPS service such as FXVM.
  • Although the EA is not affected by spread and slippage, it is advisable to choose a reputable ECN broker. (Explore suitable brokers for your needs here.)

Thursday, December 21, 2023

Judging the Quality of Indicators.

Judging the Quality of Indicators.

In my previous post I said I was trying to develop new indicators from the results of my new PositionBook optimisation routine. In doing so, I need to have a methodology for judging the quality of the indicator(s). In the past I created a Data-Snooping-Tests-GitHub which contains some tests for statistical significance testing and which, of course, can be used on these new indicators. Additionally, for many years I have had a link to tssb on this blog from where a free testing program, VarScreen, and its associated manual are available. Timothy Masters also has a book, Testing and Tuning Market Trading Systems, wherein there is C++ code for an Entropy test, an Octave compiled .oct version of which is shown in the following code box.

#include "octave oct.h"
#include "octave dcolvector.h"
#include "cmath"
#include "algorithm"

DEFUN_DLD ( entropy, args, nargout,
"-*- texinfo -*-\n\
@deftypefn {Function File} {entropy_value =} entropy (@var{input_vector,nbins})\n\
This function takes an input vector and nbins and calculates\n\
the entropy of the input_vector. This input_vector will usually\n\
be an indicator for which we want the entropy value. This value ranges\n\
from 0 to 1 and a minimum value of 0.5 is recommended. Less than 0.1 is\n\
serious and should be addressed. If nbins is not supplied, a default value\n\
of 20 is used. If the input_vector length is < 50, an error will be thrown.\n\
@end deftypefn" )

{
octave_value_list retval_list ;
int nargin = args.length () ;
int nbins , k ;
double entropy , factor , p , sum ;

// check the input arguments
if ( args(0).length () < 50 )
{
error ("Invalid 1st argument length. Input is a vector of length >= 50.") ;
return retval_list ;
}

if ( nargin == 1 )
{
nbins = 20 ;
}

if ( nargin == 2 )
{
nbins = args(1).int_value() ;
}
// end of input checking

ColumnVector input = args(0).column_vector_value () ;
ColumnVector count( nbins ) ;
double max_val = *std::max_element( &input(0), &input( args(0).length () - 1 ) ) ;
double min_val = *std::min_element( &input(0), &input( args(0).length () - 1 ) ) ;
factor = ( nbins - 1.e-10 ) / ( max_val - min_val + 1.e-60 ) ;

for ( octave_idx_type ii ( 0 ) ; ii < args(0).length () ; ii++ ) {
k = ( int ) ( factor * ( input( ii ) - min_val ) ) ;
++count( k ) ; }

sum = 0.0 ;
for ( octave_idx_type ii ( 0 ) ; ii < nbins ; ii++ ) {
if ( count( ii ) ) {
p = ( double ) count( ii ) / args(0).length () ;
sum += p * log ( p ) ; }
}

entropy = -sum / log ( (double) nbins ) ;

retval_list( 0 ) = entropy ;

return retval_list ;

} // end of function

This calculates the information content, Entropy_(information_theory), of any indicator, the value for which ranges from 0 to 1, with a value of 1 being ideal. Masters suggests that a minimum value of 0.5 is acceptable for indicators and also suggests ways in which the calculation of any indicator can be adjusted to improve its entropy value. By way of example, below is a plot of an "ideal" (blue) indicator, which has values uniformly spread across its range
with an entropy value of 0.9998. This second plot shows a "good" indicator, which has an

entropy value of 0.7781 and is in fact just random, normally distributed values with a mean of 0 and variance 1. In both plots, the red indicators fail to meet the recommended minimum value, both having entropy values of 0.2314.

It is visually intuitive that in both plots the blue indicators convey more information than the red ones. In creating my new PositionBook indicators I intend to construct them in such a way as to maximise their entropy before I progress to some of the above mentioned tests.

Wednesday, November 22, 2023

Update to PositionBook Chart - Revised Optimisation Method

Update to PositionBook Chart - Revised Optimisation Method

Just over a year ago I previewed a new chart type which I called a "PositionBook Chart" and gave examples in this post and this one. These first examples were based on an optimisation routine over 6 variables using Octave's fminunc function, an unconstrained minimisation routine. However, I was not 100% convinced that the model I was using for the loss/cost function was realistic, and so since the above posts I have been further testing different models to see if I could come up with a more satisfactory model and optimisation routine. The comparison between the original model and the better, newer model I have selected is indicated in the following animated GIF, which shows the last few day's action in the GBPUSD forex pair. 

The old model is figure(200), with the darker blue "blob" of positions accumulated at the lower, beginning of the chart, and the newer model, figure(900), shows accumulation throughout the uptrend. The reasons I prefer this newer model are:

  • 4 of the 6 variables mentioned above (longs above and below price bar range, and shorts above and below price bar range) are theoretically linked to each other to preserve their mutual relationships and jointly minimised over a single input to the loss/cost function, which has a bounded upper and lower limit. This means I can use Octave's fminbnd function instead of fminunc. The minimisation objective is the minimum absolute change in positions outside the price bar range, which has a real world relevance as compared to the mean squared error of the fminunc cost function.
  • because fminunc is "unconstrained" occasionally it would converge to unrealistic solutions with respect to position changes outside the price bar range. This does not happen with the new routine.
  • once the results of fminbnd are obtained, it is possible to mathematically calculate the position changes within the price bar range exactly, without needing to resort to any optimisation routine. This gives a zero error for the change which is arguably the most important.
  • the results from the new routine seem to be more stable in that indicators I am trying to create from them are noticeably less erratic and confusing than those created from fminunc results.
  • finally, fminbnd over 1 variable is much quicker to converge than fminunc over 6 variables.
The second last mentioned point, derived indicators, will be the subject of my next post.