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
  #451 (permalink)  
Old 01-03-2007, 07:17 AM
Junior Member
 
Join Date: Dec 2006
Posts: 5
chief1oar is on a distinguished road
Unhappy Histogram

Well, here is another question as I continue to learn how to convert from MQL3 to MQL4....

I would like to paint a section of the chart which lies between two lines, upper and lower. I don't know if there is any function to paint a screen section or not, so I decided to try using the "Draw_Histogram" in the SetIndexStyle() statement. But, I don't quite understand how it works. When I use it, nothing happens.

ex:
SetIndexStyle(7,DRAW_HISTOGRAM,0,1);
ExtMapBuffer8[cnt]= (Pivot_Point-(Short_Line*Point));
Print("Cnt = ",cnt," Histo = ",ExtMapBuffer8[cnt]," Calc = ",(Pivot_Point+(Short_Line*Point)));

The output in the journal produces the proper cnt, the proper calc but the Histo value is zero.

I have examined the code in the MACD indicator, to no avail, and in the Heiken-Ashi indicator, and I fail to understand how it works. The Heiken-Ashi indicator appears to use 4 buffers to create each candle, but I am not certain of that.

The MACD appears to use a baseline of zero, from which the histogram bar is drawn, is there a baseline from which it starts? If so, how does one go about establishing it?

Could someone please explain how this function works,so that I may learn how to code it properly. If there is a function that would paint a specified screen section, I would appreciate any info on that as well.

Thank you all for your kind assistance....

Sincerely,

Chief
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
  #452 (permalink)  
Old 01-03-2007, 04:24 PM
Junior Member
 
Join Date: Dec 2006
Posts: 6
piptrix is on a distinguished road
Server Time Change

I saw a script to change your broker's server time to yours, and I can't find it again.

Can someone please tell me where to find it our attach the file.

Thanks in advance.

PT
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
  #453 (permalink)  
Old 01-03-2007, 11:47 PM
Junior Member
 
Join Date: Dec 2006
Posts: 5
chief1oar is on a distinguished road
Smile Histogram

Well, some more work and I think I may have come to understand the "Draw_Histogram" portion of the SetIndexStyle() statement....

To draw a Histogram requires two points on the Y axis, an upper point and a lower point. The "Draw_Histogram" function utilizes the last 2 buffer outputs to obtain those points. It appears the 1st buffer is the beginning point on the Y axis and the 2nd buffer is the ending point on the Y axis.

Here is an example:
//--------------------------------------------------//

SetIndexStyle(0,DRAW_LINE,2,1);
SetIndexStyle(1,DRAW_LINE,0,2);
SetIndexStyle(2,DRAW_LINE,0,2);
SetIndexStyle(3,DRAW_HISTOGRAM,0,1);

//---------------------------------------------------//

SetIndexBuffer(0,ExtMapBuffer1);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexBuffer(2,ExtMapBuffer3);
SetIndexBuffer(3,ExtMapBuffer4);

//---------------------------------------------------//

ExtMapBuffer1[cnt]= Pivot_Point ;
ExtMapBuffer2[cnt]= Pivot_Point+(Buy_Line*Point); // 1st Point
ExtMapBuffer3[cnt]= Pivot_Point+(Short_Line*Point); //2nd Point
ExtMapBuffer4[cnt]= (Pivot_Point+(Buy_Line*Point)); // Histogram output

//---------------------------------------------------//

The length of the Histogram line is the difference between these 2 buffer points. By altering the distance between these 2 points, the length of the Histogram line is altered as well.

Hope I am correct in my deductions... If anyone has anything to add please do.. I would like to know that I fully understand this function.

As well, hope this explanation might help someone else who is trying to utilize this function in their work.

Sincerely,
Chief
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
  #454 (permalink)  
Old 01-09-2007, 03:08 AM
Junior Member
 
Join Date: Dec 2006
Posts: 5
Halcyon is on a distinguished road
Crosses question

I am trying to code multiple crosses as conditions to enter the market. Such as (for example)

if (rsi is crossing 50 on its way up and MFI is crossing 40 on its way up)
{
do xyz;
}

I know this should be simple but I am having trouble with it. Any assistance appreciated. Thanks in advance.

Hal
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
  #455 (permalink)  
Old 01-11-2007, 08:06 AM
Fxfix's Avatar
Junior Member
 
Join Date: Sep 2005
Posts: 28
Fxfix is on a distinguished road
Could not upload

Last edited by Fxfix; 01-11-2007 at 08:18 AM. Reason: Could not upload files.
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
  #456 (permalink)  
Old 01-11-2007, 08:23 AM
Fxfix's Avatar
Junior Member
 
Join Date: Sep 2005
Posts: 28
Fxfix is on a distinguished road
Quote:
Originally Posted by increase
Hi,

Did anyone ever do this indicator with an alarm for you?
asaaadmy

This is what you are looking for.
I find that it is best on a 15M chart.
Attached Files
File Type: mq4 Z-Z1 LA Best Alert Next Bar.mq4 (5.6 KB, 74 views)

Last edited by Fxfix; 01-11-2007 at 08:30 AM.
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
  #457 (permalink)  
Old 01-13-2007, 04:00 AM
Junior Member
 
Join Date: Jan 2007
Posts: 1
ffbotha is on a distinguished road
I'm totally new to programming EA's, but I do now C++ and mostly the two languages seem to be the same, I just need some information about things specific to MetaTrader -

Firstly, how would you check if the moving average passed between the open and close of the previous candle, I would like the program to do this everytime a new candle starts forming.

So for this I would just like to know the following -

is there a function that returns the position of the moving average?
is there a function/s that returns the open and the close of the previous candlestick?
also is there a function that returns the current market value?

Secondly, what are the functions to buy and sell

I would appreciate any answers that could be given to these questions and apologize if these have been answered before, as navigating and searhing forums has never been one of my strong points.
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
  #458 (permalink)  
Old 01-13-2007, 04:58 AM
Nicholishen's Avatar
Senior Member
 
Join Date: Dec 2005
Posts: 531
Nicholishen is on a distinguished road
is there a function that returns the position of the moving average?
iMA()

is there a function/s that returns the open and the close of the previous candlestick?
iClose() , iOpen()

also is there a function that returns the current market value?
Bid,Ask or MarketInfo()

Secondly, what are the functions to buy and sell
OrderSend()

If you look at the navigator in the metaeditor, it will give you the perameters to be passed, and values returned
__________________
"Anyone who has never made a mistake has never tried anything new." -Albert Einstein
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
  #459 (permalink)  
Old 01-14-2007, 01:48 PM
Senior Member
 
Join Date: Feb 2006
Posts: 117
tirou is on a distinguished road
HI CG,
Could you please post an indicator to draw simultaneously the High and Low levels for 5 days.(5 high lines and 5 low lines).Thanks in advance.
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
  #460 (permalink)  
Old 01-14-2007, 05:40 PM
Junior Member
 
Join Date: Nov 2006
Posts: 22
majlisb is on a distinguished road
Hi all

is there any histogram indicator to draw arrow on chart not on separate window ? I want to have arrow when ADX cross a level but on hight/low of candle,

is there any sample to use that code ?

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 08:37 AM.



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