Forex



Go Back   Forex Trading > Downloads > Indicators - Metatrader 4
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 08-01-2009, 02:13 AM
Member
 
Join Date: Jul 2006
Location: Denver, Colorado
Posts: 51
AirforceMook is on a distinguished road
Unhappy this indicator is KILLING me

I wrote my own indicator and am having the weirdest problem. The indicator will display perfectly when I drag it onto the chart, but when I use it within the EA I get completely different results. I can't figure this out.

-There's only a single variable, set for 5, on the indicator in both the chart AND code.
-None of these are ASSIGNED in the rest of the EA or Indicator, so what's listed below in code IS the values.


Code:
   // Get direction from indicator 
   int direction=0;
   double bwSig[10];
   double bwTop[10];
   double bwBot[10];
   ArrayInitialize(bwSig,0);ArrayInitialize(bwTop,0);ArrayInitialize(bwBot,0);
   for (int a=0;a<=9;a++) {
      bwSig[a]=iCustom(NULL,Period(),"barWorth-v2",5,0,a);
      bwTop[a]=iCustom(NULL,Period(),"barWorth-v2",5,1,a);
      bwBot[a]=iCustom(NULL,Period(),"barWorth-v2",5,2,a);
   }
   if (bwSig[1]>bwTop[1] && bwSig[2]<bwTop[2]) {direction=1;}
   if (bwSig[1]<bwBot[1] && bwSig[2]>bwBot[2]) {direction=-1;}
   Cmt=Cmt+"Direction: " + direction + "\n";
   Cmt=Cmt+"BW sig top bot (1 offset): " + bwSig[1] + " " + bwTop[1] + " " + bwBot[1] + "\n";
Attached Images
File Type: gif chart.gif (37.5 KB, 447 views)
__________________
//AirforceMook//

Last edited by AirforceMook; 08-01-2009 at 02:29 AM. Reason: fix
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 08-01-2009, 07:21 AM
xx3xxx's Avatar
Senior Member
 
Join Date: Sep 2008
Posts: 419
xx3xxx is on a distinguished road
indicator that make us LOSS -- give it up (it looks good, but it simply won't help much or don't fit our MIND SET)
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 08-01-2009, 09:22 PM
Member
 
Join Date: Jul 2006
Location: Denver, Colorado
Posts: 51
AirforceMook is on a distinguished road
I'm not sure how this is a useful comment.

I found what appears to be a profitable method, but I'm having problems getting the EA to grab the correct values. That's the problem here.
__________________
//AirforceMook//
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


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
Broker killing EAs Nudge General Discussion 11 03-18-2008 08:45 AM


All times are GMT. The time now is 05:22 PM.



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