Forex



Go Back   Forex Trading > Discussion Areas > Setup 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
  #1 (permalink)  
Old 02-09-2006, 11:45 AM
Senior Member
 
Join Date: Sep 2005
Location: St Louis, MO, USA
Posts: 176
cardio is an unknown quantity at this point
Thumbs up Using the Period Converter Script

Hi
I have struggled with the period converter script and had given up on it, until a friend gave me this explaination.

Using the Period Converter script
-Get the 1 minute data from Alpari (M1)
-Delete all the .hst files of the currency pair you want to import from your
MetaTrader's history folder (for example C:\Program files/MetaTrader 4/history/InterbankFX Demo)
-In MT go to Tools -> Options and set max. bars in history and max. bars in chart to the
maximum by entering 99999999999 for each
-Go to Tools -> History Center and the currency pair you want to import and double click on M1. --Click on import and import the M1 data from Alpari that you just downloaded.
-Open a M1 chart of the currency pair
-Go to Tools -> History Center and the currency pair you want to import and double click on M1. Click on import
and import the M1 data from Alpari that you just downloaded.
-Drag the period converter script on to the chart and on the Inputs tab set the variable ExtPeriodMultiplier to 5 (for M5).
-After 30 sec or so doubleclick on the period_converter script in the MetaTrader Navigator window. This will stop the script the script and start it again. Click yes in the dialog box.
-Now start the script again and stop it after about 30 sec in the way described above with settings for ExtPeriodMultiplier of 15, 30, 60, 240 and 1440.
-Go to History Center, the currency you are importing, doubleclick on M5 and click on import. Now choose the path
C:\Program files/MetaTrader 4/history/InterbankFX Demo to import from and
there will be a file EURJPYM5 (if you are importing EURJPY) or similar, that the script just created.
Import from this file.
-Then go to M15 in the history center and import EURJPYM15 from C:\Program
files/MetaTrader 4/history/InterbankFX Demo
-Do the same for M30, H1 ... up tp D1
That's it
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
  #2 (permalink)  
Old 02-09-2006, 02:11 PM
codersguru's Avatar
Senior Member
 
Join Date: Oct 2005
Posts: 994
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Thumbs up period converter

Quote:
Originally Posted by cardio
Hi
I have struggled with the period converter script and had given up on it, until a friend gave me this explaination.
Hi cardio!
That's right. For more details review my article here:
http://www.metatrader.info/strategy-...er-part-2.html
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
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
  #3 (permalink)  
Old 02-09-2006, 02:36 PM
Senior Member
 
Join Date: Sep 2005
Location: St Louis, MO, USA
Posts: 176
cardio is an unknown quantity at this point
Great site

Great site

I wanted to post a question at your site - but could not find where to do so. Anyhow my question is - on backtesting I get 'profit factor' and 'profit' - now the most profitable results seldom have the highest profit factor. I guess one just has to choose parameters somewhere between between the two - and hope for the best.

I believe the higher profit ones where just luckier. I don't know. If you could discuss this in one of your articles it would be great. I attach the current results for my optimize test on ema_cross on the USDJPy daily
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
  #4 (permalink)  
Old 02-09-2006, 02:42 PM
Senior Member
 
Join Date: Sep 2005
Location: St Louis, MO, USA
Posts: 176
cardio is an unknown quantity at this point
the file

the file - struggling to post
Attached Files
File Type: txt ema_cross_usdjpy_optimize_try2.txt (24.1 KB, 109 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
  #5 (permalink)  
Old 02-09-2006, 02:47 PM
codersguru's Avatar
Senior Member
 
Join Date: Oct 2005
Posts: 994
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Arrow

Quote:
Originally Posted by cardio
the file - struggling to post
Which EA you used? what's the MM strategy you used?
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
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
  #6 (permalink)  
Old 02-09-2006, 05:04 PM
Senior Member
 
Join Date: Sep 2005
Location: St Louis, MO, USA
Posts: 176
cardio is an unknown quantity at this point
ema_cross_2

Hi
oops - I see I posted results with MM.

does MM stand for Money Management?

here are the results so far with no MM. (see attach). I stopped the test - it has been running now for about 12hrs. I don't know if all the test results posted as it says it was doing more runs, but on the optimization results no new results were posting - may be 5740 is the max number of runs.

I am using a slightly modified version of ema_cross_2 - I just added my MM, but modified the code before the test that it should not use the MM. That is all - it is suppose to always only buy 1 lot.

On live account I see my MM function is not working as planned - - whoa LOL (lots of laughs) that is scary. So I better try modify it.

I don't understand why my MM is not working right - have a look and see what you think

Code:
///////////////////////////////////////////////////////////////////////

//call by
Lots = Lotsize1(50,0.1,Symbol(),"mini");

double Lotsize1(int stoploss1, double risk1, string symbol1, string std_or_mini)
{
/* returns the number of lots one can buy for a certain symbol 
 * for a given risk level and stoploss. Returns Max 100 lots.
 * The pip values for the function come from http://www.interbankfx.com/calculator.htm
 * if you use a currency other then the dollar - get your own values.
 * Inputs
 * 1 stoploss1 - what is your stoploss i,e, 10, 20, 30 etc pips, ensure that trailingstop is
 *              - less then stoploss1
 * 2 risk1 - how much of your accounts free margin are you willing to loss
 *         0.03 for 3%, 0.1 for 10%
 * 3 std_or_mini - enter "std" for a standard or demo account, where the minimum transaction size is
 * 				   1 lot of 100,000 of the base currency or enter 
 * 				   "mini" - where the minimum transaction size is 1/10th 
 *                  the size of a standard lot, or 10,000 of the base currency.  
 * 4 symbol2 : the symbol your dealing with e.i. "EURUSD"
 * The function determines your accounts leverage
 * and returns the number of lots that you can then purchase
 */

double AccountLeverage1; //the leverage of the current account
double pip; //one pip price - from http://www.interbankfx.com/calculator.htm
            //this changes automatically based on either 'std' or 'mini'
double lots1;   
//tocheck: before attaching EA - are your symbol definitions right?
if(symbol1 == "EURUSD" || symbol1 == "GBPUSD")
{
pip = 10;
}
else if(symbol1 == "USDCHF")
{
pip = 8.1;
}
else if(symbol1 == "USDJPY")
{
pip = 8.4; 
}
//TODO: Actually if it can't find the right symbol - fail gracefully.
else return(0);// problem - just expand to include all symbols trading with


if (std_or_mini == "mini") // transaction size is 1/10th the size of a standard lot
{
pip = pip/10;
}
AccountLeverage1 = AccountLeverage();
pip = pip*AccountLeverage1/100;

//TODO: Don't loss more then risk% of AccountFreeMargin - not working right now
lots1 = NormalizeDouble(((AccountFreeMargin()/(stoploss1*pip))*risk1),2);
	
if  (lots1 > 50)
{
	if (std_or_mini == "mini")
	{
	lots1 = 50;
	return(lots1);
	}

if  (lots1 > 100)
{
   lots1 = 100;
   return(lots1);
}
}


	return(lots1);
}

 /////////
So I am stuck again - I don't know if these attach results are without MM - I believe they are - but there are doubts as I had to stop the test. I will run a small test - much later - to check.

Any advice?
Attached Files
File Type: txt final_stopped_optimze.txt (791.4 KB, 52 views)

Last edited by cardio; 02-10-2006 at 02:51 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
  #7 (permalink)  
Old 02-09-2006, 10:40 PM
Senior Member
 
Join Date: Sep 2005
Location: St Louis, MO, USA
Posts: 176
cardio is an unknown quantity at this point
I found the problem

At interbankfx you have to put "EURUSDm" when trading EURUSD.
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
  #8 (permalink)  
Old 02-11-2006, 05:25 AM
Member
 
Join Date: Jan 2006
Posts: 51
blooms is on a distinguished road
Quote:
Originally Posted by codersguru
Hi cardio!
That's right. For more details review my article here:
http://www.metatrader.info/strategy-...er-part-2.html
Page not found
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
  #9 (permalink)  
Old 02-11-2006, 02:17 PM
codersguru's Avatar
Senior Member
 
Join Date: Oct 2005
Posts: 994
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Arrow

Quote:
Originally Posted by blooms
Page not found
This is the link:
http://metatrader.info/strategy-test...er-part-2.html
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
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
  #10 (permalink)  
Old 02-11-2006, 03:35 PM
Member
 
Join Date: Jan 2006
Posts: 51
blooms is on a distinguished road
Quote:
Originally Posted by codersguru
Thanks a trillion.
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
period converter, period converter script, metatrader period converter, period converter metatrader, mt4 period converter, period converter script metatrader, metatrader period converter script, period converter mt4, The Period Converter


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
Period Converter script ra300z Metatrader 4 12 10-20-2007 01:36 PM
expire period ? dr_waleed Metatrader 4 4 06-13-2006 07:00 PM
2 Period ROC on Chart saslam Indicators - Metatrader 3 2 03-15-2006 10:38 PM


All times are GMT. The time now is 09:54 AM.



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