HELP TO ADD ATR STOP LOSS TO MULTI 10.4 TRADER

fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: HELP TO ADD ATR STOP LOSS TO MULTI 10.4 TRADER

Post by fx800 »

fxdaytrader wrote:fx800 came up with one more suggestion - Using of pending stoporders and a improvement regarding the entries (see also BASA with pendingorders-thread).
We will implement this soon :)
Sorry, I forgot to add that we need a line to say the last candle must be below the daily pivot for a buy and above the DP for a sell. That means we want a PIVOT CROSS for trade entry.

The mod ea I sent you does not have this line yet

i.e. for buy, if ( iClose(CurrentPair, PERIOD_H4, 1) >= DailyPivot ) return;
Last edited by Anonymous on Sun Sep 29, 2013 4:04 pm, edited 1 time in total.
User avatar
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

Post by fxdaytrader »

yep, thanks - I'll have a look tomorrow :P
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: HELP TO ADD ATR STOP LOSS TO MULTI 10.4 TRADER

Post by fx800 »

One of the main drawbacks of the original ea is the big initial drawdown that it tends to incur. This is often caused by the ea entering trades too far away from the daily pivot.

I am going to use the daily pivot filter implemented by fxdaytrader recently to stop the ea from entering trades if ask > dailypivot + pipsfromdp / bid < dailypivot - pipsfromdp. It should not be too difficult to implement and I am sure many of you can do it yourself.

When it is tested and working, will post it here.

There won't be any more filters, otherwise, the ea will stop trading altogether. :lol:
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: HELP TO ADD ATR STOP LOSS TO MULTI 10.4 TRADER

Post by fx800 »

Forgot to turn off the CSS filter, so no trades yet from mod v1.32a.fxdaytrader, just two pending orders.
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: HELP TO ADD ATR STOP LOSS TO MULTI 10.4 TRADER

Post by fx800 »

Eurcad long taken below the daily pivot with the dp pivot turned on.

Shouldn't we use

Code: Select all

bool PivotFilterAllowsTrade(string symbol,int type) {
//returns false for BUY if ASK < DailyPivot, for SELL if BID > DailyPivot
 
double dailypivot = P; //P is computed in the function calculatePivots(string symbol)

if ( (type==OP_BUY || type==OP_BUYSTOP || type==OP_BUYLIMIT) && (MarketInfo(symbol,MODE_ASK) < dailypivot) ) return(false);
 else if ( (type==OP_SELL || type==OP_SELLSTOP || type==OP_SELLLIMIT) && (MarketInfo(symbol,MODE_BID) > dailypivot) ) return(false);

return(true);
}//end bool PivotFilterAllowsTrade() { 
You do not have the required permissions to view the files attached to this post.
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: HELP TO ADD ATR STOP LOSS TO MULTI 10.4 TRADER

Post by fx800 »

Second trade of the day CADCHF short
You do not have the required permissions to view the files attached to this post.
User avatar
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

Post by fxdaytrader »

<> ask/bid, maybe I confounded this. Thanks for fixing ;)

on my demo no trades so far, will turn off css etc. also. and then wait 8-)
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: HELP TO ADD ATR STOP LOSS TO MULTI 10.4 TRADER

Post by fx800 »

<> ask/bid, maybe I confounded this. Thanks for fixing
Are you saying the fix is OK ?

Would you like me to post the amended version here ?
Last edited by Anonymous on Mon Sep 30, 2013 10:33 pm, edited 1 time in total.
User avatar
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

Post by fxdaytrader »

Your code:

for BUYS:
ASK must be >= dailypivot (if not, then no trade)

for SELL:
BID must be <= dailypivot (if not, then no trade)

So in fact this does the same my code did, nearly the same - your code says that it must be higher or equal (sell: lower or equal) ...

Now I am confused, yes. :mrgreen:
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: HELP TO ADD ATR STOP LOSS TO MULTI 10.4 TRADER

Post by fx800 »

fxdaytrader wrote:Your code:

for BUYS:
ASK must be >= dailypivot (if not, then no trade)

for SELL:
BID must be <= dailypivot (if not, then no trade)

So in fact this does the same my code did, nearly the same - your code says that it must be higher or equal (sell: lower or equal) ...

Now I am confused, yes. :mrgreen:
I am even more confused than you are :roll:

I think for buy

if (ask <= daily pivot ) return (false);

For sell

if (bid >= daily pivot) return (false);
Post Reply

Return to “Coders Hangout”