[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 175

 
bestfx:
I agree I wrote them down, what do I do next?

Compare the open orders in the loop with the price. If there are none, put an order.
 
Roman.:

Compare in the loop on open orders with the price. If not, place an order.

No way. It goes 50 p to the bottom and comes back, and all the time puts orders
 
ULAD:


s="doun";
if (ObjectFind(s)==0) {ObjectDelete(s);}
ObjectCreate(s,OBJ_TRENDBYANGLE,0,Time[W1],High[W1]);
ObjectSet(s,OBJPROP_ANGLE,310);

double price=ObjectGetValueByShift("doun", 1);

Comment(price);

returns 0.

line is present.

Yeah, gives error 4205 "object coordinates error". I'll try to figure out what's what.
 
Why can't I trade USDCZK although it is listed?
 
alsu:
Yep, gives error 4205 "object coordinates error". I'll try to figure out what's what.

ULAD, write to servicedesk, it seems to be a bug. Give them the picture and the code that outputs it:


//+------------------------------------------------------------------+
//| script program start function                                    |
//+------------------------------------------------------------------+
int start()
  {
   string s="test_trend_by_angle";
   if (ObjectFind(s)==0) {ObjectDelete(s);}
   ObjectCreate(s,OBJ_TRENDBYANGLE,0,Time[10],High[10]);
   ObjectSet(s,OBJPROP_ANGLE,310);
   Print("Time1=",TimeToStr(ObjectGet(s,OBJPROP_TIME1)));
   Print("Price1=",DoubleToStr(ObjectGet(s,OBJPROP_PRICE1),Digits));
   Print("Time2=",TimeToStr(ObjectGet(s,OBJPROP_TIME2)));
   Print("Price2=",DoubleToStr(ObjectGet(s,OBJPROP_PRICE2),Digits));
   double price=ObjectGetValueByShift(s, 1);
   Print(DoubleToStr(price,Digits));
   Print(GetLastError());
//--------------------------------------------------------------------//----
   return(0);
  }
//+------------------------------------------------------------------+
 
hmm:
Why can't I trade USDCZK although it is listed?
Please contact your broker.
 
alsu:

ULAD, write to servicedesk, it seems to be a bug. Give them the picture and the code that outputs it:

Thank you Alexei for your help. I'll have to give up on this venture.

Found that the angle is sharpened in relation to the window, not the chart.

Lost the sense.

 
ULAD:

Thank you Alexei for your help. I'll have to give up the idea.

Found that the angle is sharpened in relation to the window, not the chart.

Lost the point.

Have you tried fixing the scale (min/max)?
 

Little secrets :

1) trend and trend by angle objects are no different from each other. you can set the angle for the trend line as well

2) The problem in your case is that you are using an abbreviated entry for the OBJ_TRENDBYANGLE object. You haven't set time parameters for the second point and you want the terminal to return your price. But it's ironclad, dumb, and doesn't understand the price for which time to return...

3) Recalculating the angle from the angle of the chart to the true angle is not difficult and quite solvable, you just need to apply your knowledge of trigonometry.

 
FAQ:

1) trend objects and trend by angle do not differ from each other. you can also set the angle for the trend line

Are they sure?

In mt4 you have to check it, and in 5 the trend line already has an angle. And where the angle is 45 degrees, the trendline shows 85, and if we rotate it by 180 degrees, it shows 0.

Reason: