Need i_Trend expert for MT4
  #1 (permalink)  
Old 01-11-2006, 04:42 AM
gazuz's Avatar
Senior Trader and Moderat
 
Join Date: Aug 2004
Posts: 768
Thanks: 1
Thanked 8 Times in 5 Posts
gazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to all
Default Need i_Trend expert for MT4

Well I never really learned MT4 and don't have to work on it right now.

This is open to anyone, since it's really basic and extremely customizable...


Indicator : i_Trend
Variables : x; y (y is for takeprofit value); z (z is for stop loss); any other variables to control the i_Trend [i believe Bands_Period; Bands_Deviation; Power_Period; and CountBars (not sure about the latter one)]

So i_Trend has two values, Value1 and Value2. When Value1 is over Value2 that means its a buy, and if Value2 is over Value1 then its a sell.

What I would like to program is simplified like this:
If Value1-Value2>x then Buy and set take profit at value of y
If no other trades open then continue
If Value2-Value1>x then Sell and set take profit at value of y

[Note: I don't really want any delay, I noticed if tested well enough its ok if the expert acts directly, otherwise it might be too late and hit the stop loss too many times. In other words, do not wait until next candle to open or close a trade, just open it right when then tick appears]

If Buy position open and Value1<Value2 then Close
If Sell position open and Value1>Value2 then Close


For those who are curious I am thinking of using this for smaller timeframes, with a small amount of takeprofit. I don't think a trailing stop is very necessary. I am aiming for the small but multiple profits making a few pips at a time.

Attached is the custom indicator i_Trend

Thanks in advance and hope this is a good one
Attached Files
File Type: mq4 i_Trend.mq4 (3.3 KB, 282 views)
EA Shark +1064% Return
Stock Market Crash? No Problem!
We Are Making Profits As Usual. More Info
__________________
____________________________\¦/
___________________________(ò ó)
______________________o0o___(_)___o0o__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
Reply With Quote
Here you go the expert
  #2 (permalink)  
Old 01-13-2006, 07:40 AM
scorpion's Avatar
Administrator
 
Join Date: Aug 2004
Posts: 1,992
Thanks: 125
Thanked 383 Times in 152 Posts
scorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to behold
Send a message via MSN to scorpion Send a message via Yahoo to scorpion
Default Here you go the expert

Just coded the expert for you. Check it out in forward testing, see if it opens trade if the green line crosses red line or not.

Features:
  • Supports multiple timeframe + multiple pairs.
  • Trailing stop.
  • New crossover-checking method.

Enjoys!
Attached Files
File Type: mq4 i_Trend_Cross.mq4 (10.7 KB, 280 views)
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.

Last edited by scorpion : 01-13-2006 at 07:43 AM.
Reply With Quote
  #3 (permalink)  
Old 01-13-2006, 11:57 PM
gazuz's Avatar
Senior Trader and Moderat
 
Join Date: Aug 2004
Posts: 768
Thanks: 1
Thanked 8 Times in 5 Posts
gazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to all
Default

Thanks scorpion!

I'll wait for sunday night my time to check it, otherwise I don't know if InterbanFX is going to be open because its Martin Luther King Jr. day here.

I'll be sure to test it right when I can and post my best results whenever possible, thanks alot!!
__________________
____________________________\¦/
___________________________(ò ó)
______________________o0o___(_)___o0o__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
Reply With Quote
  #4 (permalink)  
Old 01-17-2006, 04:47 AM
gazuz's Avatar
Senior Trader and Moderat
 
Join Date: Aug 2004
Posts: 768
Thanks: 1
Thanked 8 Times in 5 Posts
gazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to all
Default

Hey scorpion,

So i was looking at the expert. I understand most of the Inputs but I'd like to know exactly what they are. So:

-the Evaluate Interval.. What exactly does this mean? is it -1 for instant cross, 0 for the candle after the cross and so on? Let me know if im right...

-TS Sensitivity, Mode and Dynamic Factor, How exactly do those work? I am guessing the Mode works with a 1, 2 maybe 3 but I dont know what they do, maybe i dont need to touch them. The dynamic factor is that when the x and y factors that I was talking about in the first post?

let me know whenever possible, take your time as I am in no rush
__________________
____________________________\¦/
___________________________(ò ó)
______________________o0o___(_)___o0o__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
Reply With Quote
  #5 (permalink)  
Old 01-17-2006, 06:46 AM
scorpion's Avatar
Administrator
 
Join Date: Aug 2004
Posts: 1,992
Thanks: 125
Thanked 383 Times in 152 Posts
scorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to behold
Send a message via MSN to scorpion Send a message via Yahoo to scorpion
Default

Here's you go gaz:

Settings:
  • Evaluate_Interval: Interval in minutes between each evaluation. This limit the number of trades in the same candle. Example, if set to 30, then there will be no more than 1 trade in 30 minutes. If -1, expert will evaluate logics on new candle (1 trade/candle). If 0, expert will evaluate logics every ticks (not recommended). If greater than 0, expert will evaluate every specified minutes.
  • TS_Trigger: Minimum distance in pips before initiate trailingstop.
  • TS_Mode and TS_Factor:
    • For buy order, when price rises:

      Mode 1. Fixed pips: SL is kept at a fixed pips from bid price.
      Mode 2. ATR: SL is moved accordingly to current Low price - (ATR14 * TS_Factor)
      Mode 3. Half Volatility: SL is moved accordingly to current Low - (High + Low)*TS_Factor

    • For sell order, when price falls:

      Mode 1. Fixed pips: SL is kept at a fixed pips from ask price.
      Mode 2. ATR: SL is moved accordingly to current High + (ATR14 * Factor)
      Mode 3. Half Volatility: SL is moved accordingly to current High + (High + Low)*Factor

  • TS_Sensitivity: Sensitivity of trailingstop. E.g. If set to 5, then SL is trailed every 5 pips move. It's not recommend to set TS_Sensitivity to 1, because mt4 cannot handle SL modification requests every pip move.
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.

Last edited by scorpion : 01-17-2006 at 06:48 AM.
Reply With Quote
  #6 (permalink)  
Old 01-18-2006, 03:49 AM
gazuz's Avatar
Senior Trader and Moderat
 
Join Date: Aug 2004
Posts: 768
Thanks: 1
Thanked 8 Times in 5 Posts
gazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to all
Default

Scorpion,

I'm sorry to ask again, this helped me but where exactly do I set the x's and y's like I explained? What are these all based on? just crosses or on the
value1-value2 and value2-value1?

I think from what I've seen this is just based on crosses of iTrend but i want to avoid that by using the substraction method. Otherwise the iTrend will make many useless trades that will fail the expert.

Please let me know,
Thanks
__________________
____________________________\¦/
___________________________(ò ó)
______________________o0o___(_)___o0o__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
Reply With Quote
  #7 (permalink)  
Old 01-18-2006, 06:41 AM
scorpion's Avatar
Administrator
 
Join Date: Aug 2004
Posts: 1,992
Thanks: 125
Thanked 383 Times in 152 Posts
scorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to behold
Send a message via MSN to scorpion Send a message via Yahoo to scorpion
Default

I see. You just want an additional value-based filter.

Gaz, you should check Evaluate_Interval out. It also limits the number of trade and false crosses.
Attached Files
File Type: mq4 i_Trend_Cross.mq4 (10.8 KB, 193 views)
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.
Reply With Quote
  #8 (permalink)  
Old 01-20-2006, 03:51 AM
gazuz's Avatar
Senior Trader and Moderat
 
Join Date: Aug 2004
Posts: 768
Thanks: 1
Thanked 8 Times in 5 Posts
gazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to all
Default

Hey scorpion,

this is going nicely, the onyl problem right now is ont he InterbankFX's side, its been disconnecting alot. I turned it on this morning, made 10 pips and lose 1 so basically ended up with 9 pips profit. I'm not quite sure if it followed any of the Trailing Stop or Stop Loss because I changed it in the expert after the trade opened.

I'll try to test it soon, but this disconnection is bugging me, Its the second time today and I read in the yahoo groups that its been doing that lately.

Hopefully InterbankFX will fix that otherwise I doubt I will be a future customer
__________________
____________________________\¦/
___________________________(ò ó)
______________________o0o___(_)___o0o__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
Reply With Quote
  #9 (permalink)  
Old 01-20-2006, 03:01 PM
gazuz's Avatar
Senior Trader and Moderat
 
Join Date: Aug 2004
Posts: 768
Thanks: 1
Thanked 8 Times in 5 Posts
gazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to all
Default

Well for some reason the expert is actually predicting the future? It's making sell trades before the itrend makes a cross. The indicator and the expert are on the same settings so i'm not sure what is going on. I missed a big move as well (whether it be big or small i have a 5pip take profit anyways) when my connection was lost...

I can't find any InterbankFX servers either so I can't find out if this is being worked on already
__________________
____________________________\¦/
___________________________(ò ó)
______________________o0o___(_)___o0o__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
Reply With Quote
  #10 (permalink)  
Old 01-23-2006, 11:24 PM
gazuz's Avatar
Senior Trader and Moderat
 
Join Date: Aug 2004
Posts: 768
Thanks: 1
Thanked 8 Times in 5 Posts
gazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to allgazuz is a name known to all
Default

Hey scorpion,

I was just wondering does the take profit and trailing stop include the spread? For example if I put 3 pips as a take profit and the InterbankFX spread is 2 does this mean after 5 pips it will close the trade or at 3?

Thanks
__________________
____________________________\¦/
___________________________(ò ó)
______________________o0o___(_)___o0o__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
___¦_____¦_____¦_____¦_____¦_____¦_____¦
¦_____¦_____¦_____¦_____¦_____¦_____¦__
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ZeroCode Sample: Create "10-Minute" Strategy Expert scorpion Tutorials, Tips & Tricks 16 04-14-2008 12:29 AM
ZeroCode Expert Running 3 Majors (?) Scicronys MetaTrader and ZeroCode 8 12-12-2007 09:58 AM
Support and Resistance Expert Advisor suffic369 Classified Ads 2 07-03-2006 07:57 AM
Calling out an expert gazuz MetaTrader and ZeroCode 1 10-21-2005 08:48 AM
Can not get the Expert to work...Help! jimbo61 MetaTrader and ZeroCode 2 08-19-2005 04:57 AM


All times are GMT. The time now is 05:47 AM.
Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0

Registered members have access to special online forex currency trading tools, software, mt4 expert advisors and indicators. Register now

Main Menu

Economic Forecast