Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 1123
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
Greetings all! Can you please advise me, is it necessary to register error handling functions in an EA? And what will happen if I don't add these functions? I read somewhere that they should be implemented. I have a pile of recently created EAs without these errors, and they work fine in tests and demos.
It is desirable to check for errors, at least for critical ones, there may be a situation where the Expert Advisor starts to bombard the server with requests, and the server returns an error, and if frequent requests simply turn off auto-trading in the account. Errors can be different, for example, "close stops" or "not enough funds".
Hi all, I apologise in advance if I am writing in the wrong topic. 1) Please tell me if I want to subscribe to the signal and my broker and my provider's brokers do not coincide, is there any way to subscribe? Or is it compulsory to have the same brokers? (2) I want to subscribe to the signal and my Provider's deposit does not coincide. Provider's deposit is 10 times bigger than mine and he works with 0.10 lots, therefore, my signal opens 0.01. Can I set it manually to open more volume, say, 0.02 or 0.03? I can manually adjust the volume to open more, say 0.02 or 0.03? Thanks.
Hi all, I apologise in advance if I am writing in the wrong topic. 1) Please tell me if I want to subscribe to the signal and my broker and my provider's brokers do not coincide, is there any way to subscribe? Or is it compulsory to have the same brokers? (2) I want to subscribe to the signal and my Provider's deposit does not coincide. Provider's deposit is 10 times bigger than mine and he works with 0.10 lots, therefore, my signal opens 0.01. Can I set it manually to open more volume, say, 0.02 or 0.03? I can manually adjust the volume to open more, say 0.02 or 0.03? Thanks.
Hello. Please help me to write an EA. At price X I need to check if there are any open positions to buy or pending orders to buy. If not, then open a pending buy order with stop loss and take profit parameters. And the second check only positions on sale and pending orders on sale. If not, we open a pending sell order. Second question ... Where do I prescribe the opening of orders when I first run the EA?
I have this function and it works in an EA/script
{
double One_Lot=0.0;
double price=0.0;
double volume=0.0;
double MinLot=SymbolInfoDouble(symbol,SYMBOL_VOLUME_MIN);
double Free=AccountInfoDouble(ACCOUNT_FREEMARGIN);
double Step=SymbolInfoDouble(symbol,SYMBOL_VOLUME_STEP);
if(action==ORDER_TYPE_BUY)price=SymbolInfoDouble(symbol,SYMBOL_ASK);
if(action==ORDER_TYPE_SELL)price=SymbolInfoDouble(symbol,SYMBOL_BID);
if(!OrderCalcMargin(action,symbol,1.0,price,One_Lot))return(MinLot);
if(One_Lot!=0 && Step!=0)volume = MathFloor(Free*Percent/100.0/One_Lot/Step)*Step;
if(volume!=0)return(volume);
return(MinLot);
}
Question:how to get the maximum possible lot in the indicator,OrderCalcMargin does not work in the indicator for some reason? In mt4 the"MarketInfo(symbol,MODE_MARGINREQUIRED)" works fine, in mt5 it doesn't, but there is some fragment ofthe OrderCalcMargin that does not work in the indicator
Thank you!
You know this is an MT4 thread, you don't need to drag MT5 questions over here )))
There is noOrderCalcMargin() in MT4, there isAccountFreeMarginCheck()
Hi all. Please help me find an EA which puts a stop on price and not on a pips from price. Thanks in advance!
This is how anyone sets a stop on price. Only the points are multiplied by _Point and added to the current price. But no one forbids specifying a particular price.