Forex



Go Back   Forex Trading > Programming > MetaTrader
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
  #1471 (permalink)  
Old 11-30-2008, 06:52 PM
Senior Member
 
Join Date: Oct 2008
Location: Vancouver, BC
Posts: 158
Roger09 is on a distinguished road
Quote:
Originally Posted by fercan View Post
what's the difference? between

val=High[iHighest(NULL,PERIOD_H1,MODE_HIGH,20,4)];
and
val=iHighest(NULL,PERIOD_H1,MODE_HIGH,20,4);

will the value be differents every new bar?
iHighest - it is a number of the bar with Highest price
High - the high price of this bar
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
  #1472 (permalink)  
Old 12-02-2008, 07:16 AM
Member
 
Join Date: Aug 2008
Posts: 36
fercan is on a distinguished road
Quote:
Originally Posted by Roger09 View Post
iHighest - it is a number of the bar with Highest price
High - the high price of this bar
Base from my example, what is the different between the 2?
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
  #1473 (permalink)  
Old 12-02-2008, 09:17 AM
Senior Member
 
Join Date: Nov 2006
Posts: 308
luxinterior is on a distinguished road
Quote:
Originally Posted by fercan View Post
Base from my example, what is the different between the 2?
As explained above iHighest will return the shift of the bar with the highest value and High will tell you the actual high value of a bar.

So if the current bar is shift 0 and you ask the iHighest of say the last 13 bars the result may be, for example 9, meaning the 10th bar back had the highest value. Now if you wanted to actually know what the value was you'd need to use the High function.

Good luck

Lux
__________________
Build An Expert Advisor. FREE E-course As Seen On TV
ForexArea.com
Users of Gap Trader from 'Forex-Assistant' MUST Read This
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
  #1474 (permalink)  
Old 12-02-2008, 10:05 AM
Member
 
Join Date: Aug 2008
Posts: 36
fercan is on a distinguished road
Quote:
Originally Posted by luxinterior View Post
As explained above iHighest will return the shift of the bar with the highest value and High will tell you the actual high value of a bar.

So if the current bar is shift 0 and you ask the iHighest of say the last 13 bars the result may be, for example 9, meaning the 10th bar back had the highest value. Now if you wanted to actually know what the value was you'd need to use the High function.

Good luck

Lux
ok thanks lux..
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
  #1475 (permalink)  
Old 12-03-2008, 03:38 AM
Senior Member
 
Join Date: Aug 2008
Location: London
Posts: 138
Limstylz is on a distinguished road
Total long and short positions

Hi Everyone,

Can someone please advise me how to programatically find the total number of long positions open and the total number of short postions open in MT4? I do not want the total number of all positions open together. My requirement is that I keep the same number of short and long positions open at the same time. eg:

Lets say I have a user-defined number of trades which are open concurrently, with an equal number of long and short positions. Some short and long positions close. I need to reopen an equal amount of short and long positions up to the user-defined limit.

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
  #1476 (permalink)  
Old 12-03-2008, 04:31 AM
Senior Member
 
Join Date: Dec 2006
Posts: 109
dwmcqueen is on a distinguished road
Count Bars Since Order Opened

Anyone write a routine to determine the number of bars since an order opened?
__________________
Visit http://www.openthinkingsystems.com for EA signal distribution systems, MetaTrader and Collective2 integration and general custom development.
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
  #1477 (permalink)  
Old 12-04-2008, 07:37 AM
Senior Member
 
Join Date: Apr 2008
Location: Rawalpindi
Posts: 106
arshadFX is on a distinguished road
Problem in NormalizeDouble

I need 5 digit after decimal from price quote, it will display when using DoubleToStr function. I want to store a vlue get from object and use it for further calcullation i.e "price2"
could anyone please help me to solve this problem
Attached Files
File Type: mq4 ObjGet.mq4 (1.3 KB, 13 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
  #1478 (permalink)  
Old 12-04-2008, 03:34 PM
Junior Member
 
Join Date: Nov 2008
Posts: 2
paypascal is on a distinguished road
Need help with my indicator.

My indicator does not work properly, the indicator works fine on screen but when I try to use in an EA and let it Alert(iCustom(....)); it gives an enormous value.

TSD = iCustom(NULL,0,"Pascal_Indicator1",0,0);
Alert(TSD); // gives 214723948223...

The indicator 's code is :
Code:
int start()
  {
   int    counted_bars=IndicatorCounted();
   if(counted_bars <= 0) return(0);

   int i = counted_bars;
   while(i >= 0){
      if(i > 0){
         ExtMapBuffer1[i] = calculateData();
      }
      i--;
   }
   return(0);
  }
I must be doing something dramatically wrong

Pascal.
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
  #1479 (permalink)  
Old 12-04-2008, 05:12 PM
Senior Member
 
Join Date: Oct 2008
Location: Vancouver, BC
Posts: 158
Roger09 is on a distinguished road
To Pascal
Do you have the Parameters set for your indicator?

Last edited by Roger09; 12-04-2008 at 06:04 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
  #1480 (permalink)  
Old 12-04-2008, 06:56 PM
Junior Member
 
Join Date: Nov 2008
Posts: 2
paypascal is on a distinguished road
Quote:
Originally Posted by Roger09 View Post
To Pascal
Do you have the Parameters set for your indicator?
It does not have any parameters and as I said it looks fine on screen only the function returns this huge number.
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
#include, candle time, CHinGsMAroonCLK, code, coders guru, conditionally, dll, eli hayun, Eur_harvester.ex4, expert adviser, expert advisor, forex, higher high, how to code, indicator, I_XO_A_H, kehedge, mechanical trading, metatrader command line, mt4, MT4-LevelStop-Reverse, OrderReliable.mqh, programming, rectangle tool, trading, volty channel stop


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to code this? iscuba11 Metatrader 4 mql 4 - Development course 1 08-03-2007 05:22 PM


All times are GMT. The time now is 11:43 PM.



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