Forex
Google
New signals service!

Go Back   Forex Trading > Metatrader Training > Metatrader 4 mql 4 - Development course > Questions


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 (2) Thread Tools Display Modes
  #371 (permalink)  
Old 09-23-2006, 09:15 PM
GreatYves's Avatar
Member
 
Join Date: Aug 2006
Posts: 31
GreatYves is on a distinguished road
Ok got it now.... Hummm i'm novice in programming... Instruction not very clear as to what part of code needed to be added to existing Indicator on buy/sell signal like the one in asctrend_sound.mq4... I get Compiling errors...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #372 (permalink)  
Old 09-24-2006, 04:54 AM
Senior Member
 
Join Date: Feb 2006
Posts: 111
tirou is on a distinguished road
HI CG,
I think the function sleep() can be called only in EA's.Is there any similar function available, to be called in custom indicator.Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #373 (permalink)  
Old 09-28-2006, 03:34 AM
Eaglehawk's Avatar
Senior Member
 
Join Date: Jun 2006
Posts: 141
Eaglehawk is on a distinguished road
Question

hey, codersguru!

i've looked through your lessons, and i didn't notice anything about using an include file, the concept is new to me, and i was wondering if you could explain anything that i might be doing wrong with the file, and how to use. maybe make a lesson about include files?

The work i've done, (with 110 errors?)

PHP Code:
//+------------------------------------------------------------------------------------------+
//| Day Off.mq4.mq4                                                                          |
//| Eaglehawk                                                                                |
//| http://www.forex-tsd.com/suggestions-trading-systems/3191-day-off-safety-detector.html   |
//+------------------------------------------------------------------------------------------+
#property copyright "Eaglehawk"
#property link      "http://www.forex-tsd.com/suggestions-trading-systems/3191-day-off-safety-detector.html"

//Global Variables

//I used variables to manually put in when Good Friday occurs, (I dont think it's possible to automate cycles of the moon, if you think so, go for it. I am, after all, a newcomer to coding ;) )
extern int GoodFridaysMonth 4//Used to see what month Good Friday is in. (either 4 or 5)
extern int GoodFridaysDay 12//says the day of the month good friday is on.

bool DayOff False// the days interbankfx takes off
bool DayOffClose False//operates the last minute close if none of the minimization techniques are met by the deadline

//local variables (both used to determine what trend we are in)
double CurrentClose iClose(NULL01); //looks at the close of the most recent period
double TrendClose iClose(NULL03); //looks at the close of three periods


/*Counts the DayOff Function as true about two days before the time interbankfx is not running, (you can edit this to how fast you think your individual strategy will take to close)

In case this code is tampered with, the dates interbankfx takes off are here

New Years Day                 January 1

Martin Luther King Jr. Day    January 20

Washington's Birthday         February 17

Good Friday                   Friday before Easter

Memorial Day                  May 26

Independence Day              July 4

Labor Day                     September 1

Thanksgiving Day              Fourth Thurday of November

Christmas                     December 25*/


//DayOff variable tests

if ( Month() == 12 && Day() >= 30 || Month() == && Day() <= //New Years Day
   
{
    
DayOff True;
   }
    
if (
Month() == && (Day() >= 18 && Day() <= 20)) //Martin Luther King Jr. Day
   
{
   
DayOff True;
   }
   
if (
Month() == && (Day() >= 15 && Day() <= 17)) //Washington's Birthday
   
{
   
DayOff True;
   }
   
if (
Month() == GoodFridaysMonth && (Day() <= GoodFridaysDay && Day() >= GoodFridaysDay 2)) //Good Friday
   
{
   
DayOff True;
   }
   
if (
Month() == && (Day() >= 24 && Day() <= 26)) //Memorial Day
   
{
   
DayOff True;
   }
   
if (
Month() == && (Day() >= && Day() <= 4)) //Independece Day
   
{
   
DayOff True;
   }

if ( 
Month() == && Day() >= 30 || Month() == && Day()== //Labor Day
   
{
   
DayOff True;
   }

if (
Month() == 11 && (DayOfWeek() >= && DayOfWeek() <=6)  && Day() >=21//Thanksgiving Day
   
{
   
DayOff True;
   }
   
if (
Month() == 12 && (Day() >= 23 && Day() <= 25)) //Christmas Day
   
{
   
DayOff True;
   }

//DayOffClose variable tests, currently set to 9:00 P.M.

if (Month() == 12 && Day() == 31 && Hour() == 21//New Years Day
   
{
   
DayOffClose True;
   }

if (
Month() == && (Day() == 19 && Hour() <= 21)) //Martin Luther King Jr. Day
   
{
   
DayOffClose True;
   }

if (
Month() == && Day() == 16 && Hour() == 21//Washington's Birthday
   
{
   
DayOffClose True;
   }

if ( 
Month() == GoodFridaysMonth && Day() == GoodFridaysDay && Hour() == 21//Good Friday
   
{
   
DayOffClose True;
   }

if (
Month() == && Day() == 25 && Hour() == 21//Memorial Day
   
{
   
DayOffClose True;
   }

if (
Month() == && Day() == && Hour() == 21//Independece Day
   
{
   
DayOffClose True;
   }
   
if (
Month() == && Day()== 31 && Hour() == 21//Labor Day
   
{
   
DayOffClose True;
   }

if (
Month() == 11 && Day() >=21 && DayOfWeek() <=6//Thanksgiving Day
   
{
   
DayOffClose True;
   }

if (
Month() == 12 && Day() == 24 && Hour() == 21//Christmas Day
   
{
    
DayOffClose True;
   }
   
//these next two functions will minimize loss on long, non-profitable trades before the close of interbankfx

if (DayOff == True && Ask-OrderOpenPrice() < && CurrentClose TrendClose 0)
   {
    
TrailingStopMode True;
   }

if (
DayOff == True && Ask-OrderOpenPrice() < && CurrentClose TrendClose 0)
   {
    
Order SIGNAL_CLOSEBUY;
   }

//these next two functions will minimize loss on short, non-profitable trades before the close of interbankfx

if (DayOff == True && OrderOpenPrice()-Bid <&& CurrentClose TrendClose 0)
   {
    
TrailingStopMode True;
   }
   
if (
DayOff == True && OrderOpenPrice()-Bid <&& CurrentClose TrendClose 0
   {
    
Order SIGNAL_CLOSESELL;
   }

//this next function will end all trades if not closed by 9:00 P.M. the day before the close of interbankfx

if (DayOffClose == True)
   {
    
Order SIGNAL_CLOSESELL;
   }

if (
DayOffClose == True)
   {
    
Order SIGNAL_CLOSEBUY;
   }

//post this at the end of all your open Logics

if (/*your open logics*/ && DayOff == False//order open

//post this as one of your exit short logics, closes trades when they are profitable

if (DayOff == True && OrderOpenPrice()-Bid >0)
   {
    
Order SIGNAL_CLOSESELL;
   }
   
//post this as one of your exit long logics, also closes profitable trades.

if (DayOff == True && Ask-OrderOpenPrice() >0)
   {
    
Order SIGNAL_CLOSEBUY;
   }
//+------------------------------------------------------------------+ 
__________________
"One's ability to accomplish his or her goals is limited only by the ingenuity of how one uses what he or she already knows."- Eaglehawk
REMEMBER,
"Genius is nothing but a greater aptitude for patience." –Benjamin Franklin

____________________________________

Have a simple ea you just can't figure out how to code??? Odds are you can make it here. Just remember to push complete when you're done, NOT SAVE!!!

http://sufx.core.t3-ism.net/ExpertAdvisorBuilder
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #374 (permalink)  
Old 09-28-2006, 06:20 AM
Junior Member
 
Join Date: Aug 2006
Posts: 1
bluewind is on a distinguished road
Question Hi! i want to known how could i get the top and the bottom of current chart window ?

is there some ways to get the top and bottom (in pixel and price)of current chart window?
another,how to create a timer procedure by widows API in MetaTrader4?

Last edited by bluewind; 09-28-2006 at 06:54 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #375 (permalink)  
Old 09-30-2006, 03:42 PM
Junior Member
 
Join Date: May 2006
Posts: 1
okwh is on a distinguished road
Is it possible to use .NET DLL for MT4?
How to use?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #376 (permalink)  
Old 10-02-2006, 10:10 PM
Member
 
Join Date: Dec 2005
Posts: 71
richx7 is on a distinguished road
It would be nice to have more info on making indicators since EAs are based on these. Alpari has some good tutors but they are in Russian:

http://www.alpari-idc.ru/ru/experts/articles/14.html
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #377 (permalink)  
Old 10-03-2006, 01:32 AM
dbbpj's Avatar
Junior Member
 
Join Date: May 2006
Posts: 14
dbbpj is on a distinguished road
Period_Converter_opt help

"I use this period converter attached to a chart to update custom charts in realtime. This works great except that if I open multiple charts of the same custom timeframe, only one chart uptates in realtime. The other charts appears offline and is updated only with the refresh menu option. For instance, if I open 2 or 3 16M charts only one is updated with new ticks; the others must be refreshed mannually. Is this limitation by design? (Period_Converter_Opt) Are there any workarounds for this situation? Suggestions, anyone?"

Posted this on another thread previously. Any ideas about this?

Cheers,
Diby
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #378 (permalink)  
Old 10-03-2006, 02:35 AM
dbbpj's Avatar
Junior Member
 
Join Date: May 2006
Posts: 14
dbbpj is on a distinguished road
Period_converter_Opt code

Extension to previous post:
I looked at the code briefly and my curosity would be: what WindowHandle returns in a case of multiple windows opened with the same symbol and timeframe.

if(hwnd == 0) {
//trying to detect the chart window for updating.... offline window
hwnd = WindowHandle(Symbol(), NewPeriod);
}

Cheers,
Diby
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #379 (permalink)  
Old 10-03-2006, 08:22 AM
Junior Member
 
Join Date: Sep 2006
Posts: 1
PT Ian is on a distinguished road
Buy 3 Sell 3 straddle script or EA - Any out there ?

Hello CG and also Newdigital if your about.

I am looking for an EA or script which once I have input the parameters will place above trades with SL and TP at the specified levels just by manually inputing a price level.

Essentially a straddle x 3.

Do you guys know of any such anywhere ?

Thanks and regards,
Ian.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #380 (permalink)  
Old 10-03-2006, 08:49 AM
Member
 
Join Date: Sep 2005
Location: Athens
Posts: 69
Yannis is on a distinguished road
Ian,
Check Straddle&Trail expert. you can find it here News and break out trading. Check this out.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Tags
histogram, forex

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

LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/questions/270-ask.html
Posted By For Type Date
OzFx System:) - Page 639 This thread Refback 06-21-2008 09:53 PM
Forex SRDC Sidus Sibkis EA MT4 Forum OTCSmart This thread Refback 12-08-2007 11:46 AM


All times are GMT. The time now is 07:28 PM.



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