Trend Line Trader

 

This Ea draws trendlines using fractal calculations you can choose either for a 2 fractal trend line or a 3 fractal trend line, the Ea should find 2 or 3(your choice) fractals that line up and draw trendline off that, and if down trend will draw trend lines on highs and on lows for uptrend, if close greater than trendline for buy and less than trend line for sell. There is an option to use moving average for confirmation it is coded is close greater or less than current close then buy or sell. On the chart been testing it on 5 minute timeframe and it's way too soon but for now looking good, another thing in the Terminal comments TLB_MULTIPASS BUY OR SELL was using the Multipass SSL indicator but didn't seem to test very well with the trend lines so changed to ma but forgot to change comments, the version i'm posting the comments should be correct. Also the Ea can use volty stops for trailing if desired.

 

Thanks a lot.

It is very interesting EA.

 

Bollinger Band Stops

Hi mrtools,

could you add a BB stop indi as well ? Indi is attached

Thanks

Files:
 
Boxter:
Hi mrtools,

could you add a BB stop indi as well ? Indi is attached

Thanks

Hi Boxter,

Hope you don't mind but added a jurik version of bb stops, if you prefer hardly any jurik just set the length to a low number, also made it as an option so like using the ma there is a true or false to use or not. Haven't been able to test so if you find any bugs let me know will fix them.

Files:
 

Hi MrTools,

I was wondering if it was possible for you to modify the original trendlinetrader EA (see attached) so that the buy/sell logic could be reversed. So if a sell was meant to be generated then a buy would occur instead and vice versa?

tlb.mq4

Peekaboo

Files:
tlb.mq4  42 kb
 
peekaboo:
Hi MrTools,

I was wondering if it was possible for you to modify the original trendlinetrader EA (see attached) so that the buy/sell logic could be reversed. So if a sell was meant to be generated then a buy would occur instead and vice versa?

tlb.mq4

Peekaboo

Hi Peekaboo,

Thanks for the idea and switched the buy/sell logic around on the trend lines and the confirmation Ma's, on the Ma's by default its a ma channel, but can be changed to how you like, but its using Close price greater than ma high is sell and Close less than Ma low then buy. Is this what you are looking for?

Files:
tlb-rev.mq4  42 kb
 
mrtools:
Hi Peekaboo, Thanks for the idea and switched the buy/sell logic around on the trend lines and the confirmation Ma's, on the Ma's by default its a ma channel, but can be changed to how you like, but its using Close price greater than ma high is sell and Close less than Ma low then buy. Is this what you are looking for?

Thanks for the quick update MrTools it is much appreciated, I'll test out the update and get back to you if I encounter any problems.

Peekaboo

 

Stop loss on Trend Line Trader

Hi MrTools,

I've noticed that on both TLB and TLB-rev versons of trend line trader that the EA sometimes changes the stop loss from the number that you specified to a wholly different number. For example, I've set the stop loss to 50 pips, but when I check the entry under the trade tab in Metatrader I notice that the stop loss has been set to something like 157 pips. I was wondering why the EA was doing this and is there any way to stop this behaviour from happening ?

Peekaboo

 
peekaboo:
Hi MrTools,

I've noticed that on both TLB and TLB-rev versons of trend line trader that the EA sometimes changes the stop loss from the number that you specified to a wholly different number. For example, I've set the stop loss to 50 pips, but when I check the entry under the trade tab in Metatrader I notice that the stop loss has been set to something like 157 pips. I was wondering why the EA was doing this and is there any way to stop this behaviour from happening ?

Peekaboo

Hi MrTools,

I think I managed to solve my problem above, I forgot to set useVolTrailingStop to false, *doh* me. Sorry. Though I still don't quite understand why sometimes it was using the predefined stop loss and then other times it was using the Volty channel stop.

Another thing that I noticed today was that the EA was changing the SL from my predefined SL of 76.145 to eventually 26.199 ( see the EA log below for USDJPY)

20:00:07 TLB USDJPY,M5: modify #13009542 buy 0.25 USDJPY at 76.195 sl: 76.145 tp: 0.000 ok

20:00:07 TLB USDJPY,M5: stop loss aplied

20:00:07 TLB USDJPY,M5: modify #13009542 buy 0.25 USDJPY at 76.195 sl: 0.000 tp: 76.695 ok

20:00:07 TLB USDJPY,M5: stop loss aplied

20:00:08 TLB USDJPY,M5: modify #13009542 buy 0.25 USDJPY at 76.195 sl: 26.189 tp: 0.000 ok

20:00:08 TLB USDJPY,M5: stop loss modified

20:00:10 TLB USDJPY,M5: modify #13009542 buy 0.25 USDJPY at 76.195 sl: 26.189 tp: 76.695 ok

20:00:10 TLB USDJPY,M5: stop loss aplied

20:00:52 TLB USDJPY,M5: modify #13009542 buy 0.25 USDJPY at 76.195 sl: 26.191 tp: 76.695 ok

20:00:52 TLB USDJPY,M5: stop loss modified

20:00:52 TLB USDJPY,M5: modify #13009542 buy 0.25 USDJPY at 76.195 sl: 26.193 tp: 76.695 ok

20:00:52 TLB USDJPY,M5: stop loss modified

20:00:56 TLB USDJPY,M5: modify #13009542 buy 0.25 USDJPY at 76.195 sl: 26.195 tp: 76.695 ok

20:00:56 TLB USDJPY,M5: stop loss modified

20:01:27 TLB USDJPY,M5: modify #13009542 buy 0.25 USDJPY at 76.195 sl: 26.197 tp: 76.695 ok

20:01:27 TLB USDJPY,M5: stop loss modified

20:01:27 TLB USDJPY,M5: modify #13009542 buy 0.25 USDJPY at 76.195 sl: 26.198 tp: 76.695 ok

20:01:27 TLB USDJPY,M5: stop loss modified

20:01:28 TLB USDJPY,M5: modify #13009542 buy 0.25 USDJPY at 76.195 sl: 26.199 tp: 76.695 ok

Any idea as to what is happening here ?

Peekaboo

 
peekaboo:
Hi MrTools,

I think I managed to solve my problem above, I forgot to set useVolTrailingStop to false, *doh* me. Sorry. Though I still don't quite understand why sometimes it was using the predefined stop loss and then other times it was using the Volty channel stop.

Another thing that I noticed today was that the EA was changing the SL from my predefined SL of 76.145 to eventually 26.199 ( see the EA log below for USDJPY)

20:00:07 TLB USDJPY,M5: modify #13009542 buy 0.25 USDJPY at 76.195 sl: 76.145 tp: 0.000 ok

20:00:07 TLB USDJPY,M5: stop loss aplied

20:00:07 TLB USDJPY,M5: modify #13009542 buy 0.25 USDJPY at 76.195 sl: 0.000 tp: 76.695 ok

20:00:07 TLB USDJPY,M5: stop loss aplied

20:00:08 TLB USDJPY,M5: modify #13009542 buy 0.25 USDJPY at 76.195 sl: 26.189 tp: 0.000 ok

20:00:08 TLB USDJPY,M5: stop loss modified

20:00:10 TLB USDJPY,M5: modify #13009542 buy 0.25 USDJPY at 76.195 sl: 26.189 tp: 76.695 ok

20:00:10 TLB USDJPY,M5: stop loss aplied

20:00:52 TLB USDJPY,M5: modify #13009542 buy 0.25 USDJPY at 76.195 sl: 26.191 tp: 76.695 ok

20:00:52 TLB USDJPY,M5: stop loss modified

20:00:52 TLB USDJPY,M5: modify #13009542 buy 0.25 USDJPY at 76.195 sl: 26.193 tp: 76.695 ok

20:00:52 TLB USDJPY,M5: stop loss modified

20:00:56 TLB USDJPY,M5: modify #13009542 buy 0.25 USDJPY at 76.195 sl: 26.195 tp: 76.695 ok

20:00:56 TLB USDJPY,M5: stop loss modified

20:01:27 TLB USDJPY,M5: modify #13009542 buy 0.25 USDJPY at 76.195 sl: 26.197 tp: 76.695 ok

20:01:27 TLB USDJPY,M5: stop loss modified

20:01:27 TLB USDJPY,M5: modify #13009542 buy 0.25 USDJPY at 76.195 sl: 26.198 tp: 76.695 ok

20:01:27 TLB USDJPY,M5: stop loss modified

20:01:28 TLB USDJPY,M5: modify #13009542 buy 0.25 USDJPY at 76.195 sl: 26.199 tp: 76.695 ok

Any idea as to what is happening here ?

Peekaboo

Hi Peekaboo,

First of all Thanks for your testing and Sorry didn't see your earlier post, but looks like you solved it, the volty trailing stop if used uses either the blue or red lines for trailing the trick is to make sure when in a trade say a buy that the buy volty is active, if working correctly the volty should cover your stop and trailing stop so may have to adjust your settings possibly mainly the volty timeframe, one thing i kept forgetting when i was using it on lower time frames to adjust the timeframe because i usually like a 4 hour volty trailing on 1 hour chart, but when i change to a 15 minute chart would forget and be using a 4 hr volty, which would make for a very large trailing stop. Also maybe an extra digit problem in the order modify routine which i think i may have fixed, but not able to test so not sure. Post these versions along with the regular volty stop, which may help in your setting it up.

ps) the volty inital stop is there, in case again your in a buy, the buy volty isn't in a buy yet, then the volty initial stop loss acts as kind of a safety net, if that would happen.

 

Just for the members who are going to use this new version - do not forget Volty Channel Stop on jurik-for Ea indicator from the first post of this thread (EA is using this indicator).

Reason: