Definition

Override this method in your inherited class from DSTCreateModelBase to verify you would like to add the data set for training the machine learning model.

 

Note:  The DSTIsValidLongDataSet method is called from the Deep Signal Library when creating a machine learning model. It is not used when trying to predict a machine learning model that has already been created. The Deep Signal Library will call the method to allow the user to either accept or reject a data set that would normally be used for training the machine learning model. When the Deep Signal Library finds a data set it would like to use in training the machine learning model, it will call DSTIsValidLongDataSet for a data set for a long trade. If the isValid parameter is set to true it will use the data set. If the isValid is set to false it will not use the data set.


The LongSignalBarsBack parameter will tell the user how many bars back was the signal bar for a long trade. The signal bar Is the first bar of a series before the price hits the profit target in a predetermined amount of bars. The Bars To Target value represents the predetermined amount of bars needed to reach a long profit target.


 

Syntax

DSTIsValidLongDataSet(int longSignalBarsBack, out bool isValid)

 

Warning: If the user sets isValid equal to false then that data set will not be used in training the machine learning model. The default value of true will allow the data set to be used in training.

 

Parameters

longSignalBarsBack

An int used to pass the number of bars back that the signal bar had occurred.

isValid

bool value that must be assigned before leaving the method that determines whether to accept the long data set to be used in training a machine learning model


 

 

Examples

ns

Example of only allowing training for long data sets in which a slow moving SMA is less than a fast moving SMA at the signal bar for a long trade


public override void DSTIsValidLongDataSet(int longSignalBarsBack, out bool isValid)

{

       // Add your code here to verify you would like this data set used in training the machine learning model

       isValid = false;


       // If the slow moving SMA is smaller than the faster moving SMA then add this data set for long trades

       if (SMA(25)[longSignalBarsBack] < SMA(10)[longSignalBarsBack])

             isValid = true;

}



 

 









Futures, foreign currency and options trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Risk capital is money that can be lost without jeopardizing ones financial security or lifestyle. Only risk capital should be used for trading and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results.