Forum

How can i record the closing price of a specific candle

and save it until a higher closing price is achieved? eg: prev candle's closing price is 1.0950, which is saved as a variable. I want to save this price until a candle shows a higher closing price, in which case, the new closing price wil be the value of my variable. If I try to set the closing

Changing static variable to dynamic

[code] bool static double Buy_Limit = High[1] [/code] .....once above condition is true, execute order. And then reset value of Buy_Limit so that it can re-evaluate new High[1]. How can i change a static variable to dynamic, and then back to static as needed in an EA

How to fix value of a variable to a specific price?

Im using the following code to trigger a buy order . What Im doing is looking for an outside candle, where the low of the current candle dips below the low of the previous candle....and then the high of the current candle breaches the high of previous candle. The following logic only works if its

Do different EAs share variable names?

I understand the concept of global variables. What I wanted to know is, if I have 2 different EAs running at the same time, and both of them have a variable defined as "TargetProfit", will this variable function independently for each EA? or will the EAs get confused? Should i label my variables

EA not working properly on multiple charts

Ok this sounds odd, and I had no problems backtesting my EA on multple charts, but when i ran it in live mode, I ran into this issue. I am trying to run the same EA on 4 different currency pairs . The EA triggers a trade on 1 chart after receiving a signal, but so long as that position is open, it