Netsrac Correlation Trader - Settings & Setfile

Netsrac Correlation Trader - Settings & Setfile

27 May 2019, 09:53
Carsten Pflug
5
2 212

In this post, I would like to make a set file available and use it to briefly talk about the variables of the EA. 

You can use these sets for automatic trading. However, in my trading I intervene sometimes (news, asset selection, adding new positions). Sometimes I also remove "Autotrade" and continue manually. As I already pointed out, this EA should be a support for discretionary traders. Automated trading without intervention will (presumably) not be as successful as manual trading. So please note the risk and always test first in a demo account! I recommend automatic trading only to support manual trading.

I still do not recommend fully automatic trading (I currently have too little statistical data for that). But you are welcome to help me by doing your own tests with the numerous functions.


Variables (Correlation)

Variable Description
(AS01) Underlyings These are the assets, you want to automatically calculates the correlations between by the EA
(AS02) Prefix  Adds a prefix to all your symbols in AS01
(AS03) Suffix Adds a suffix to all your symbols in AS02 
(CP01)-(CP20) Correlation pair Fill your favourite pairs in manually, if you want to trade these special pairs. The EA will use only these then. Commaseparated, no whitespaces (e.g. USDCAD,USDCHF)
(CR01a) Choose actual correlation time frame Timeframe for calculating the Correlation
(CR02a) Periods for calculation of correlation Count of periods for calculating the correlation
(CR03a) Minimum correlation in percent Use this variable to find only correlation coefficients above this value
(CR04a) Maximum correlation in percent Use this variable to find only correlation coefficients below this value
Use second timeframe? If you want to trade the pure correlation coefficients in different timeframes, activate this variable
(CR01b) Choose actual correlation timeframe 2 Timeframe for calculating the correlation in timeframe 2
(CR02b) Periods for calculation of correlation in timeframe 2 Count of periods for calculating the correlation in timeframe 2
(CR03b) Minimum correlation in percent in timeframe 2 Use this variable to find only correlation coefficients above this value
(CR04b) Maximum correlation in percent in timeframe 2 Use this variable to find only correlation coefficients below this value
(CR05b) Minutes to recalc correlation (0-auto) Normally, leave 0. If you are using the second timeframe, this variable can be useful
(CR06) Trade positive correlations Let the EA find positive correlations
(CR07) Trade negative correlations Let the EA find negative correlations
(CR08) Limit count of found correlations Limit the number of found correlations. It is a good idea to trade not too much pairs, because you have to intervene sometimes.
(CR09) Use automatic recalculation? if set true, the EA will recalculate the entire dashboard + correlations at a defined time (see next option) - works only, if you don't save the configuration periodically
(CR10) Time for automatic recalculation (without disabling autotrade) Use this option in combination with "true" in the option above. ideally use a time, when the EA is inactive (see "Start hour" and "Stop hour")


Variables (Signal)

Variable Description
(SI01) Strategy Choose the strategy you want to trade
(SI02) Always rebuy in strategies 2/3 Usually leave this variable as it is (true)
(SI03) Choose signal time frame This is the time frame with which the signal is calculated
(SI04) Fuzzy logic value If you use this variable, the signal will become valid, when it reaches the threshold and came back to this threshold minus(plus) the fuzzy logic value
(SI05) Do not trade an asset more than once If set to true > if one of the correlated assets is currently traded in your account and a signal occured - the ea will not trade this pair again
(SI06) Use correlation ratio instead of oszillator Usually leave this variable as it is (false)
(SI07) Trade long Trade long signals
(SI08) Trade short Trade short signals
(SI09) Multiplier long Usually leave this variable as it is (1)
(SI10) Multiplier short Usually leave this variable as it is (1)
(SI11) Order time out  When a trade is closed, wait this time in minutes until a new trade can be open 


Variables (Strategies)

Variable Description
ComeDownTrade / TwoLeg  
(SD01) Open/Signal above this value If the signal exceeds this value, an alert is generated and/or the trades are opened (depends on the "Autotrade"-settings)
(SD02) Close/Signal below this value If the signal falls below this value, an alert is generated and/or the trades are closed (depending on the settings)
ComeUpTrade / TwoLeg  
(SU01) Open/Signal below this value If the signal is below this value, an alert is generated and/or the trades are opened (depends on the "Autotrade"-settings)
(SU02) Close/Signal above this value If the signal exceeds this value, an alert is generated and/or the trades are closed (depending on the settings)
GoingDownTrade  
(GD01) Open/Signal below this value If the signal is below this value, an alert is generated and/or the trades are opened (depends on the "Autotrade"-settings)
(GD02) Open/Signal above this value If the signal is above this value, an alert is generated and/or the trades are opened (depends on the "Autotrade"-settings)
(GD03) Close/Signal below this value (GoingDownTrade) If the signal is falling below this value, an alert is generated and/or the trades are closed (depends on the settings)
GoingUpTrade  
(GU01) Open/Signal above this value If the signal is above this value, an alert is generated and/or the trades are opened (depends on the "Autotrade"-settings)
(GU02) Open/Signal below this value If the signal is below this value, an alert is generated and/or the trades are opened (depends on the "Autotrade"-settings)
(GU03) Close/Signal above this value If the signal is rising above this value, an alert is generated and/or the trades are closed (depends on the settings)


Variables (Alerts)

Variable Description
(AL01) Screen-Alert Choose true, if you want screen-alerts
(AL02) Notify-Alert Alarms are sent to the smartphone. if you do not need that, select false
(AL03) Mail-Alert Configure true, if you want an alert via email) 
(AL04) Alert timeout in minutes  Alerts per pair are paused for this count of minutes. This is used, so you do not constantly get new messages


Variables (Filter)

Variable Description
(FI01a) Entry filter 1 The EA is calculating a value for a possible good entry based on filter values in different timeframes - if this variable is set to a filter, the EA often opens single trades 
(FI01b) Time frame filter 1 Time frame for calculating the filter
(F01c) Candle shift filter 1  If set to 0, the current value will be used. If set to 1, the previous value will be used. 
(F02a - F02c) see above 
(FI03) Use news filter  If the news filter is set to true, the EA will not open trades, when one or both of the correlated pairs have high impact news in specified time window 
(FI04) Calendar source Please use investing.com as the calendar source in this version
(FI05) Block trades before news ... as the description said. Set this value in minutes please! 
(FI06) Block trades after news ... as the description said. Set this value in minutes please! 
(FI07) Read news every x minutes ... as the description said. Set this value in minutes please! 


Variables (Trade settings)

Variable Description
(TR01) MagicNumber (first of max. 100)  The EA needs a maximum of 99 Magic numbers to handle correctly the trades. Use different Magic number for each instance
(TR02) Maximum Slippage This setting is to prevent to open trades with very bad parameters. Like news or fundamental crashes)
(TR03) Type of Lotsizecalculation PipValue based calculation (please read other blog entry to understand this better)  
(TR04) Riskfactor This is the multiplier of the minimum lot size per pair. Minimum lot size depends on broker and asset. In forex mostly 0.01 is used. (example: You got a lot size minimum of 0.03 with risk factor 3.)
(TR05) Start hour (local time) This is the hour in which automatic trading begins. Always use your local (computer) time. Preferably use periods with high volatility.
(TR06) Stop hour (local time) This is the hour in which automatic trading stops. Always use your local (computer) time. Preferably use periods with high volatility.
(TR07) Prefix for orders and alerts This text is prepended to the comment and the alert (and the config file, if used)
(TR08) Maximum lotsize  The EA calculates lotsizes automatically. This value is the maximum value for this calculation. 


Variables (Money-/Trademanagement)

Variable Description
(SL01) Caculation method of loss and profit Percent of equity - all following options means percent of equity; equity - all following options means equity (in your trading-currency); pips - all following options means pips)
(SL02) Takeprofit (basket) If the overall profit is above this value - all positions are closed - It does not matter if "Autotrade" is set. If you do not want to use this, put in a 0 for this variable
(SL03) Stoploss (basket) If the overall loss is above this value - all positions are closed - It does  not matter if "Autotrade" is set. If you do not want to use this, put in a 0 for this variable)
(SL04) Takeprofit (per correlation pair) If the profit of a correlation pair is above this value, the trades are closed. Leave 0 for no takeprofit
(SL05) Stoploss (per correlation pair) If the loss of a correlation pair is above this value, the pair trades are closed AND Autotrade for this pair trade will be disabled. Leave 0 for no stoploss
(SL06) Lock profit (per correlation pair)  To use in combination with the option below - if the profit of a pair trade falls below this value, the pair trades are closed. Leave 0 for no lock profit. 
(SL07) Lock profit at (per correlation pair)  To use in combination with the option above - if the profit rises above this value, a "Lock Profit-Variable" for this pair trade is set. If profit then falls below "Lock profit" (option above), the trades are closed. This value have to be greater than "lock profit".


Variables (Trademanagement)

Variable Description
(SL08) Type  Standard - the main correlation is traded, the following options are not used;  Averaging - more positions to the bad one are added
(SL09) Steps  How often positions will be added
(SL10) Lot-Multiplier Multiplier for the lotsize (eg. 2.0 means: 0.01, 0.02, 0.04, 0.08 ...) 
(SL11) Stepvalue  When will the first additional trade triggered (eg. if you set option SL01 to EQUITY and set this option to 3, then the first additional trade will be triggered at a loss of $3) 
(SL12) Stepvalue-Multiplier  Multiplier for the stepvalue (eg. if you set option SL01 to EQUITY and set (SL11) to 3 and this option to 2, then the first additional trade will be triggered at a loss of $3, the next at a loss of $6, then $12, $24 and so on ...)  
(SL13) Close previous trades If the first step is reached, the previous trades of this correlation pair will be closed or not. 


Variables (trade timeout)

Variable Description
LONG  
(SL14L) Time out begins after x minutes This is the count of minutes after that the time out (or count down) begins (see the variables below) 
(SL15L) Time out ends after x minutes  This is the count of minutes after that the time out (or count down) ends (see the variables above and below)  
(SL16L) Minimum profit for time out closes (equity)  This is the minimum profit (in EQUITY!), which the trade should have to close in the time out window. Has the trade not reached the minimum profit, it will definitely closed after time out ends. 
SHORT  
(SL14S) Time out begins after x minutes This is the count of minutes after that the time out (or count down) begins (see the variables below) 
(SL15S) Time out ends after x minutes  This is the count of minutes after that the time out (or count down) ends (see the variables above and below)  
(SL16S) Minimum profit for time out closes (equity)  This is the minimum profit (in EQUITY!), which the trade should have to close in the time out window. Has the trade not reached the minimum profit, it will definitely closed after time out ends. 


Variables (Individual stop/profit settings)

Variable Description
(IS01) Individual Stoploss in pips Set your (Broker-)Stoploss in PIPS for every trade 
(IS02) Individual Takeprofit in pips  Set your (Broker-)Takeprofit in PIPS for every trade 
(IS03) Individual Stoploss in equity  Set your individually stoploss in EQUITY for every single trade
(IS04) Individual Takeprofit in equity   Set your individually takeprofit in EQUITY for every single trade 
(IS05) Individual ATR-Stoploss multiplier   Set your individually stoploss in PIPS with an individual ATR-multiplier (this is possibly a good idea, because you have some assets with high and some with low daily volatility)  
(IS06) Individual ATR-Takeprofit multiplier  Set your individually takeprofit in PIPS with an individual ATR-multiplier (this is possibly a good idea, because you have some assets with high and some with low daily volatility)   
(IS07) Individual close above overbought level If the trade has reached this defined overbought level (eg. 70 or 80) , it will be closed by the EA 
(IS08) Individual close below oversold level  If the trade has reached this defined oversold level (eg. 30 or 20) , it will be closed by the EA 
(IS09) Individual close at opposite filter signal If you use entry filters, this function closes trades at an opposite signal 
(IS10) Trailing stop Use a trailing stop for all individual trades (Choose ATR or PSAR) 
(IS11) Trailing time frame Time frame for calculating the trailing stop  
(IS12) ATR factor Use an ATR factor, if you use ATR trailing stop 


Variables (Visuals)

Variable Description
(VS01) Dashboard layout  If you have a huge display size (like uhd laptop displays), then try to switch the layout to "UHD layout" 
(VS02) Charttemplate This template will be used, if you click on the chart-buttons 
(VS03) Persistant Charts Set to true, so charts keep their position, even if MT4 is restarted
(VS04) Vertical offset Move the hole dashboard vertically with this count of pixels
(VS05) Horizontal offset Move the hole dashboard horizontally with this count of pixels
...  
Use logging true (a lot of valuable information will be logged into MT4-Journal) 


Variables (System)

Variable Description
(SY01) Use logging If you have some trouble with the EA, this can be a help
(SY02) Configuration autosave interval in minutes The configuration of the EA (pairs, autotrade mode, lotsizes, ...) are saved in this interval
(SY03) Use config file after ea restart Set this true, if you want to save the status of your EA (e.g. for a restart)


The following picture describes the values for Entry/Exit-Values for (2leg-)ComeDownTrade and (2leg-)ComeUpTrade.

ZEntry

I hope this blog entry helps you to better understand the EA and its variables. I wish you much success and many green pips!

Edit (06/26/2020) Added two setfiles for M30 Signal time frame. Please set the active times (in local time) to trade only the London session (not the open or close). Be careful and please  set the money management options to your needs!
It could be a good idea, to have multiple instances of the EA with different timeframes and set the riskfactor (TR04) higher, the higher the signal timeframe is.

NCT4_2l_m30.set - Setfile for 2leg correlation trading. Gives a signal, if both positive correlated pairs are overbought/oversold. Has ADX and Stochastics entry filter and a ATR-Trailing stop. Uses the new fuzzy logic. Can be used for cautious automatic trading in the london session without open and close hours. Please please please use on demo first to get a feeling about this strategy!

NCT4_cud_m30.set - Setfile for hedged correlation trading. Gives a signal, if positive correlated pairs are in disbalance. No filter. Can be used for discretionarily trading and (with your money management settings and additional filter) for very cautious automatic trading. Must be monitored!

For more informations, watch the videos on youtube:

Watch Video#1 (first start)
Watch Video#2 (how to operate the dashboard)
Watch Video#3 (trade handling)
Watch Video#4 (how the signal is generated)
Watch Video#5 (the scoring system)
Watch Video#6 (new in version 3)

Files:
Share it with friends: