Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 496 1...489490491492493494495496497498499500501502503...1177 New comment [Deleted] 2014.02.22 11:42 #4951 artmedia70: And ask int b why int ? According to the manual, ObjectGet should be of type double, and in the iBarShift function b should be of type datetime TarasBY 2014.02.22 11:46 #4952 rustein: Thanks, so changed ErrNum to ErrNumber and that's it? The warning is gone, everything will work correctly? string ErrorDescription(int ErrNumber) { switch (ErrNumber) { You can see that you're "in the tank"... :))) Evgeniy Khaynatskas 2014.02.22 12:34 #4953 how do I draw a horizontal line between two points and a vertical line? ..... I'm telling you I need a rectangle to draw at a given price and time interval [Deleted] 2014.02.22 13:56 #4954 Help me find an error... The names of the functions say it should do... extern double LOT = 0.1; extern int Magic = 77; extern double MartinStep = 1.5; double GetLastOrderProfit() { int time = 0; double profit = 0; for(int i = OrdersHistoryTotal()-1; i>=0; i--) { if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)) { if(OrderSymbol() == Symbol()&& OrderMagicNumber() == Magic) { if(time<OrderCloseTime()) { time=OrderCloseTime(); profit=OrderProfit(); } } } } return(profit); } //+------------------------------------------------------------------+ double GetLastLot() { int time = 0; double Lot = 0; for(int i = OrdersHistoryTotal()-1;i>=0;i--) { if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)) { if(OrderSymbol() == Symbol()&& OrderMagicNumber() == Magic) { if(time<OrderCloseTime()) time=OrderCloseTime(); Lot = OrderLots(); } } } if(Lot <= 0) Lot = LOT; return(Lot); } //+------------------------------------------------------------------+ double GetLastTenOrdersProfit() { double profit = 0; int count = 0; for(int i = OrdersHistoryTotal()-1;i>=0;i--) { if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)) { if(OrderSymbol() == Symbol()&& OrderMagicNumber() == Magic) { if (count<10) { profit=profit+OrderProfit(); count++; } } } } return(profit); } //+------------------------------------------------------------------+ double GetLot() { double Lot = 0; double n = GetLastLot(); if (GetLastTenOrdersProfit() < 0 || GetLastOrderProfit() < 0) Lot = NormalizeDouble (n * MartinStep,2); if (GetLastTenOrdersProfit() >= 0 && GetLastOrderProfit() >= 0 ) Lot = LOT; return (Lot); } [Deleted] 2014.02.22 14:06 #4955 Why can't I display a comment from the EA? I can't see anything at all. void OnTick() { //--- Comment ("\n ",TimeToStr(Time[1])); } Vitalie Postolache 2014.02.22 14:17 #4956 Alexandr24: Why can't I display a comment from the EA? I can't see anything at all. void OnTick() { //--- Comment ("\n ",TimeToStr(Time[1]); } In the tester or on the graph? [Deleted] 2014.02.22 14:21 #4957 In the tester it shows up but the graph is empty, I suspect it's because it's off, but it's weird. Vitalie Postolache 2014.02.22 14:26 #4958 Exactly, a day off, no ticks, nothing strange. Boris 2014.02.22 14:27 #4959 Alexandr24: Why can't I display the comment in the EA? Nothing is displayed at all. void OnTick() { //--- Comment ("\n ",TimeToStr(Time[1]); } I output everything, but I don't use functions, I use a single loop at the start, in which everything is defined and calculated. Inthe comment, everything via DoubleToStr()! And the functions slow down unnecessarily! [Deleted] 2014.02.22 14:51 #4960 borilunad: I output everything, but I don't use functions, I use a single loop at the start in which everything is defined and calculated. Inthe comment, everything via DoubleToStr()! And functions slow down unnecessarily! Thanks, I'll have to give it a try. 1...489490491492493494495496497498499500501502503...1177 New comment
And ask int b
why int ? According to the manual, ObjectGet should be of type double, and in the iBarShift function b should be of type datetime
Thanks, so changed ErrNum to ErrNumber and that's it? The warning is gone, everything will work correctly?
You can see that you're "in the tank"... :)))
Help me find an error... The names of the functions say it should do...
Why can't I display a comment from the EA? I can't see anything at all.
void OnTick()
{
//---
Comment
("\n ",TimeToStr(Time[1]));
}
Why can't I display a comment from the EA? I can't see anything at all.
void OnTick()
{
//---
Comment
("\n ",TimeToStr(Time[1]);
}
In the tester or on the graph?
Why can't I display the comment in the EA? Nothing is displayed at all.
void OnTick()
{
//---
Comment
("\n ",TimeToStr(Time[1]);
}
I output everything, but I don't use functions, I use a single loop at the start, in which everything is defined and calculated.
Inthe comment, everything via DoubleToStr()! And the functions slow down unnecessarily!
I output everything, but I don't use functions, I use a single loop at the start in which everything is defined and calculated.
Inthe comment, everything via DoubleToStr()! And functions slow down unnecessarily!
Thanks, I'll have to give it a try.