Forex
Google
New signals service!

Go Back   Forex Trading > Discussion Areas > Metatrader 4


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-21-2006, 07:17 PM
Junior Member
 
Join Date: Jun 2006
Posts: 8
TWTrader is on a distinguished road
Need help with strategy

I simply need to have an expert that will enter at a specific time. For example if time = 1100 then buy or sell. Is this possible?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-21-2006, 07:28 PM
Senior Member
 
Join Date: Mar 2006
Posts: 787
Maji is on a distinguished road
Quote:
Originally Posted by TWTrader
I simply need to have an expert that will enter at a specific time. For example if time = 1100 then buy or sell. Is this possible?
Yes...

if(TimeHour(CurTime())==EntryHour && TimeMinute(CurTime())==EntryMin)
{
Buy...
Sell...
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-21-2006, 07:56 PM
Junior Member
 
Join Date: Jun 2006
Posts: 8
TWTrader is on a distinguished road
Thanks!

Also is it possible to have the High Low and Close for the day calculated from a certain time? For example:

If Time = 1100 then calculate High, Low and Close for today (last 11 hours)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 07-21-2006, 08:39 PM
Senior Member
 
Join Date: Mar 2006
Posts: 787
Maji is on a distinguished road
Try something like this:

LookBackHour = 11;
LookBack = MathCeil((LookBackHour*60)/Period());

Hi = iHigh(NULL, 0, Highest(NULL,0,MODE_HIGH,LookBack));
Lo = iLow(NULL, 0, Lowest(NULL,0, MODE_LOW,LookBack));
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 07-24-2006, 10:38 PM
Junior Member
 
Join Date: Jun 2006
Posts: 8
TWTrader is on a distinguished road
How do I hold the hi and lo values for the last calculation? because right now...when time is not equal to the input time, then it resets to 0.

Also is it possible to set a weekly target/stop?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 08-01-2006, 03:05 AM
Junior Member
 
Join Date: Jun 2006
Posts: 8
TWTrader is on a distinguished road
For some reason my EA will only trade once per day. I am trying to get it to enter at two seperate times throughout the day.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 08-01-2006, 03:32 AM
forexplayer's Avatar
Member
 
Join Date: May 2006
Posts: 34
forexplayer is on a distinguished road
Post your code here , we will try to help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 08-01-2006, 07:50 PM
Junior Member
 
Join Date: Jun 2006
Posts: 8
TWTrader is on a distinguished road
Ok..I got that problem figured out.

Is it possible to calculate P&L starting from Sunday to Friday and reset back to 0 at the close of Friday.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 08-08-2006, 07:31 PM
Junior Member
 
Join Date: Jun 2006
Posts: 8
TWTrader is on a distinguished road
I am trying to calculate a pivot point starting at 22:00, at this time it needs to look for the high and low since midnight (00:00) and the close at 22:00. I also would like know this value at any given time. For some reason what I am using below is not working, it stays 0 until 22:00, then if the EA is reloaded it resets to 0 again. Can someone please help?

//--------Calculate P1 Pivot--------//

double LookBackHour1, LookBack1 ;
static double P1, dHigh1, dLow1, dClose1 ;

if(TimeHour(CurTime())==22 && TimeMinute(CurTime())==0)

{
LookBackHour1 = 22;
LookBack1 = MathCeil((22*60)/Period());

dHigh1 = iHigh(NULL, 0, Highest(NULL,0,MODE_HIGH,LookBack1));
dLow1 = iLow(NULL, 0, Lowest(NULL,0, MODE_LOW,LookBack1));
dClose1 = Close[0] ;

P1 = (dHigh1 + dLow1 + dClose1)/3;
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
what the best strategy ??? jsw2006 General Discussion 13 09-04-2008 09:21 PM
25-34 strategy yossi1177 Expert Advisors - Metatrader 4 3 08-08-2008 12:03 AM
EMA 5 13 62 Strategy MarvinSk Expert Advisors - Metatrader 4 19 03-25-2007 04:08 PM
Strategy frantacech Metatrader 4 0 01-05-2007 05:43 PM
Need an EA for new GBP/USD strategy... wadeboxjr Metatrader 4 1 08-26-2006 09:12 AM


All times are GMT. The time now is 10:03 PM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.