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
  #511 (permalink)  
Old 11-29-2008, 09:54 AM
Junior Member
 
Join Date: May 2008
Posts: 2
Sufian is on a distinguished road
Red face How to read MA value of different bar

Hi Guys,

Need some light here, could anybody clarify or code for me value of Moving average for the current bar, previous bar, and last 2 or 3 bars.
It does not matter method of moving average.

regards...sufian
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
  #512 (permalink)  
Old 11-29-2008, 11:34 AM
zupcon's Avatar
Senior Member
 
Join Date: Dec 2005
Location: Malta
Posts: 266
zupcon is on a distinguished road
CurrentBar=iMA(NULL,0,13,0,MODE_SMMA,PRICE_MEDIAN, 0);

PreviousBar=iMA(NULL,0,13,0,MODE_SMMA,PRICE_MEDIAN ,1);

TwoBarsAgo=iMA(NULL,0,13,0,MODE_SMMA,PRICE_MEDIAN, 2);

syntax for moving average function is:

double iMA( string symbol, int timeframe, int period, int ma_shift, int ma_method, int applied_price, int shift)

symbol - Symbol the data of which should be used to calculate indicator. NULL means the current symbol.
timeframe - Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.
period - Averaging period for calculation.
ma_shift - MA shift. Indicators line offset relate to the chart by timeframe.
ma_method - MA method. It can be any of the Moving Average method enumeration value.
applied_price - Applied price. It can be any of Applied price enumeration values.
shift - Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
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
  #513 (permalink)  
Old 11-30-2008, 07:25 PM
Junior Member
 
Join Date: Dec 2007
Posts: 15
da-net is on a distinguished road
A Question About MQL Programming Possibilities

I have searched through this forum and lots of others, used google, etc and have not been able to find answers to some questions...perhaps someone here has the answers I seek. I am not a programmer, but I am a good trader and understand the nuances of what I seek..I am not asking for any programmer to give away his craft, just info on possibilities

1...Is it possible to program an EA attached to one chart to execute directional or non directional trades in other crosses @ the same time. apply the same stop loss, etc ? eg: EUR/USD and GBP/USD

2...Is it possible to have a TS that tightens as the trade progresses? eg: start with 50 pip TS and every X time reduce 10, 15 etc pips
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
  #514 (permalink)  
Old 11-30-2008, 10:48 PM
Senior Member
 
Join Date: Nov 2006
Posts: 308
luxinterior is on a distinguished road
Yes both of those things are possible. If you're not a programmer it might take you some time but all the information and resources you need are right here.

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
  #515 (permalink)  
Old 11-30-2008, 11:58 PM
Senior Member
 
Join Date: Apr 2006
Location: Oregon
Posts: 116
67-17454 is on a distinguished road
Void vs. Int

For a function, including start(), etc. is there any benefit or consequence to having it as an in ("int start()") versus a void ("void start()") if you never check the result of the returned result of the function?

I see many functions that are routinely defined as an int (init(), deinit(), start())but the value is never checked. I don't know if it is just wasted cycles (albeit tiny ones) in having them as int versus void.

Thanks.
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
  #516 (permalink)  
Old 12-01-2008, 12:22 AM
Junior Member
 
Join Date: Dec 2007
Posts: 15
da-net is on a distinguished road
Quote:
Originally Posted by luxinterior View Post
Yes both of those things are possible. If you're not a programmer it might take you some time but all the information and resources you need are right here.

Good luck

Lux
Thanks for the info. I had already taken Steve's email course and that is precisely what helped me to understand more about what I truly need. I did email him asking if he would assist but never got a response. I will try to find the answers to what I seek within these pages as you suggest. Hopefully I can understand enough to put an EA together that I want while trading.
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
  #517 (permalink)  
Old 12-01-2008, 02:50 AM
MANSTIR's Avatar
Senior Member
 
Join Date: Nov 2007
Posts: 162
MANSTIR is on a distinguished road
does someone here have source code for sms alert for yahoo messenger? & source code for close all day trade if achieve target profit?

i already make it the source code but wont work.... thanks...

regards,

MANSTIR
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
  #518 (permalink)  
Old 12-02-2008, 12:34 AM
Junior Member
 
Join Date: Feb 2007
Posts: 16
lhookway is on a distinguished road
WindowBarsPerChart() Problem

Hi there,


I have a problem with the WindowBarsPerChart() function (see attached screenshot) that I hope someone can help me with.


The screenshot shows a standard chart that I have scrolled all the way to the right so that the rightmost bar is bar 0.


I run a simple script that prints the values of WindowBarsPerChart() and WindowFirstVisibleBar(), the output of which you can see in the Experts tab of the screenshot.


WindowBarsPerChart returns a value of 39 and WindowFirstVisibleBar returns a value of 39.


If you count the bars on the screenshot right to left starting at 0 then the leftmost bar (the first visible bar) is indeed 39 which is correct which means there are 40 bars visible on the chart.


However WindowBarsPerChart() returns a value of only 39 which is incorrect since the value should be actually 40.


Can anyone offer any insight as to why WindowBarsPerChart() appears to return an incorrect value?


Regards,


Laurence.
Attached Images
File Type: jpg bars.jpg (364.4 KB, 117 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
  #519 (permalink)  
Old 12-02-2008, 01:56 AM
Senior Member
 
Join Date: Oct 2008
Location: Vancouver, BC
Posts: 159
Roger09 is on a distinguished road
To lhookway
Command WindowBarsPerChart() shows you how many whole bars could be shown in the window with your dimension. So you can see you have 39 whole bars and half. If you increase your horizontal for half bar, you will see -WindowBarsPerChart() =40
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
  #520 (permalink)  
Old 12-03-2008, 09:04 AM
Senior Member
 
Join Date: Apr 2008
Location: Rawalpindi
Posts: 106
arshadFX is on a distinguished road
Problem in NormalizeDouble

I need 5th 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, 15 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
Reply

Bookmarks

Tags
automated close order, close, eas, forex, learn mql4, learn mql4 video, learning mql4, mini std lotsize risk, mql4 ima, mql4 learning, mql4 video, OrderCloseBy, profit, reach, secure profit function, T101_v1.11_orest_IBFXm.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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Learning Cycles For New Traders Dan7974 General Discussion 350 01-18-2008 07:04 PM
Learning to code for autotrading GoatT MetaTrader 8 01-10-2007 09:55 PM
Self learning expert mrtools Expert Advisors - Metatrader 4 32 10-22-2006 06:29 PM


All times are GMT. The time now is 10:39 PM.



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