Forum

Possible problem with Ctrade, trade.Buy

Hey, thanks for taking the time to read my question, I don’t have any problems compiling the entire EA, but I noticed my EA was showing up as an indicator in the MetaTrader environment and not as an EA. Could this be because my Buy and Sell orders are incorrect? CTrade m_trade; // trading object

Warning: "possible use of uninitialized variable 'Arraysize'"

Hey, Thanks for taking the time! I have had this warning a couple of times, and also fixed it but I have no idea how I did it. But this time I don't know what I am doing wrong. //--- Input calculations double redCandle = open > close; //-- Defining what a redCandle

Doing calculations with Buffer from "ExponentialMAOnBuffer"

Hey! Thanks for taking some time out of your day to read my question. So in my script I am calculating a few EMA's. With these EMA values I have to do some further calculations, but how would I do calculations with these values that are stored inside this array (buffer)? input int UMAPeriod = 9 ;

Custom “applied price” input for indicator

Hey! Thanks for taking some time to look at my question. I am trying to make an indicator but in order to do this I need to plot an EMA, but the applied price isn’t the usual close etc. The applied price should be this: double UMA, LMA; if (close>open) {UMA=high-close;LMA=low-open;} else

Working with classes and the error " undeclared identifier"

Hey! First of all thanks for taking some time out of your day to read my question. So I am playing around with classes and I keep on stumbling across the same problem: When I define lets say tpLong in this class: public : CNbpExpert( void ); ~CNbpExpert( void

Saving TP and SL from an order, to use in other order.

Hello! Thanks for taking the time to look at my topic. First of all I want to know how I could save the the SL and TP values of a recently opened order so I can use these values for opening a new trade. For example: I open a long(1) trade and the TP= 10 and SL=5, After this I want to open a new