Help open parenthesis expected - page 2

 
Akintunde Akintinoye:
please can someone help me make lot size of this EA to be % of account balance 

Hello you can post a job here : https://www.mql5.com/en/job

Trading applications for MetaTrader 5 to order
Trading applications for MetaTrader 5 to order
  • www.mql5.com
For the EA attached,  I need : 1.When it opens an order/pending ,send a push notification. 2.When a order is opened from another EA or manually,send a push ,order opened. 3.Colling time ,0 disabled. 4.Trading time. Very important feature that need to be hardcoded : 1. Time Expiration for the EA - dd-mm-yy 2. Account number hardcoded , for...
 
Comments that do not relate to this topic, have been moved to "Off Topic Posts".
 

Hi.. first thanks for the huge efforts you gave,

i have just joined the community and i know nothing about coding, and

every time i try to write a code an error and warning recieved , i would appreciate if someone please help

in writing these conditions:

Buy : if    open[1]>close[1] and close[1]==close[0] and open[0]<close[0] and open[1]>=high[0]

     -time frame= 1 minute only

     -trading sessions= newyork,european,australian (from 5:00 am gmt to 8 :00 pm gmt)

      -instrument = usdjpy only     

      - take profit =1000 pips  -   Stoploss = 100 pips   -  Exit = trailing stop 20 pips or if there is sell signal

Sell : if  open[1]<close[1] and close[1]==close[0] and open[0]>close[0] and open[1]<=low[0]

       -time frame= 1 minute only

       -trading sessions= newyork,european ,australian(from 5:00 am gmt to 8 :00 pm gmt)

        -instrument = usdjpy only     

        - take profit =1000 pips  -   Stoploss = 100 pips   -  Exit = trailing stop 20 pips or if there is buy signal

 
Amir311 #: i have just joined the community and i know nothing about coding,
  1. Don't Hijack other threads for your off-topic post. Next time, make your own, new, thread.

  2. MT4: Learn to code it.
    MT5: Begin learning to code it.

    If you don't learn MQL4/5, there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into your code.

    Or pay (Freelance) someone to code it. Top of every page is the link Freelance.
              Hiring to write script - General - MQL5 programming forum (2019)

    We're not going to code it for you (although it could happen if you are lucky or the problem is interesting.) We are willing to help you when you post your attempt (using CODE button) and state the nature of your problem.
              No free help (2017)


 

I need some support at this point

')' - open parenthesis expected

// Calculate resistance and support levels
   for (int i = prev_calculated; i < rates_total; i++)
   {
      double resistance_level = high[i] + (ticks_away * Point);
      double support_level = low[i] - (ticks_away * Point);
   }
Improperly formatted code edited by moderator.
 
@Bernard Fiagbe #:
Improperly formatted code edited by moderator.

Please, always use the CODE button (Alt-S) when inserting code.

Code button in editor

 
@Bernard Fiagbe #: ')' - open parenthesis expected

The issue in your code is "Point". It should either be the predefined variable "_Point" or the function "Point()".

// Calculate resistance and support levels
   for (int i = prev_calculated; i < rates_total; i++)
   {
      double resistance_level = high[i] + (ticks_away * _Point);
      double support_level = low[i] - (ticks_away * _Point);
   }
Documentation on MQL5: Predefined Variables / _Point
Documentation on MQL5: Predefined Variables / _Point
  • www.mql5.com
_Point - Predefined Variables - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Bernard Fiagbe #: I need some support at this point

Also, please note that the tick size and point size are not necessarily the same.

Forum on trading, automated trading systems and testing trading strategies

Symbol Point Value

Fernando Carreiro, 2022.06.02 01:14

Here are two examples from AMP Global (Europe):

  • Micro E-mini S&P 500 (Futures): point size = 0.01, tick size = 0.25, tick value = $1.25
  • EURO STOXX Banks (Stock Index): point size = 0.01, tick size = 0.05, tick value = €2.50

Forum on trading, automated trading systems and testing trading strategies

Symbol Point Value

Fernando Carreiro, 2022.05.18 21:05

double
   dbTickSize   = SymbolInfoDouble( _Symbol, SYMBOL_TRADE_TICK_SIZE  ), // Tick size
   dbTickValue  = SymbolInfoDouble( _Symbol, SYMBOL_TRADE_TICK_VALUE ), // Tick value
   dbPointSize  = SymbolInfoDouble( _Symbol, SYMBOL_POINT ),            // Point size
   dbPointValue = dbTickValue * dbPointSize / dbTickSize;               // Point value

Remember, it's best to use tick size and tick value in your calculations, instead of point size and its value.

 
Fernando Carreiro #:The issue in your code is "Point". It should either be the predefined variable "_Point" or the function "Point()".

Well noted with thanks 

 
tengo un problema, me dice este error ';' - open parenthesis expected Moving Average.mq5 131 123, me manda a corregir esto     double takeProfit = SymbolInfoDouble(_Symbol, (signal == ORDER_TYPE_SELL) ? SYMBOL_BID : SYMBOL_ASK) + 50 * Point; // 50 pips take profit pero no logro dar para corregir el codigo
Reason: