Forex
Google
New signals service!

Go Back   Forex Trading > Programming > Metatrader Programming


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack Thread Tools Display Modes
  #91 (permalink)  
Old 05-11-2007, 03:27 PM
Junior Member
 
Join Date: Sep 2005
Posts: 22
trohoang is on a distinguished road
Post Copying Objectlist

Hi there,

Beside using a template, is there a way that I can transfer object texts from one chart onto another?

This is what I have in mind. I have notes i.e. texts on the 4 hours chart and I would use an indicator called "save text". This indicator will save all the text using ObjectGetShiftbyValue and ObjectGet(...., objprop_time). I would then open up a new 1hr chart and attach an indicator called "transfer text". This will populate the new 1hr chart with texts from the 4hrs chart in the approximate location of time and price of the 4hrs chart.

Maybe I am making this more complicate than it should be. Any pointers???

Trong
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #92 (permalink)  
Old 05-12-2007, 04:46 PM
matrixebiz's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 1,122
matrixebiz is on a distinguished road
Proper use of Hedge order

For the guys using Hedge opening EA's for when the price goes against you, have you found it to be helpful? Just because if the price goes back into your favor before SL is hit then the Hedge order makes you loose your profit on the original order. or are there guidelines I should follow when opening a Hedge order? Like, open Hedge order when pips against me 30% of Original trade TP and set Hedge TP +110% SL -110% of original order? What are intelligent opposite % values you could use to create a Hedge order so as to cover minimal loss?
Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #93 (permalink)  
Old 05-16-2007, 12:04 AM
Member
 
Join Date: Jan 2006
Posts: 64
kidhudi is on a distinguished road
can someone change this macd

hey can one of you guys change this macd so it signals a change in color on the chart that is open? i would appreciate it
Attached Files
File Type: mq4 MACD HISTO.mq4 (3.3 KB, 4 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #94 (permalink)  
Old 05-17-2007, 06:31 PM
Junior Member
 
Join Date: Nov 2005
Posts: 2
krmo is on a distinguished road
Need help, I am trying to combine 2 indicators into 1?

First of all, thanks for any help received.

I am trying to combine a CCI histogram and ADX into one indicator.
Not as in overlaying, but the code in one file.
Similar to Woodies CCI, Except using the ADX instead of the LSMA.
I have started from scratch instead of trying to modify Woodies.

I have both of them displaying. The CCI is fine.
The ADX I am showing in a lineal fashion using DRAW_ARROW.
I have 2 problems:

A. I am getting no past history on the ADX. It just starts at the current bar, if I switch time frames it starts over. I would like it to show the previuos 200 bars.

B. I want the lineal ADX to align with the Level 0 of the CCI. It currently shows above or below depending on time frame.

Thanks again.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #95 (permalink)  
Old 05-21-2007, 01:25 PM
Junior Member
 
Join Date: May 2007
Posts: 1
fxwarrior is on a distinguished road
Help !

I am currently using FXCM and for the past couple of weeks been trying out Metatrader.

I have a problem, a simple one.

In my FXCM platform, when I set up the MACD... I get Linear MACD, MACDA and Histogram MACD.

However, in the Metatrader, I only got a Histogram and just a line.

Anybody can help me out with this problem ?

Sorry about my english.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #96 (permalink)  
Old 05-21-2007, 05:38 PM
Junior Member
 
Join Date: May 2007
Posts: 1
Nadaa is on a distinguished road
Something is wrong?

I'm trying to create an alert everytime the bar makes a new high/low compared to the previous bar. But in someway, it seems to miss some highs/lows. I can't find anything wrong with my code, but at the same time I can't figure out why?

Anyone?

Code:
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
  
  bool AlertOnce(int ref)
   {
      static int NewHigh = 0;
      static int FailedHigh = 0;
      
      switch(ref)
      {
         case 1:
            if(NewHigh == 0 || NewHigh < Bars)
               {
                  NewHigh = Bars;
                  return(true);
               }
         break;
         case 2:
            if(FailedHigh == 0 || FailedHigh < Bars)
               {
                  FailedHigh = Bars;
                  return(true);
               }
         break;
      }
  }
  
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int    counted_bars=IndicatorCounted();
//----

   if(High[0]>High[1] && AlertOnce(1)==true) Alert("1 working");
   if(Low[0]<Low[1] && AlertOnce(2)==true) Alert("2 working");


   
//----
   return(0);
  }
//+------------------------------------------------------------------+
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #97 (permalink)  
Old 05-22-2007, 10:44 AM
Junior Member
 
Join Date: Dec 2006
Posts: 13
Flirrrt is on a distinguished road
Check if Order is closed (and some .csv-stuff)

I'm trying to write a snippet that checks if a new trade just closed, and if that's true it will export some values to an csv.

My code looks like this:
Code:
datetime current=0;
   
   total = OrdersTotal();
   if(total > 0) current = CurTime();
   if(current != CurTime()) {
            int f = FileOpen(Symbol()+ATRthreshold+".csv", FILE_CSV | FILE_WRITE | FILE_READ,',');
  
            string sDate = TimeToStr(iTime(NULL,0,0),TIME_DATE);
            sDate = StringSetChar(sDate,4,'/');
            sDate = StringSetChar(sDate,7,'/');
            FileSeek(f, 0, SEEK_END);
            FileWrite(f,sDate, TimeToStr(iTime(NULL,0,0),TIME_MINUTES), iClose(NULL,0,0), iVolume(NULL,0,0));
            
            FileClose(f);
     }
I tried some different sulotions, both found here on the forum and at Meataqoutes homepage, but i can't get anyone to work properly. My own idea is the set a variabel with the date if a position is open (orderstotal > 0 ) and compare that to the current time ( if a position isn't open, the variabel will have an old value an thereby is not equal to CurrentTime() ).

Instead, i get the ea to write to the file every volume-change when an position is open.

What have i missed out?


And, another question - is it possible to change "," in a csv export to ";"?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #98 (permalink)  
Old 06-21-2007, 10:51 AM
Junior Member
 
Join Date: Apr 2006
Posts: 2
zanlin is on a distinguished road
EA that opens lot and time specified

I am looking for an EA that we can set lot and time ( based on server time).

If anyone knows where to find it, kindly drop the link here. appreciate so much.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #99 (permalink)  
Old 06-22-2007, 09:23 PM
iscuba11's Avatar
Senior Member
 
Join Date: May 2006
Location: Houston
Posts: 400
iscuba11 is on a distinguished road
Smile Need coding to close out positions created by EA on Friday just before close of week!

1) Can anyone help to provide the ea coding to close out all positions just before the market closes on Friday.

2) Also, coding needed to put each ea to sleep at the same time on Friday PM (So it does not open up any new positions) until Sunday PM when it will allow the ea to trade again.

My time zone is GMT -6.

Many thanks to your generosity in advance!

Dave
<><<<
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #100 (permalink)  
Old 07-13-2007, 05:32 PM
Junior Member
 
Join Date: Jun 2007
Posts: 8
Sean0 is on a distinguished road
Error 65 & 128 explanation

Hi, I was hoping someone could help me and explain a couple of errors I received while testing an EA I am writing.
I ran the EA through the night to see if it was working properly and when I woke there were a couple of errors that I can't find an explanation for.

Error(65) : Invalid Account
Error(128) : Trade Timeout
Error(129) : Invalid Price

I've never run into these errors before. Does this mean that I was trading on OFF market hours?

Please help, thanks
Sean

EDIT:
Never Mind. Didn't realize that the demo account was for only 30days, and just so happens last night was the 30 day mark.
my bad

Last edited by Sean0; 07-13-2007 at 08:57 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

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 On
Forum Jump

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


All times are GMT. The time now is 10:21 AM.



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