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 05-10-2007, 10:37 PM
Kurka Fund's Avatar
Senior Member
 
Join Date: Sep 2006
Location: San Diego
Posts: 139
Kurka Fund is on a distinguished road
Identifying Weekly bank transactions

In addition to the news, large bank transactions cause spikes in currencys. It is my uderstanding that many of these banks ( according to a friend at B of A ) make weekly transfers at a regulary scheduled time. What I am trying to do is identify these times before they happen and adjust my EA accordingally.

I figured that consistant spikes in price and volume would be a good way to identify these transactions ( or anything else that happens on a weekly basis and causes currencies to spike ). Here is my attempt to identify these times. Volume works but I cant seem to populate the Average_Hourly_Range variable.

Please take a look and tell me what I did wrong.

PHP Code:

//=========================================================================================
void HistoricVolitility(){
  
int      WeekInSeconds 604800;
  
int      HalfhourInSeconds 1800;
// Same Hour, Last Week 
  
datetime One_Week_Start       TimeCurrent() - WeekInSeconds HalfhourInSeconds;//current time -1 week - Half hour
  
datetime One_Week_Curr         TimeCurrent() - WeekInSeconds;//current time -1 week
  
datetime One_Week_End          TimeCurrent() - WeekInSeconds HalfhourInSeconds;//current time 1 week + Half hour
  
int      One_Week_Start_Per iBarShift(Symbol(),0,One_Week_Start);
  
int      One_Week_Curr_Per  iBarShift(Symbol(),0,One_Week_Curr);
  
int      One_Week_End_Per   iBarShift(Symbol(),0,One_Week_End);
  
double   OneW_High          High[iHighest(Symbol(),0,MODE_HIGH,One_Week_End One_Week_Start,One_Week_Start)];
  
double   OneW_Low           Low[iLowest(Symbol(),0,MODE_LOW,One_Week_End  One_Week_Start,One_Week_Start)];
  
double   OneW_Range         OneW_High OneW_Low;
  
double   One_Week_Volume    iVolume(Symbol(),30,One_Week_Curr_Per+1);
  
  
// Same Hour, 2 Weeks Ago
  
datetime Two_Week_Start       TimeCurrent() - WeekInSeconds*HalfhourInSeconds;//current time -1 week - Half hour
  
datetime Two_Week_Curr       TimeCurrent() - WeekInSeconds*2;//current time -1 week
  
datetime Two_Week_End          TimeCurrent() - WeekInSeconds*HalfhourInSeconds;//current time 1 week + Half hour
  
int      Two_Week_Start_Per iBarShift(Symbol(),0,Two_Week_Start);
  
int      Two_Week_Curr_Per  iBarShift(Symbol(),0,Two_Week_Curr);
  
int      Two_Week_End_Per   iBarShift(Symbol(),0,Two_Week_End);
  
double   TwoW_High          High[iHighest(Symbol(),0,MODE_HIGH,Two_Week_End Two_Week_Start,Two_Week_Start)];
  
double   TwoW_Low           Low[iLowest(Symbol(),0,MODE_LOW,Two_Week_End Two_Week_Start,Two_Week_Start)];
  
double   TwoW_Range         TwoW_High TwoW_Low;
  
double   Two_Week_Volume    iVolume(Symbol(),30,Two_Week_Curr_Per+1);
  
  
// Same Hour, 3 Weeks Ago
  
datetime Three_Week_Start      TimeCurrent() - WeekInSeconds*HalfhourInSeconds;//current time -1 week - Half hour
  
datetime Three_Week_Curr         TimeCurrent() - WeekInSeconds*3;//current time -1 week
  
datetime Three_Week_End         TimeCurrent() - WeekInSeconds*HalfhourInSeconds;//current time 1 week + Half hour
  
int      Three_Week_Start_Per iBarShift(Symbol(),0,Three_Week_Start);
  
int      Three_Week_Curr_Per  iBarShift(Symbol(),0,Three_Week_Curr);
  
int      Three_Week_End_Per   iBarShift(Symbol(),0,Three_Week_End);
  
double   ThreeW_High          High[iHighest(Symbol(),0,MODE_HIGH,Three_Week_End Three_Week_Start,Three_Week_Start)];
  
double   ThreeW_Low           Low[iLowest(Symbol(),0,MODE_LOW,Three_Week_End Three_Week_Start,Three_Week_Start)];
  
double   ThreeW_Range         ThreeW_High ThreeW_Low;
  
double   Three_Week_Volume    iVolume(Symbol(),30,Three_Week_Curr_Per+1);
  
  
// Same Hour, 4 Weeks Ago
  
datetime Four_Week_Start        TimeCurrent() - WeekInSeconds*HalfhourInSeconds;//current time -1 week - Half hour
  
datetime Four_Week_Curr        TimeCurrent() - WeekInSeconds*4;//current time -1 week
  
datetime Four_Week_End        TimeCurrent() - WeekInSeconds*HalfhourInSeconds;//current time 1 week + Half hour
  
int      Four_Week_Start_Per iBarShift(Symbol(),0,Four_Week_Start);
  
int      Four_Week_Curr_Per  iBarShift(Symbol(),0,Four_Week_Curr);
  
int      Four_Week_End_Per   iBarShift(Symbol(),0,Four_Week_End);
  
double   FourW_High          High[iHighest(Symbol(),0,MODE_HIGH,Four_Week_End Four_Week_Start,Four_Week_Start)];
  
double   FourW_Low           Low[iLowest(Symbol(),0,MODE_LOW,Four_Week_End Four_Week_Start,Four_Week_Start)];
  
double   FourW_Range         FourW_High FourW_Low;
  
double   Four_Week_Volume    iVolume(Symbol(),30,Four_Week_Curr_Per+1);
  
  
double Ave_Hourly_Range = (OneW_Range TwoW_Range ThreeW_Range FourW_Range);
  
double Ave_Volume       = (One_Week_Volume Two_Week_Volume Three_Week_Volume Four_Week_Volume)/4;
    
  
HistoricRange  Ave_Hourly_Range;
  
HistoricVolume Ave_Volume;
 

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
Where is the ECB (European Central Bank)??!! jgerousis General Discussion 1 04-16-2007 03:24 AM
Identifying trades from various EA's in A/C History rjay Metatrader 4 6 12-06-2006 11:54 AM


All times are GMT. The time now is 08:42 AM.



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