|
|
Example on how, with Insider 3000 and its programming language, it is possible to create a trading system like 1-2-3- High or Low. The version of 1-2-3- is ideal, given the didactic scope of the example. Try to modify it, adding other rules, stop-loss, etc.
Description:
This Trading System is based on the counting of a certain number of bars, in this case exactly 3+1.
The selling signal is fired when:
-
the first indicates a new relative max after a positive trend
-
the second has a max and a min below the one of the first bar.
-
The third retrace the height between the max from the first and the min of the second, and has a max between 1/3 and 2/3 of this height. In addition has the min which is greater or equal to the of the second bar.
-
The forth bar is the confirmation one, the one that trigger the Short signal indicating a minimum which is less than the one of bar number 2.
The buy signal is fired when:
-
the first indicates a new relative min after a negative trend
-
the second has a max and a min above the one of the first bar.
-
The third retrace the height between the min from the first and the max of the second, and has a min between 1/3 and 2/3 of this height. In addition has the max which is less than or equal to the one of the second bar.
-
The forth bar is the confirmation one, the one that triggers the Long signal indicating a maximum which is more than the one of bar number 2.
There are two very important things to note:
-
The bar sequence does not have to be necessarily continuous, in the sense that the bar 2 does not have to be just after the bar 1. Or the bar 3 can also be immediately follow the bar 2, and so on, also for the others. In this example, we have chosen and ideal situation in which the first 3 bars are consecutive, and only the bar 4 (confirmation bar) has a free position.
-
Also, as you might have noticed there is no reference to opening and closing data. The data used is the one regarding minimum and max values on every period.
The stop-loss is respectively fix to:
-
long positions if the closing data of a certain period is less than the Simple Moving Average
-
short positions if the closing data of a certain period is greater than the Simple Moving Average
To optimize the trading system we inserted 2 Options, common to all modules, therefore they can be used in any module:
Of course, any other operation can be added in order to optimise other parameters during the test phase. But do not add too many. Testing time can increase tremendously.
NB Remember than the options are used to test the Trading System and the outcome will tell which values in the paste have obtained best results.
Insert on the right box in the Trading systems management window (using copy and paste), the code shown here below
Common Options
Enter Long
Exit Long
Enter Short
Exit Short
|
|