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
  #111 (permalink)  
Old 06-15-2006, 03:42 AM
Member
 
Join Date: May 2006
Posts: 30
skorcht is an unknown quantity at this point
I assume this is for the HEIKEN issue..
I'll try it out

Thanks FROZONE

what's crazy is that I assumed that the 5's were the default thickness in the original code (they were 1's and 3's)
so i changed the 3's to 5's and restarted and it didn't work for some reason.

It Works now.
Thanks

Now i get the arrow to pop up based on RSI and i'll be happy
(have to color those candles based on another value but that's a later step)

Last edited by skorcht; 06-15-2006 at 03:50 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
  #112 (permalink)  
Old 06-16-2006, 04:23 AM
Member
 
Join Date: Feb 2006
Posts: 43
goover is on a distinguished road
Tradestation time filter code explanation help

Hi,

I am looking at a tradestation time filter code and since i never use tradestation before, i am not very sure about it. Anyone who has experienced with it can clarify it?

inputs:
time_offset(0), {EST Time}
begin_time(800),
end_time(1600);

if time >=begin_time + time_offset and time <=end_time + time_offset then begin


Is this time filter code saying trade will be initiated from 8.00 am - 4.00 pm EST time?

Thanks for helping.
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
  #113 (permalink)  
Old 06-16-2006, 04:29 AM
Senior Member
 
Join Date: Mar 2006
Posts: 793
Maji is on a distinguished road
The offset number of -100 is to be used when the data is in say Central Stand. You have to figure that one out.

As for the logic, it says if it is between 800 hrs and 1600 hrs, then begin to do something... like monitor for a certain set up.

Hope this helps.
Maji
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
  #114 (permalink)  
Old 06-16-2006, 05:12 AM
Member
 
Join Date: Feb 2006
Posts: 43
goover is on a distinguished road
Hi Maji,

Thanks for the confirmation and the offset comment. Now i know how to use the offset.
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
  #115 (permalink)  
Old 06-17-2006, 05:37 AM
Aaragorn's Avatar
Senior Member
 
Join Date: Jun 2006
Location: USA
Posts: 801
Aaragorn is on a distinguished road
lot scaling question ..need code help..

I know that I am responsible for taking my own risks when using any strategy. I don't want to scare anyone. I'm looking for some help with a code that I could put in an EA which would adjust the lot size of orders according to a percentage of the current free margin in the account and let me choose what percentage of that to enter the next position with.
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
  #116 (permalink)  
Old 06-20-2006, 05:06 AM
Junior Member
 
Join Date: Apr 2006
Location: Boston
Posts: 8
Gavner is on a distinguished road
Hey-
Set an external double like:

extern double RiskFraction=0.1;

Then in the "start(" add:

double Lots=(MathRound(AccountFreeMargin()*RiskFraction/10.0)/100);
....
OrderSend(Symbol(),OP_BUY,Lots,Ask,0,0,0,"EA Name",MagicNum,0,Green);


.1 means risk 10% of your account.

Good luck ,
Gavner
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
  #117 (permalink)  
Old 06-21-2006, 06:28 PM
Spider4896's Avatar
Member
 
Join Date: Apr 2006
Posts: 69
Spider4896 is on a distinguished road
Question

Quote:
Originally Posted by Gavner
Hey-
Set an external double like:

extern double RiskFraction=0.1;

Then in the "start(" add:

double Lots=(MathRound(AccountFreeMargin()*RiskFraction/10.0)/100);
....
OrderSend(Symbol(),OP_BUY,Lots,Ask,0,0,0,"EA Name",MagicNum,0,Green);


.1 means risk 10% of your account.

Good luck ,
Gavner

This is what i was looking for, for my EA.

Also, is there a part of code which will limit how many trades will be opened based on the Avaliable Margin.
Example: It will continue to open trades until 50% of the available Margin balance is used?

Thanks!

Spider~

Last edited by Spider4896; 06-22-2006 at 02:11 AM. Reason: Adding response
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
  #118 (permalink)  
Old 06-22-2006, 08:13 PM
Junior Member
 
Join Date: May 2006
Posts: 21
viktoriwan is on a distinguished road
Need Coders to Break The Code

Quote:
Originally Posted by viktoriwan
it goes something like this :
if(mov(zig(4,c),4,e) - mov(zig(9,c),7,e)
Hello... anyone notice this thread and want to help me ?
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
  #119 (permalink)  
Old 06-22-2006, 08:58 PM
Junior Member
 
Join Date: Jun 2006
Posts: 15
rbowles is on a distinguished road
Quote:
Originally Posted by viktoriwan
Hello... anyone notice this thread and want to help me ?
Mine has the zigzag formula built in. I am not sure if that is what you want but here it is.

//+------------------------------------------------------------------+
//| Custom Moving Average.mq4 |
//| Copyright © 2005, MetaQuotes Software Corp. |
//| http://www.metaquotes.net/ |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2005, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net/"

#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Red
//---- indicator parameters
extern int ExtDepth=12;
extern int ExtDeviation=5;
extern int ExtBackstep=3;
//---- indicator buffers
double ExtMapBuffer[];
double ExtMapBuffer2[];

//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
IndicatorBuffers(2);
//---- drawing settings
SetIndexStyle(0,DRAW_SECTION);
//---- indicator buffers mapping
SetIndexBuffer(0,ExtMapBuffer);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexEmptyValue(0,0.0);
ArraySetAsSeries(ExtMapBuffer,true);
ArraySetAsSeries(ExtMapBuffer2,true);
//---- indicator short name
IndicatorShortName("ZigZag("+ExtDepth+","+ExtDevia tion+","+ExtBackstep+")");
//---- initialization done
return(0);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int start()
{
int shift, back,lasthighpos,lastlowpos;
double val,res;
double curlow,curhigh,lasthigh,lastlow;

for(shift=Bars-ExtDepth; shift>=0; shift--)
{
val=Low[Lowest(NULL,0,MODE_LOW,ExtDepth,shift)];
if(val==lastlow) val=0.0;
else
{
lastlow=val;
if((Low[shift]-val)>(ExtDeviation*Point)) val=0.0;
else
{
for(back=1; back<=ExtBackstep; back++)
{
res=ExtMapBuffer[shift+back];
if((res!=0)&&(res>val)) ExtMapBuffer[shift+back]=0.0;
}
}
}
ExtMapBuffer[shift]=val;
//--- high
val=High[Highest(NULL,0,MODE_HIGH,ExtDepth,shift)];
if(val==lasthigh) val=0.0;
else
{
lasthigh=val;
if((val-High[shift])>(ExtDeviation*Point)) val=0.0;
else
{
for(back=1; back<=ExtBackstep; back++)
{
res=ExtMapBuffer2[shift+back];
if((res!=0)&&(res<val)) ExtMapBuffer2[shift+back]=0.0;
}
}
}
ExtMapBuffer2[shift]=val;
}

// final cutting
lasthigh=-1; lasthighpos=-1;
lastlow=-1; lastlowpos=-1;

for(shift=Bars-ExtDepth; shift>=0; shift--)
{
curlow=ExtMapBuffer[shift];
curhigh=ExtMapBuffer2[shift];
if((curlow==0)&&(curhigh==0)) continue;
//---
if(curhigh!=0)
{
if(lasthigh>0)
{
if(lasthigh<curhigh) ExtMapBuffer2[lasthighpos]=0;
else ExtMapBuffer2[shift]=0;
}
//---
if(lasthigh<curhigh || lasthigh<0)
{
lasthigh=curhigh;
lasthighpos=shift;
}
lastlow=-1;
}
//----
if(curlow!=0)
{
if(lastlow>0)
{
if(lastlow>curlow) ExtMapBuffer[lastlowpos]=0;
else ExtMapBuffer[shift]=0;
}
//---
if((curlow<lastlow)||(lastlow<0))
{
lastlow=curlow;
lastlowpos=shift;
}
lasthigh=-1;
}
}

for(shift=Bars-1; shift>=0; shift--)
{
if(shift>=Bars-ExtDepth) ExtMapBuffer[shift]=0.0;
else
{
res=ExtMapBuffer2[shift];
if(res!=0.0) ExtMapBuffer[shift]=res;
}
}
}
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
  #120 (permalink)  
Old 06-25-2006, 02:35 AM
Aaragorn's Avatar
Senior Member
 
Join Date: Jun 2006
Location: USA
Posts: 801
Aaragorn is on a distinguished road
Need Account triggered stop loss code..programmers wanted

I would like to use a stop loss that is triggered based on the account equity falling below the account balance by a specified percent. With one strategy something simple like ZERO percent should work ,but I'd like to be able to use this on other strategies too so I'd like to be able to specify a tolerance percentage of loss for each losing position this way. On triggering I would like it to close all open orders.

Could someone make this for me. I have a strategy that would really benefit from this. Trouble is that a traditional stop loss messes it up. If I can get the losers stopped out so they don't draw down the equity from the winners it should really rock and roll.

Last edited by Aaragorn; 06-25-2006 at 02:40 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
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 08:23 AM.



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