[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 116

 
Fosfalugel >> :
Is it possible for the Expert Advisor to send a signal to the email or sms?

Making the EA send a message to an email is no problem. Use the SendMail() function.

Setting it to send a message to SMS is a bit more complicated, but it's possible too.

 

Hello.

Newbie, just started trying to write an EA.

I write the following lines in the init() function:

double d=iClose(Symbol(),1,1002);
Alert("d=",d," GetLastError()=",GetLastError(),", bars=",iBars(Symbol(),1));

The tester gives out:

EURUSD,M1: Alert: d=0 GetLastError()=0, bars=1001

I.e. I have 1001 bars for the minute history (iBars), but how can I access an earlier history?

there is data in the archive of quotes. Service/Quotes archive/EURUSD/1minutes writes: Database 65012/3624887 records

It does not display an error or upload any data. It just returns 0.

I'm at a loss, can you please tell me what's wrong.

 

Help me out here !

How to calculate a pip price for GBP/JPY in quid for 1.0 lot ?

 
Please advise what is wrong with this EA. it compiles fine, but does not trade.....
Files:
lsma_exp.mq4  4 kb
 
tolikfilip писал(а) >>
advise me what's wrong with this EA. it compiles fine, but does not trade.....

It's all a bit rusty. Here are a couple of points, first, why it doesn't trade (doesn't open):

     int buys=0, sells=0;
     if(OrderType()==OP_BUY)
     if(OrderType()==OP_SELL)
     if( buys>0) return( buys);
     else       return(- sells);

this block will stop execution of the program before it opens orders by return(-sells), I'm sure....

The second, even if it opens, will not close:

   if ( greencount>0 && redcount>0)//!!!!!!!!!!!!!!
     {
      // Close any open orders, buy or sell
     if( greencount<0)//!!!!!!!!!!!!!!
     {
           Print(Symbol(),Time[0],OrderOpenTime(),"CLOSE BUY");
      //ignore errors here as there may be no order in progress
      OrderClose(OrderTicket(), extLots,Bid,0,White);
      }
     
     if ( redcount<0)//!!!!!!!!!!!!!!
     {
           Print(Symbol()," CLOSE BUY");
      //ignore errors here as there may be no order in progress
      OrderClose(OrderTicket(), extLots,Ask,0,Red);
      }
     }
There's probably more, but that's enough for now
 
SkyMind писал(а) >>

Hello.

i.e. i have 1001 bars of history (iBars), but how do i refer to an earlier history?

The data is available in the quotes archive. Service/Quotes archive/EURUSD/1minute writes: Database 65012/3624887 records

It does not display an error or upload any data. It just displays 0.

I'm at a loss, can you please tell me what's wrong.

The tester at the beginning of testing only sees 1000 bars, the number of bars increases as you go through the test. The variant of solution that I use: we set the date of testing start before the necessary one in the tester, and set the needed date by additional condition at the beginning of the start function (like this):

if ( Mounth()<3 || Year()<2009) return;
Oh, I forgot to add, there is no such problem when running the EA on an account, the EA sees all the available history.
 
thestalker писал(а) >>

Help me out here !

How to calculate price of one pip for GBP/JPY in quid for 1.0 lot ?

Look at the MarketInfo Reference -> TickValue

 
thestalker >> :

Help me too, please.

How to calculate the pip value of GBP/JPY in USD for 1.0 lot ?

Use the trader's calculator. Look here.

If you follow this link and open the tab "Calculation formulas", then you will see a detailed description of how to do it manually:

Let's calculate the cost per pip per 1.43 lots, for example on the GBPCHF currency pair ...

....

Let's look at the formula to calculate the value of one pip: ...

....

Example. Calculation of price of one pip on GBPCHF currency pair on USD deposit currency account: ...

....

 
dram-n писал(а) >>
Hello. I just downloaded the platform (broco) demo and attached an EA (EleMent 6.0) for example on USDJPY,M1 and put all the checkmarks but I can't place orders. Can you tell a newbie what to fix? Many thanks in advance.

There could be a million reasons for this, from a bug in the advisor, to non-trading hours of the broker or instrument. Or maybe the Expert Advisor opens 1-2 trades a year, and you wait for a few minutes and wonder why it does not trade. Just in case it is worth to check the tabs: Journal and Expert Advisors in the terminal, there may be possible errors.

 
Element 6.0 is not adapted for Broco.
Reason: