Here is one . . . it took me 20s to find, are you not able to count braces ?
if ( Order == SIGNAL_BUY && ( ( pricebuy/openbuy)>Ask ) && IsTradedOnThisBar!=Bars )
3 x green (, 2 x red )
if ( Order == SIGNAL_BUY && ( ( pricebuy/openbuy ) >Ask ) && IsTradedOnThisBar!=Bars )3 x green (, 3 x red ) excuse i'm a count 3 red 3 green, no?
sorry the error is that, but this in signal_SELL, thanks anyway
Bellagio:
3 x green (, 3 x red ) excuse i'm a count 3 red 3 green, no?
Yep, sorry I missed one . . .
3 x green (, 3 x red ) excuse i'm a count 3 red 3 green, no?
This looks also strange to my eyes: (Not sure if such blocks are allowed in mql)
if (Order == SIGNAL_SELL && ((pricesell/opensell<Bid) && IsTradedOnThisBar!=Bars) { { Ticket = OrderSend(Symbol(), OP_SELL, Lots, Bid, Slippage, StopLossLevel, TakeProfitLevel, "Sell(#" + MagicNumber + ")", MagicNumber, 0, DeepPink); IsTradedOnThisBar = Bars; }
Yest the extra braces are allowed. I have them in my code
int init(){ : {//++++ One time variable initializations. chart.symbol = Symbol(); chart.period = Period(); : }//---- One time variable initializations. : }They do nothing. I use them for code folding in notepad2. (Shrink function definitions, for loops, sections of code to one line.)
line 87
if (Order == SIGNAL_SELL && ((pricesell/opensell<Bid) && IsTradedOnThisBar!=Bars)
for (int cnt = total-1 ; cnt >=0 ; cnt--) { OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES); if(OrderSymbol()==Symbol() && (OrderType()==OP_SELL)) pricesell+=OrderOpenPrice(); }
What are Function return values ? How do I use them ? - MQL4 forum
No magic number mean's the EA in incompatible with every other including manual trading.
- What is the meaning of pricesell? 5 oranges for $1 + 7 oranges for $1.50 = $2.50 which means nothing. If you want average price then you need a weighted mean AveragePrice = Sum( amount*price )/Sum(amount) 5 oranges for $1 + 7 oranges for $1.50 = 12 @ $1.29
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
i have a problem with \end_of_program - unbalanced left paranthesis, anyone can help?, i don't see the error.
the latest functions calculate the sum of the prices of each symbol and operational direction and the other the sum of each symbol and operational direction, and then split them and know the price = 0, so do not buy if the price is above, or sell if the price is below. is correct? tkn
PriceSell()
PriceBuy()
OpenedBuy()
OpenedSell()