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.
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.
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).
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
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.
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.
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.
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?
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
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