MetaTrader 5 trading platform is now available for AMP Futures clients wanting to trade futures - page 2

 

I have raised the question to AMPFutures regarding why the order type is always Fill or Kill on script.

Yet, it can be set to Return on manual trade.



They are going to decide over the Return options and get back to me later. 

There might be code changes needed. 



I thought this is going to be huge impact, so I am also expecting their customer representative to reply to this thread as well. 

I have informed to them about the thread here.

Have to settle this problem once and for all. 

Moreover AMPFutures MT5 is only 1 year old, started in 2017.

Bound to have things to iron out. Hope this is done before any of us becomes fund manager of huge fund size. lolx.


The code to replicate this error:

#include <Trade/Trade.mqh>
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+

CTrade *trade;
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void OnStart()
  {
//---
   Alert(ORDER_FILLING_RETURN);
   trade=new CTrade;
   trade.SetTypeFilling(ORDER_FILLING_RETURN);
   trade.SetDeviationInPoints(0);
   Alert(trade.RequestTypeFillingDescription());
   delete trade;
  }

The return result is always 0, ie Fill or Kill even though it is set to Return (2). 

Code in CTrade: Always FOK or IOC, depending on what is given by the market specification. Don't allow Return.

bool CTrade::SetTypeFillingBySymbol(const string symbol)
  {
//--- get possible filling policy types by symbol
   uint filling=(uint)SymbolInfoInteger(symbol,SYMBOL_FILLING_MODE);
   if((filling&SYMBOL_FILLING_FOK)==SYMBOL_FILLING_FOK)
     {
      m_type_filling=ORDER_FILLING_FOK;
      return(true);
     }
   if((filling&SYMBOL_FILLING_IOC)==SYMBOL_FILLING_IOC)
     {
      m_type_filling=ORDER_FILLING_IOC;
      return(true);
     }
//---
   return(false);
  }
 
Zee Zhou Ma:

I have raised the question to AMPFutures regarding why the order type is always Fill or Kill on script.

Yet, it can be set to Return on manual trade.

There is no problem to use ORDER_FILLING_RETURN with mql code.

trade.RequestTypeFillingDescription()

This code gives an ORDER or request filling type. You don't have an order or request in your code.

   trade.SetTypeFilling(ORDER_FILLING_RETURN);
   trade.SetDeviationInPoints(0);
   trade.BuyLimit(1.0,2600.0);
   Alert(trade.RequestTypeFillingDescription());

Tested on a real account.

 

Yup I get it right this time, thanks.

 
Thank you. which is more easily understand for beginners?
 
MetaQuotes Software Corp.:

AMP Futures has officially announced the launch of the MetaTrader 5 platform for trading futures. AMP Futures is a US regulated Chicago-based Futures Commission Merchant (FCM) providing access to the global electronic futures markets for individual traders, as well as US and foreign Introducing Brokerages from 150+ countries around the world.


AMP Futures offers over a 100 regulated futures contracts on the following futures exchanges:

  • Chicago Mercantile Exchange (CME)
  • Chicago Board of Trade (CBOT)
  • New York Mercantile Exchange (NYMEX and COMEX)
  • Intercontinental Exchange (ICE-US, ICE-UK and ICE-LIFFE)
  • European Exchange (EUREX)
  • Osaka - Japan (JPX)
  • Singapore Exchange (SGX)
  • Australian Securities Exchange (ASX).

If you would like to try for free, real-time demo of futures markets trading using MetaTrader 5, sign up here.

Be careful using EAs trading futures, this week for 2 days after profitable trades using trailing stops, my account somehow starting placing orders without stops, the EA was programmed to always use stops. Journal pics attached.
Files:
 

there's a bug, hopefully should get fixed.

right at the open either AMP, MT5, can't handle the volume ? or loads, or something, 

and chart stays behind but bid ask line moves.

you can check ES , NQ, YM 6:30 PST time. 

 
jimjack:

there's a bug, hopefully should get fixed.

right at the open either AMP, MT5, can't handle the volume ? or loads, or something, 

and chart stays behind but bid ask line moves.

you can check ES , NQ, YM 6:30 PST time. 

This exact same thing rarely happens to me but I know why it happens and it's probably not a bug.

I can even manually trigger the condition when the chart stays behind but the bid ask line moves... this happens when only when I'm asking too much resources from my computer at once

triggering it is easy, just have about 6 charts open and one is maximized, the other ones are open still but shown as tabs at the bottom and you can switch between each chart individually

by clicking on the tab to see the chart maximized, then on 3 charts you put an EA, you have the Autotrading functionality running and on the last 3 charts you have my script plotting all the indicators all together which is enough to trigger the somewhat laggy chart but bid ask line still moving in real-time.

I hope this is helpful info to you so you can prevent the 'bug' as you said, I recommend you not to open too many charts at once with too many indicators plus EA or whatever, it all adds up and needs more computer resources so you need to have a finite set of stuff you put on your charts to prevent system overloading.

Here's a link to my profile - TheDutchTrader

I highly recommend you to check out the links in my description for more info on my script.

Best regards,

Ricardo Penders

 
Ricardo Penders:

This exact same thing rarely happens to me but I know why it happens and it's probably not a bug.

I can even manually trigger the condition when the chart stays behind but the bid ask line moves... this happens when only when I'm asking too much resources from my computer at once

triggering it is easy, just have about 6 charts open and one is maximized, the other ones are open still but shown as tabs at the bottom and you can switch between each chart individually

by clicking on the tab to see the chart maximized, then on 3 charts you put an EA, you have the Autotrading functionality running and on the last 3 charts you have my script plotting all the indicators all together which is enough to trigger the somewhat laggy chart but bid ask line still moving in real-time.

I hope this is helpful info to you so you can prevent the 'bug' as you said, I recommend you not to open too many charts at once with too many indicators plus EA or whatever, it all adds up and needs more computer resources so you need to have a finite set of stuff you put on your charts to prevent system overloading.

Here's a link to my profile - TheDutchTrader

I highly recommend you to check out the links in my description for more info on my script.

Best regards,

Ricardo Penders

If you have this problem with 6 charts, that means the EA/Indicator/Script you run on them are, most probably, not coded properly and use too much resources.
 

Hello All,

I arrive here fresh from the AMP forum. It seems this is probably the right place to ask questions about their MT5 implementation? If not please point me in the right direction.

Broadly speaking I'm endeavouring to establish any differences there might be between the "exchange traded futures" flavour of MT5 and the "spot FX" flavour which I am familiar with.

Q1. Am I in the right place yet?

Q2. Is there somebody within MetaQuotes I could contact who is au fait with those differences?

Thanks,

Jim

 
Jim Hunt: I'm endeavouring to establish any differences there might be between the "exchange traded futures" flavour of MT5 and the "spot FX" flavour which I am familiar with.

I don't think that there is any ETF flavour.

Some brokers may offer ETFs, whereas others may offer spots, some both.

Reason: