Forum

Getting the Close value of a specific Bar

I'm trying to locate the value in a specific Bar and I dont really understand how to work with Arrays. When I try to read a "Bars[bar_number]" value, it returns that it needs an integer value as index. My "bar_number" in this example is a value that I get from the iHighest function . How can I get

Problem with " *Point "

HI, I got this problem suddently, never before and not in my other EA's, and I cant seem to locate the reason.... x=5; x*Point=0.0001 I have done a MarketInfo for Point followed by a RefreshRates() and still, everything I *Point, comes out bad. Same occurrence with my var "point" or the system

assigning fixed minimum and maximum in ea (imacd)

Anyone know if it is possible to assign "fixed minimum and fixed maximum" in the EA for indicators that use those? ex: iMACD... The reason, is I would like to compare certain indicators and there scale is of different values. Or is there any other way of doing this? ex: if (rsi>macd) buy; (cant do

WEIRD WEIRD Results ???

I wrote a very simple EA using one Indicator, i compare like this.... if (indicator_1>indicator_2) result="buy"; if (indicator_1<indicator_2) result="sell"; return(result); then I get this straight linear down slope with plenty of trades. So i reversed the decision (> for <) and was expecting a

EA vs Indicator question....

EA vs Indicator question.... I have this indicator, (.ex4) and I would like to attache it to my EA, but I dont know if it has External parameters available. All I can detect is Alerts comming out of it from time to time. Is there a way I could find out ? (about the Parameters) Right now im doing

Weird !! can you see whats wrong ?

Hi, Could you tell me why this function only returns "WAIT" and "SELL" but NEVER any "BUY"? //+------------------------------------------------------------------+ string Trending_for(string Trending) { if (Close[3]<Open[1])Trending="BUY";else Trending="Wait"; if

What am I doing wrong ...........

Hi, im trying to do some optimization, by using a variable to input (close,open,low,high) for testing, but I get the unexpected token message, is this allowed? ======================================================== switch (valuefour) { case 0: value4="Close";break; case 1: value4="Open";break;

Why some EA's can be Optimized on lots and SL/TP and some dont work?

Hi, Im writing an EA, and I cant optimize on SL or TP like I can on some others. Anyone know the reason for this? Thanks for your help. Micky

EA Tool.....? (Single-Step)

I was wondering if there is such a tool that would permit me to visualize my code while backtesting , and permit me to single-step at the same time through the code. This would be a wonderfull tool to debug, optimize and understand what is going on in the EA, saving an uncalculable amount of time

WHAT IS WRONG WITH THIS CODE ????????

I'm doing some testing and I cant figure out why I get "unbalanced parentheses" on this. Could someone be kind enough to tell me why I get this error from the compiler? ____________________________________________________________________ extern double LotSize=0.01; extern int StopLoss=25; int