Forex



Go Back   Forex Trading > Training > Metatrader > Metatrader 4 mql 4 - Development course > Questions
Forex Forum Register More recent Blogs Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #331 (permalink)  
Old 09-02-2006, 08:41 AM
AnasFX's Avatar
Junior Member
 
Join Date: Jul 2006
Posts: 5
AnasFX is on a distinguished road
Quote:
Originally Posted by phoenix
in that loop you can check all related whit the order... function

try search the word "order" in the "search" tab of the "Navigation" window
you will find all function about order

to compair with the bar time use Time[0] or iTime(..) function

like if(orderclosetime()>Time[0]) blockopen=true;
Ok it worked, but now the problem is performance. Checking the whole history takes time. I did a backtest for a year and a half period and I noticed that it is slow. The reason is that I am checking all orders in history and compare thier close price and close time. So, is there anyway to limit the history search to make it search only the recent orders? Can I increase the performance anyhow?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #332 (permalink)  
Old 09-02-2006, 09:44 AM
iscuba11's Avatar
Senior Member
 
Join Date: May 2006
Location: Houston
Posts: 398
iscuba11 is on a distinguished road
Question How do you Transfer Variable value from indicator to An EA??

////////////////////INDICATOR VALUES/////////////////////////

HourChannel_v1.MQ4
Setup: Hours = 3;

double Width=0;

Width = price_p0-price_02;


Comment("",
"\n",

"\n","Current High Channel = ",price_p0,

"\n","Current Low Channel = ",price_02,
"\n","Current Width = ",Width
);
///////////////////////////////////////////////////////////////////////////////////


////////////////////////////////NEED HELP BELOW//////////////////////////////


>>>How do I create a statement to transfer the "Width" variable value from the Hour Channel indicator into an EA????


double val= iCustom(NULL,0,"HoursChannel_v1", (NOW WHAT??)

Please Lend Me Your Expertise - Important!!

Last edited by iscuba11; 09-03-2006 at 08:20 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #333 (permalink)  
Old 09-02-2006, 07:28 PM
Warren's Avatar
Junior Member
 
Join Date: Jan 2006
Posts: 9
Warren is on a distinguished road
How to Disable EA on the definite day

Dear colleagues!

Are there exist possibilities to create piece of code which can disable opreation of Expert Advisor on the definite week's day, for example: Monday, Tuesday...etc.?

I'm not a programmer and that's why I ask for Your advice & help

Best regards,
Warren
__________________
Short Term Pain for Long Term Gain!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #334 (permalink)  
Old 09-03-2006, 01:07 PM
iscuba11's Avatar
Senior Member
 
Join Date: May 2006
Location: Houston
Posts: 398
iscuba11 is on a distinguished road
PHP Code:
if (UseHourTrade)

      {      
 
int a=0;
 
int b=0;
 
int c=0;
       
if(!(
Hour()>=FromHourTrade1 && Hour()<=ToHourTrade1)) a=1

if(!(
Hour()>=FromHourTrade2 && Hour()<=ToHourTrade2)) b=1

if(!(
Hour()>=FromHourTrade3 && Hour()<=ToHourTrade3)) c=1

if(
a==&& b==&& c==1)   

      {
      
      
Comment(
      
"\n","  * SOLAR WIND EXPERT ADVISOR *",
      
"\n",
      
"\n""      - PROGRAM IN SLEEP CYCLE - ",
      
"\n",
      
"\n","        > NON-TRADING HOURS! <");
      
      return(
0);
      }
      } 

Adapt this code using below:

PHP Code:
int DayOfWeek( ) 
Returns the current zero-based day of the week (0-Sunday,1,2,3,4,5,6of the last known server time.
NoteAt the testingthe last known server time is modelled
Sample:
  
// does not work on holidays.
  
if(DayOfWeek()==|| DayOfWeek()==6) return(0); 
extern bool UseHourTrade=false; Change statements to: UseDayOfWeek=false;

extern bool Monday=true;

extern bool Tuesday=true;

extern bool Wednesday=true;

extern bool Thursday=True;

extern bool Friday=True;

Good Luck! P.S. || is the same as (or). Try substituting Hour() with: if(!(DayOfWeek()=2 && Tuesday=true)) a=1;


I am not an expert at coding, but this should get you in the ballpark!

Last edited by iscuba11; 09-03-2006 at 07:32 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #335 (permalink)  
Old 09-03-2006, 06:45 PM
Warren's Avatar
Junior Member
 
Join Date: Jan 2006
Posts: 9
Warren is on a distinguished road
To iscuba11 !

Thanks a Lot for Your response!
__________________
Short Term Pain for Long Term Gain!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #336 (permalink)  
Old 09-03-2006, 07:40 PM
european's Avatar
Senior Member
 
Join Date: Apr 2006
Posts: 282
european is on a distinguished road
Choppy or flat market

Anybody can recommend indicator that shows choppy or flat market, when not to trade


euro
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #337 (permalink)  
Old 09-04-2006, 02:30 AM
Member
 
Join Date: Dec 2005
Posts: 69
richx7 is on a distinguished road
JMA Slope

JMA Slope on the bottom shows good and flat trading.
Attached Images
File Type: bmp jma slope.bmp (1.64 MB, 138 views)
Attached Files
File Type: mq4 JMASlope.mq4 (11.4 KB, 32 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #338 (permalink)  
Old 09-04-2006, 03:57 PM
phoenix's Avatar
Senior Member
 
Join Date: May 2006
Posts: 319
phoenix is on a distinguished road
Quote:
Originally Posted by AnasFX
Ok it worked, but now the problem is performance. Checking the whole history takes time. I did a backtest for a year and a half period and I noticed that it is slow. The reason is that I am checking all orders in history and compare thier close price and close time. So, is there anyway to limit the history search to make it search only the recent orders? Can I increase the performance anyhow?
you may try
OrderSelect(HistoryTotal(),SELECT_BY_POS,MODE_HIST ORY);

but i'm not sure for this one , i think it will pick up the last order in whole history

cheers
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #339 (permalink)  
Old 09-10-2006, 03:57 PM
ping's Avatar
Junior Member
 
Join Date: Aug 2006
Posts: 5
ping is on a distinguished road
hallo folk...

can anybody help me..
i have some indicator to create EA....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #340 (permalink)  
Old 09-11-2006, 02:18 AM
phoenix's Avatar
Senior Member
 
Join Date: May 2006
Posts: 319
phoenix is on a distinguished road
Quote:
Originally Posted by phoenix
you may try
OrderSelect(HistoryTotal(),SELECT_BY_POS,MODE_HIST ORY);

but i'm not sure for this one , i think it will pick up the last order in whole history

cheers
edited of mine fault..it has to be
OrderSelect(HistoryTotal()-1,SELECT_BY_POS,MODE_HISTORY);
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks

Tags
forex, histogram, JMASlope, ToR 1.20, ZUP_v1.mq4


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Off
Forum Jump


All times are GMT. The time now is 09:40 AM.



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