HELP TO ADD ATR STOP LOSS TO MULTI 10.4 TRADER
-
fx800
- Trader
- Posts: 1334
- Joined: Sun Dec 04, 2011 4:11 am
HELP TO ADD ATR STOP LOSS TO MULTI 10.4 TRADER
Trend appears to be returning to the market, and MrLong's Multi 10.4 Trader sprang back to life yesterday.
Fxdaytrader has very kindly added a daily pivot filter to it recently : buy only if price is > DP, and opposite for sell. Hopefully, this will cut out some of the losers from buying/selling on the wrong side of the DP.
If someone could add an ATR stop loss option to the ea, then everything would be complete.
Many thanks in advance.
peter
Fxdaytrader has very kindly added a daily pivot filter to it recently : buy only if price is > DP, and opposite for sell. Hopefully, this will cut out some of the losers from buying/selling on the wrong side of the DP.
If someone could add an ATR stop loss option to the ea, then everything would be complete.
Many thanks in advance.
peter
You do not have the required permissions to view the files attached to this post.
- kwanann
- Trader
- Posts: 948
- Joined: Thu Nov 29, 2012 1:53 am
Re: HELP TO ADD ATR STOP LOSS TO MULTI 10.4 TRADER
Erm, use mptm? It already has built in atr sl
I've been trading using OM Dual N EA for the past 2 years, live results can be found over at https://www.fxblue.com/users/kwanann
- fxdaytrader
- Trader
- Posts: 190
- Joined: Sun Jun 10, 2012 7:03 am
- Location: Poon-Town (germany, se-asia, se-europe) ...
Nanningbob MULTI 10.4 TRADER with pivotfilter / atr for TP/S
not tested, pls. check (I have also added an adequate header) 
btw: This expert advisor requires some files:
mt4gui.mqh, mt4gui.dll and cSSLib.mqh
you can find mt4gui.mqh and mt4gui.dll at http://www.mt4gui.com/download/
Download the cSSLib.mqh at http://www.stevehopwoodforex.com/phpBB3 ... 035#p65035 or the latest version at http://www.stevehopwoodforex.com/phpBB3 ... =45&t=2905
cSSLib-stuff: copyright by Mr. Paul Geirnaerdt, "Baluda"
Copy the .mqh-files to Empty4-folder/experts/include/ and the .dll-file to Empty4-folder/experts/libraries/
edit: If you are looking for the original EA by MrLong visit http://www.stevehopwoodforex.com/phpBB3 ... =37&t=1619
btw: This expert advisor requires some files:
mt4gui.mqh, mt4gui.dll and cSSLib.mqh
you can find mt4gui.mqh and mt4gui.dll at http://www.mt4gui.com/download/
Download the cSSLib.mqh at http://www.stevehopwoodforex.com/phpBB3 ... 035#p65035 or the latest version at http://www.stevehopwoodforex.com/phpBB3 ... =45&t=2905
cSSLib-stuff: copyright by Mr. Paul Geirnaerdt, "Baluda"
Copy the .mqh-files to Empty4-folder/experts/include/ and the .dll-file to Empty4-folder/experts/libraries/
edit: If you are looking for the original EA by MrLong visit http://www.stevehopwoodforex.com/phpBB3 ... =37&t=1619
You do not have the required permissions to view the files attached to this post.
Last edited by fxdaytrader on Sat Sep 28, 2013 5:09 pm, edited 3 times in total.
- fxdaytrader
- Trader
- Posts: 190
- Joined: Sun Jun 10, 2012 7:03 am
- Location: Poon-Town (germany, se-asia, se-europe) ...
Re: HELP TO ADD ATR STOP LOSS TO MULTI 10.4 TRADER
Hm, I do not like the mt4gui-stuff.
So attached is a "NoGui"-version which does not use it.
Further I have added the contents of cSSLib.mqh (copyright by Mr. Paul Geirnaerdt, "Baluda"), so the expert advisor does not require any additional files or libraries.
So attached is a "NoGui"-version which does not use it.
Further I have added the contents of cSSLib.mqh (copyright by Mr. Paul Geirnaerdt, "Baluda"), so the expert advisor does not require any additional files or libraries.
You do not have the required permissions to view the files attached to this post.
Last edited by fxdaytrader on Sat Sep 28, 2013 5:09 pm, edited 1 time in total.
-
fx800
- Trader
- Posts: 1334
- Joined: Sun Dec 04, 2011 4:11 am
Re: HELP TO ADD ATR STOP LOSS TO MULTI 10.4 TRADER
fxdaytrader wrote:Hm, I do not like the mt4gui-stuff.
So attached is a "NoGui"-version which does not use it.
Further I have added the contents of cSSLib.mqh (copyright by Mr. Paul Geirnaerdt, "Baluda"), so the expert advisor does not require any additional files or libraries.
Hi Marc,
Thanks for your help again.
I didn't want to disturb you over the weekend, hence I post my request here. But, you came to the rescue nevertheless.
The reason for my request is that the hard stop does not seem to be working. I normally use a hard stop of 200 pips, and often gets stopped out for less than 100 pips. Looking at the hard stop code, it looked perfectly fine, that is why I never raised the issue in MrLong's thread because I did not want to waste his time.
Anyway, you have solved my problems now because using ATR stop loss is my favourite option, need to give my trades enough room to play out. Since, most of the ea's I use are trend ea's, unless the trend changes, there is a good chance the trade will go into profit eventually.
Your weekends are previous to you, so enjoy it.
Best regards,
peter.
-
fx800
- Trader
- Posts: 1334
- Joined: Sun Dec 04, 2011 4:11 am
Re: HELP TO ADD ATR STOP LOSS TO MULTI 10.4 TRADER
BTW, the Multitrader is a basket trader, so MPTM would not be of any help.kwanann wrote:Erm, use mptm? It already has built in atr sl
Thanks for your idea anyway.
peter
- fxdaytrader
- Trader
- Posts: 190
- Joined: Sun Jun 10, 2012 7:03 am
- Location: Poon-Town (germany, se-asia, se-europe) ...
Re: HELP TO ADD ATR STOP LOSS TO MULTI 10.4 TRADER
oha, ok, what does the ea do? Does it set a wrong stoploss or no stoploss?fx8000 wrote: The reason for my request is that the hard stop does not seem to be working. I normally use a hard stop of 200 pips, and often gets stopped out for less than 100 pips. Looking at the hard stop code, it looked perfectly fine
If it sets a wrong or no SL, then I assume the problem is that there is the stoploss-input an integer (but should/must be double imho).
edit: I updated the two EAs (TP/SL is converted to double, one external parameter removed because it was not addressed) ...
-
fx800
- Trader
- Posts: 1334
- Joined: Sun Dec 04, 2011 4:11 am
Re: HELP TO ADD ATR STOP LOSS TO MULTI 10.4 TRADER
The problem was the stop loss was always less than 100 pips when my hard stop was set at 200. As I said, I did not want to waste anyone's time, and just use the alternative by setting everything to false and allow the ea to set stop loss one pivot above/below. Because I trade the daily pivots instead of weekly pivots, the stop loss is a bit tight.fxdaytrader wrote:oha, ok, what does the ea do? Does it set a wrong stoploss or no stoploss?fx8000 wrote: The reason for my request is that the hard stop does not seem to be working. I normally use a hard stop of 200 pips, and often gets stopped out for less than 100 pips. Looking at the hard stop code, it looked perfectly fine
If it sets a wrong or no SL, then I assume the problem is that there is the stoploss-input an integer (but should/must be double imho).
edit: I updated the two EAs (TP/SL is converted to double, one external parameter removed because it was not addressed) ...
- fxdaytrader
- Trader
- Posts: 190
- Joined: Sun Jun 10, 2012 7:03 am
- Location: Poon-Town (germany, se-asia, se-europe) ...
Re: HELP TO ADD ATR STOP LOSS TO MULTI 10.4 TRADER
fx800 came up with the idea to use shelleys ma-filter (see BASA-thread for details) also (buy: lwma60 > lwma240, sell: lwma60 < lwma240 (and price > for buy, vice versa for sell), so I have implemented this.
Further I changed some variable-types (from int to double).
I do not know if this addition makes it possible to backtest the ea with the crapperquotes backtester, but I implemented this:
When 'CurrentPairWhenBacktesting'=TRUE then it will be checked if we are backtesting, and if so then the var 'symbolsToTrade' will be filled with the current symbol (added the filter 'if (!IsTesting())' in the extractpairs-function also because we do not need to append the suffix in that case) ....
Attached the nogui-version. I will update the mt4gui-version within the next days/week when everything is working and finished.
Further I changed some variable-types (from int to double).
I do not know if this addition makes it possible to backtest the ea with the crapperquotes backtester, but I implemented this:
When 'CurrentPairWhenBacktesting'=TRUE then it will be checked if we are backtesting, and if so then the var 'symbolsToTrade' will be filled with the current symbol (added the filter 'if (!IsTesting())' in the extractpairs-function also because we do not need to append the suffix in that case) ....
Attached the nogui-version. I will update the mt4gui-version within the next days/week when everything is working and finished.
You do not have the required permissions to view the files attached to this post.
Last edited by fxdaytrader on Sun Sep 29, 2013 11:39 am, edited 3 times in total.
-
fx800
- Trader
- Posts: 1334
- Joined: Sun Dec 04, 2011 4:11 am
Re: HELP TO ADD ATR STOP LOSS TO MULTI 10.4 TRADER
I think you meant to change double LWMA60 and double LWMA240 in the following lines to double ma1 and ma2fxdaytrader wrote:fx800 came up with the idea to use shelleys ma-filter (see BASA-thread for details) also (buy: lwma60 > lwma240, sell: lwma60 < lwma240 (and price > for buy, vice versa for sell), so I have implemented this.
Further I changed some variable-types (from int to double).
I do not know if this addition makes it possible to backtest the ea with the crapperquotes backtester, but I implemented this:
When 'CurrentPairWhenBacktesting'=TRUE then it will be checked if we are backtesting, and if so then the var 'symbolsToTrade' will be filled with the current symbol (added the filter 'if (!IsTesting())' in the extractpairs-function also because we do not need to append the suffix in that case) ....
Attached the nogui-version. I will update the mt4gui-version within the next days/week when everything is working and finished.
Code: Select all
//ShelleysMaFilter, fxdaytrader
double LWMA60 = GetMa(CurrentPair, ShelleysMaFilterTF, ShelleysMaFilterPeriodMa1, ShelleysMaFilterShift, ShelleysMaFilterMethod, ShelleysMaFilterAppliedPrice, 0);
double LWMA240 = GetMa(CurrentPair, ShelleysMaFilterTF, ShelleysMaFilterPeriodMa2, ShelleysMaFilterShift, ShelleysMaFilterMethod, ShelleysMaFilterAppliedPrice, 0);
// Code: Select all
//ShelleysMaFilter, fxdaytrader
double ma1 = GetMa(CurrentPair, ShelleysMaFilterTF, ShelleysMaFilterPeriodMa1, ShelleysMaFilterShift, ShelleysMaFilterMethod, ShelleysMaFilterAppliedPrice, 0);
double ma2 = GetMa(CurrentPair, ShelleysMaFilterTF, ShelleysMaFilterPeriodMa2, ShelleysMaFilterShift, ShelleysMaFilterMethod, ShelleysMaFilterAppliedPrice, 0);
Code: Select all
if (UseShelleysMaFilter && !ShelleysMaFilter(type,askPrice,ma1,ma2)) //fx800
continue; Code: Select all
if (UseShelleysMaFilter && !ShelleysMaFilter(type,bidPrice,ma1,ma2)) //fx800
continue;