DC
Two problems at least
for(int i=1; i>=OrdersTotal(); i++) // Loop through orders
should be
for(int i=0; i<OrdersTotal(); i++) // Loop through orders
and
if (Total<1) // No more than one order
should be
if (Total>1) // No more than one order
FWIW
-BB-
DC
Two problems at least
should be
for(int i=0; i<OrdersTotal(); i++) // Loop through orders
-BB-
I thought the same at first
c the next line
if (OrderSelect(i-1,SELECT_BY_POS)==true) // If there is the next one
It's really not smart but this is what it is
if (Total == 1) // No more than one order
I thought the same at first
c the next line
why
if (Total>1) // No more than one order
for(int i=1; i>=OrdersTotal(); i++) so if (OrderSelect(i-1,SELECT_BY_POS)==true)
when i enter a trade i will be -1 in value, i from value of 1 will become 0 if 1 trade is enter
so if (total<1) = no trade
i dont think it wrong
Total = 0 at the first plase when u enter in a trade (of course with u condition if OrderType() > 1) then u increase The value of Totol (Total++ (so Total = 1))
then if (total == 1) = //No more than one order
Total = 0 at the first plase when u enter in a trade (of course with u condition if OrderType() > 1) then u increase The value of Totol (Total++ (so Total = 1))
then if (total == 1) = //No more than one
my ea still cannot work ............. i think there mmore then this problem
can anyone point of my mistake i make in this ea????? need help plz tell me what wrong i want to learn from it
Almost every comparison is wrong way round
e.g.
if (Lots < 0) // If lots are set, // s/b .. > 0 .. Lts =Lots; // work with them ... if(Lts > Min_Lot) Lts=Min_Lot; // Not less than minimal // s/b .. Lts < Min_Lot .. ... if (Ticket < 0) // Success :) // s/b > 0 { Alert ("Opened order Buy ",Ticket); return; // Exit start() } ... if (Ticket < 0) // Success :) // s/b > 0 { Alert ("Opened order Sell ",Ticket); return; // Exit start() }
Dear Everybody!
Could somebody do a code which could send me an alarm message when the price reach a given rate?
Best Reguards
Dear Everybody!
Could somebody do a code which could send me an alarm message when the price reach a given rate?
Best Reguards
double PriceRate = 1.30705; int Count = 20; if (MarketInfo(Symbol(),MODE_BID) >= PriceRate) { if (Count <= 20) { PlaySound("high.wav"); Alert ("price reached @ " + Symbol() + " " + PriceRate); Count++; } }
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
i have his error in my EA code when i try to back test my EA but compiling the EA there no error .
2010.11.25 22:52:02 RAY MA finish inputs: profit=1000; stoplose=1000; lots=0.1;
2010.11.25 22:52:02 TestGenerator: unmatched data error (low value 1.3667 at 2010.11.19 22:45 is not reached from the least timeframe, low price 1.3672 mismatches)
2010.11.25 22:52:02 TestGenerator: unmatched data error (high value 1.3675 at 2010.11.19 22:45 is not reached from the least timeframe, high price 1.3674 mismatches)
2010.11.25 22:52:02 TestGenerator: unmatched data error (low value 1.3672 at 2010.11.19 22:30 is not reached from the least timeframe, low price 1.3672 mismatches)
2010.11.25 22:52:02 TestGenerator: unmatched data error (volume limit 220 at 2010.11.19 22:30 exceeded)
2010.11.25 22:52:02 TestGenerator: unmatched data error (high value 1.3680 at 2010.11.19 22:33 and price 1.3681 mismatched)
2010.11.25 22:52:02 TestGenerator: unmatched data error (high value 1.3680 at 2010.11.19 22:32 and price 1.3681 mismatched)
2010.11.25 22:52:02 TestGenerator: unmatched data error (low value 1.3678 at 2010.11.19 22:15 is not reached from the least timeframe, low price 1.3681 mismatches)
2010.11.25 22:52:02 TestGenerator: unmatched data error (volume limit 318 at 2010.11.19 22:15 exceeded)
i have read the forum most say me it because of lower time frame candle unmatched to higher time frame candle, to solve the problem just download the data of lower time frame and higher time frame so that they match . i did what the forum told me but still counter this error .
i try to forward test my ea to check where the it workable, there no error in starting the ea but no trade was enter . so i think there some problem in my EA coding i hope you guy can help me out