Forum

Highest OrdersTotal

Hi all, Trying to find the highest amount of open orders but but this code gives the same amount for TotalOpenOrders and MaxOpenOrders. Thx a lot. Amir int TotalOpenOrders = 0 ; int MaxOpenOrders = 0 ; for ( int i = OrdersTotal ()- 1 ; i >= 0 ; i--)

Lowest AccountProfit

double Profit = AccountProfit(); for ( int i = 0 ; i < 0 ; i--) { double LowestProfit = AccountProfit(); { if (LowestProfit < Profit) { Profit = LowestProfit;

trying to find date/time of a specific bar

double LowestEMA = iMA ( Symbol (), 0 , 10 , 0 , MODE_EMA , PRICE_CLOSE , 0 ); for ( int i = 1 ; i < 30 ; i++) { double MovingAverage = iMA ( Symbol (), 0 , 10 , 0 , MODE_EMA , PRICE_CLOSE ,i); { if (MovingAverage < LowestEMA) {

finding the lowest value of EMA over previous period

double Lowest = 500000 ; double MovingAverage = iMA ( Symbol (), 0 , 10 , 0 , MODE_EMA , PRICE_CLOSE , 10 ); for ( int i = 0 ; i < 10 ; i++) { if (Lowest < MovingAverage) { MovingAverage = Lowest; } } Hi all, Been

EA opening and closing

Hi all, Need a help with this. When the EA closes the first Buy trade, it goes crazy. Am i missing something? Thx a lot! int TicketBuy10; double Lots10 = 1.0 ; double Buy10Profit = 200; // 200.00 = 20.00 pips int OnInit () { return ( INIT_SUCCEEDED ); } void OnTick () {

Counting total Sell orders at a certain distance from a Buy order

Hi guys and girls, I m trying to count how many sell orders i have at a certain distance from a Buy order. This is the code i got but it gives me wrong results. Thanks a lot. double OrderOpenPriceSell; int TotalSellOrders() { int SellOrderCount = 0 ; for ( int i = 0 ; i <= OrdersTotal

Find the biggest, 2nd biggest and 3rd biggest orders in Profit in Orderstotal()

Hi, Can anybody help me please ? I know how to find the biggest order in Profit using a for loop. But i dont know how to find the 2nd and 3rd biggest orders in profit. Thanks in advance, Amir