Forum

Can't get third buffer from CopyBuffer

I want to get some values from my indicator to EA. But can get only from first buffer, how to get values from other buffers? In example below, i try to get values from third buffer, and always get 4806 error. When I try to get from first buffer, everything is all right. I tested it in strategy

SetIndex Buffer to class type

Hello, is it possible to set index buffer to class type? Thanks, in advance. I have a class: class SupportResistanceClass { public : double High; double Low; double CandleLowHigh; }; Variable: SupportResistanceClass _support[]; And I want to set index buffer to the support, I tried this

EA reset

Hello, I searched in the forum about EA resetting but nothing found. When my EA finishes work, I want to reset it, EA would work like newly added into the screen. How can this be done

How to get 5 digits after comma in EURUSD pair?

int init() { ObjectCreate ( "closeprice" , OBJ_ARROW , 0 , Time[ 5 ], Close[ 5 ]); ObjectSet( "closeprice" , OBJPROP_ARROWCODE , 5 ); return ( 0 ); } int start() { //---- double closeprice1, endprice,closeprice; closeprice1=ObjectGet( "closeprice" ,OBJPROP_PRICE1); string

Mistake in my code

I want to write a function , which do: It must watch all pending or open orders in the chart, and if it is one of all orderSymbol which match a symbol in the chart, then nothing happens. If all OrderSymbols don't match symbol in the chart, then do other function. This is my code, but it doesn't do

How to return price value after EA restart.

I want to do this: There is a line on the chart, I get price from it. After Ea restart I want this line get back in that price, which it was before restart. Can I do this without saving the price in the file? If can't do, so how to save it to file, that doesn't overwrite prices, because this EA will

Multiple take profits.

Hello, I want to add in my code multiple tp function . total = OrdersTotal (); for ( i=total- 1 ;i>= 0 ;i--) { OrderSelect (i, SELECT_BY_POS, MODE_TRADES); int type = OrderType (); if ( OrderSymbol () == Symbol () && type==OP_BUY && Bid>=tp1) { OrderClose ( OrderTicket (), 0.01 , MarketInfo (

Partial exit depending on fibanacci levels.

This is my code. I want to partial exit on Fibonacci 38.2, 61.8 and 127.2%. After TP1 partial close, my tp2 ant tp3 values becomes 0 and below if conditions becomes true because Bid> tp2 and tp3. But really Bid is < tp2 and tp3 and he have to wait while second condition would be true. So, how to get

Entry from Fibonacci

Hello, I want to send pending order with entry price value from Fibonacci. double p1,p2,tp1,tp2,tp3; p1= ObjectGet (FibName,OBJPROP_PRICE1); //100% fib price string sp1= DoubleToStr (p1, 5 ); // price to string p1= NormalizeDouble ( StrToDouble (sp1), 5 ); //string to double p2=

Get Hline price in all digits.

Price=ObjectGet("Name",OBJPROP_PRICE1); When I run it in EURUSD, I get price in 5 digits 1,2755, how to get it in 6 digits 1,27558. Thank you