Jump to content
  • 0

VPS IG Issues


Console_2002

Question

I am having an issue with the built in VPS service.

 

Firstly it looks as though the time is 1 hour ahead of UK time on your VPS this is confirmed by the logs returned. IG Metatrader 4 Trerminal, Version: 4.00 build 1420 24 May 2024

The second and main issue is that when running local my EA has no issues it loads and executes as expected, but when loading to the virtual VPS there are symbol issues, I have tried loading on both EURUSD(£) and with SPX500(£). On both occasion i get an error in the VPS logs indicating that the VPS side is not handling the special characters that you use.

LOGS:
2024.07.16 11:57:13.600    Breakout higgins_jm EA V10.14_BE_Mod EURUSD(£),M15: Debug: Initial pSymbol value: EURUSD(?)
2024.07.16 11:57:13.600    Breakout higgins_jm EA V10.14_BE_Mod EURUSD(£),M15: Error: Unable to select symbol EURUSD(?) in Market Watch.
 

This is the code snip retuning this log, when synchronising I have the market watch open on the correct symbol with my EA loaded on chart. 

/============ Function to Define Broker Digits =============
double fnCalculatePipFactor(string pSymbol = "") // Calculate pip factor based on symbol's digits
{
    // If no symbol provided, use the current symbol
    if (pSymbol == "")
    {
        pSymbol = _Symbol;
    }

    // Ensure pSymbol is correctly initialized and print its value for debugging
    Print("Debug: Initial pSymbol value: ", pSymbol);

    // Ensure the symbol is selected in Market Watch
    if (SymbolSelect(pSymbol, true) == false)
    {
        Print("Error: Unable to select symbol ", pSymbol, " in Market Watch.");
        return -1; // Return an error code or handle it appropriately
    }

    // Check if the symbol is available in the Market Watch
    if (SymbolInfoInteger(pSymbol, SYMBOL_SELECT) == 0)
    {
        Print("Error: Symbol ", pSymbol, " is not available in Market Watch.");
        return -1; // Return an error code or handle it appropriately
    }

    // Get the number of digits for the symbol
    int BDigits = (int)MathRound(MarketInfo(pSymbol, MODE_DIGITS));

    // Log the symbol and BDigits value
    Print("Symbol: ", pSymbol, ", BDigits: ", BDigits);

    double value;

    // Convert BDigits to pip factor based on the number of decimal places
    switch (BDigits)
    {
        case 1: // One decimal place
            value = 0.1;
            break;

        case 2: // Two decimal places
            value = 0.01;
            break;

        case 3: // Three decimal places
            value = 0.001;
            break;

        case 4: // Four decimal places
            value = 0.0001;
            break;

        case 5: // Five decimal places
            value = 0.00001;
            break;

        default:
            // Warn if BDigits is not between 1 and 5
            Print("Warning: BDigits is not between 1 and 5. Please check your broker settings.");
            value = 1; // Assign a default value to avoid using an uninitialized variable
    }

    // Return the calculated pip factor
    return value;
}

Are these known issues or am i doing something that is expected in this environment ?

 

Regards

 

Link to comment

1 answer to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • image.png

  • Posts

    • What’s the average spread like, generally? How does it compare to current conditions? I’ve been using IG for over a decade, and I’ve noticed a growing sense of dissatisfaction, not just from myself but across various forums too. I think they really need to prioritize some core areas—like improving the iOS app and refining the API. While your issue may not be directly tied to the API, in theory, if you know how to use it well, it should offer a better experience compared to the web platform or the standard retail charts. Just my two cents. As for the problem, it’s definitely not about liquidity in these markets. I’d say it’s more likely due to the rise of algorithmic trading over the years. These high-speed algorithms can take advantage of price movements, often leading to short periods of slippage for regular traders as prices shift rapidly. Market orders, meant to execute quickly at the best available price, are more prone to slippage compared to limit orders. Since market orders prioritize speed, they don’t guarantee a specific price. If the market price changes in the short moment between when you place the order and when it's actually executed, your trade will go through at the new price, whether it’s better or worse than expected. This makes market orders riskier in fast-moving or volatile markets. By using the API along with a low-latency server, you can reduce the risk of slippage in some cases. What kind of latency are you experiencing with the API? Avoid using a home connection for this—opt for an affordable VPS, even a $5 one will significantly improve your experience.
    • Cardano’s 3.8% price surge might be from all the updates and partnerships they’ve been rolling out lately. I’ve noticed that every time they release some big news, like a new upgrade or collaboration, there’s always a jump in price. The community around Cardano is really strong too, which seems to play a role in driving things. A few weeks back, I swapped some tokens using https://stealthex.io , and I remember seeing a bunch of people talking about Cardano on forums. Maybe that hype is finally showing in the price. Either way, it’s nice to see some action in the market again.
    • Hi everyone, just a short post at this stage as I want to see if there is any interest in this topic first.  I’ll likely contact IG but wanted to see if there are other thoughts and experiences first as there are several issues I am seeing and it’s a bit complicated, so didn’t want to write some long rambling post. i trade the Dax and Nasdaq indices and use an automated strategy using the API.  I am effectively trying to do a trend trading strategy but on short timescales.  So i set fairly tight stops and then run those trades that leave the area to the plus side.  My win rate is low so have a lot of losers so slippage on stops is quite important to me. i have a database of trades and 5m data going back over 3years now - so have a lot of data to work with. i measured the stop slippage several years ago and it was fine for this method but have re measured it recently as I noticed the losing trades were a bit too large and it seems that the slippage has increased quite a lot for Nasdaq (not then Dax). I am trying to see what is behind this. Anyone interested or tackling similar issues? Thanks David 
×
×
  • Create New...
us