double Op_Buy = 0;
double Op_Sell = 0;
double Op_BuyStop = 0;
double Op_SellStop = 0;
double Op_BuyLimit = 0;
double Op_SellLimit = 0;
for(int a=0; a < OrdersTotal() ; a++){ // Loop through orders
if (OrderSelect(a,SELECT_BY_POS)) // If there is the next one
{
// I usually perform a check on whether the order is on the current chart and with the current EA and stuff, but i guess you're not interested in that.
int type = OrderType();
switch(type)
{
case OP_BUY : Op_Buy++; break;
case OP_SELL : Op_Sell++; break;
case OP_BUYSTOP : Op_BuyStop++; break;
case OP_SELLSTOP : Op_SellStop++; break;
}
}}
//|--------------------------------------------------------------------- comments
string Open_Buy_positions = DoubleToStr(Op_Buy,0);
string Open_BuyStop_positions = DoubleToStr(Op_BuyStop,0);
string Open_Sell_positions = DoubleToStr(Op_Sell,0);
string Open_SellStop_positions = DoubleToStr(Op_SellStop,0);
string WOPs = DoubleToStr(Entry,5);
Comment( StringConcatenate(
"Weekly Open Price = ", WOPs, "\n",
"TEST - Op_Buys = ", Open_Buy_positions, "\n",
"TEST - Op_Buystops = ", Open_BuyStop_positions, "\n",
"TEST - Op_Sells = ", Open_Sell_positions, "\n",
"TEST - Op_SellsStops = ", Open_SellStop_positions, "\n"
));
// Double entry = 0; is not defined anywhere.
Email sent
can someone help me edit sar ohlc to use heiken ashi ohlc
Hi, I have an MTF indicator that uses sar, however I'd like the sar to calculate heiken ashi ohlc, and not the normal type
Can you tell me how I can do this, my mtf indicator calls to the sar indicator to calculate sar formula, I think it is calling to the internal indicator in mt4 that can not edit
you can skype or email if you can assist and like to talk about it
skype sty671
email sty671@gmail.com
I can also supply the original file that I'm trying to use heiken ashi ohlc for
can someone help me edit sar ohlc to use heiken ashi ohlc
StringConcatenate
thankyou
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I am trying to get this code to count the different types of order and store the results where I can use them, but it doesnt work. Could anyone help ?