VXX Not Tradeable on MT5?

 

Hello,


Is VXX tradeable on MT5? As you can see in the attachment, all the information related to VXX seems to be blank. Also at the very bottom you can see the Trade input is populated with "disabled". Can someone advise if VXX is tradeable or not using expert advisors? I am new to MT5 and came here specifically for VXX.

Thanks!

Files:
VXX.PNG  69 kb
 
dereksweet: Is VXX tradeable on MT5? As you can see in the attachment, all the information related to VXX seems to be blank. Also at the very bottom you can see the Trade input is populated with "disabled". Can someone advise if VXX is tradeable or not using expert advisors? I am new to MT5 and came here specifically for VXX.
Why ask here, when the entity you should be asking is your broker? Ask your broker!
 
Fernando Carreiro:
Why ask here, when the entity you should be asking is your broker? Ask your broker!

Hi Fernando,

I am only using the demo verson of the software at the moment which doesn't require any broker affiliation in order to test automated strategies. I have developed my strategy in MetaEditor and tried to run a historical test on VXX but it would not work. 

My broker allows for VXX trading but before I jump through those hoops I would like to test a couple strategies out, however am unable to do so on VXX.

Thanks

 
dereksweet: I am only using the demo verson of the software at the moment which doesn't require any broker affiliation in order to test automated strategies. I have developed my strategy in MetaEditor and tried to run a historical test on VXX but it would not work. My broker allows for VXX trading but before I jump through those hoops I would like to test a couple strategies out, however am unable to do so on VXX.

There is no such such thing as a demo version of the software. The software is full featured and free.

You are either using a demo account by MetaQuotes or a demo account by your broker.

If you broker does allow trading of VXX then use a demo account by your broker so that you can test trading on it.

 
Fernando Carreiro:

There is no such such thing as a demo version of the software. The software is full featured and free.

You are either using a demo account by MetaQuotes or a demo account by your broker.

If you broker does allow trading of VXX then use a demo account by your broker so that you can test trading on it.

Fernando,


Can you take a look at the attached image and help me understand why this invalid volume error is coming up when trying to test my strategy?


Thanks for the help!

Files:
 
I believe you are missing a user input minimum volume check with SymbolInfoDouble.
 
Mateus Matucuma Teixeira:
I believe you are missing a user input minimum volume check with SymbolInfoDouble.

Hi Mateus,


Thanks for the information. Below is the code for my entry and exits. Can you advise on what looks incorrect?

***

 
dereksweet:


Please insert the code correctly: when editing a message, press the button     Codeand paste your code into the pop-up window.
 
Mateus Matucuma Teixeira:
I believe you are missing a user input minimum volume check with SymbolInfoDouble.

Hi Mateus, 


Can you please advise if I am doing anything wrong in my code here that is producing the invalid volume error during the test.

  //Code Logic & Rule outline BUY
            if(FastMaArray[0] > slowMaArray[0] && FastMaArray[1] < slowMaArray[1]){
               Print("Fast Ma is now > slow ma");
               double ask = SymbolInfoDouble(_Symbol,SYMBOL_ASK);
               double SL = ask - 100 * SymbolInfoDouble(_Symbol,SYMBOL_ASK);
               double TP = ask + 100 * SymbolInfoDouble(_Symbol,SYMBOL_ASK);
               trade.Buy(.01,_Symbol,ask,SL,TP,"This is a buy");
              }
            
          //Code Logic & Rule outline SELL   
            if(FastMaArray[0] < slowMaArray[0] && FastMaArray[1] > slowMaArray[1]){
               Print("Fast Ma is now < slow ma");
               double bid = SymbolInfoDouble(_Symbol,SYMBOL_BID);
               double SL = bid + 100 * SymbolInfoDouble(_Symbol,SYMBOL_BID);
               double TP = bid - 100 * SymbolInfoDouble(_Symbol,SYMBOL_BID);
               trade.Sell(.01,_Symbol,bid,SL,TP,"This is a sell");
              }
            
 
dereksweet: Can you take a look at the attached image and help me understand why this invalid volume error is coming up when trying to test my strategy?

Read the following thread too: https://www.mql5.com/en/forum/371060

You have to adjust your volume size based on the the Lot Step and check for both Maximum and Minimum amounts. Here is an example from another thread (pay special attention to beginning and end of the code below):

Forum on trading, automated trading systems and testing trading strategies

How to calculate lots using multiplier according to number of opened orders?

Fernando Carreiro, 2017.09.01 21:57

Don't use NormalizeDouble(). Here is some guidance (code is untested, just serves as example):

// Variables for Symbol Volume Conditions
double
   dblLotsMinimum = SymbolInfoDouble( _Symbol, SYMBOL_VOLUME_MIN  ),
   dblLotsMaximum = SymbolInfoDouble( _Symbol, SYMBOL_VOLUME_MAX  ),
   dblLotsStep    = SymbolInfoDouble( _Symbol, SYMBOL_VOLUME_STEP );
   
// Variables for Geometric Progression
double
   dblGeoRatio = 2.8,
   dblGeoInit  = dblLotsMinimum;
   
// Calculate Next Geometric Element
double
   dblGeoNext  = dblGeoInit * pow( dblGeoRatio, intOrderCount + 1 );
   
// Adjust Volume for allowable conditions
double
   dblLotsNext = fmin( dblLotsMaximum,                                     // Prevent too greater volume
                   fmax( dblLotsMinimum,                                   // Prevent too smaller volume
                     round( dblGeoNext / dblLotsStep ) * dblLotsStep ) );  // Align to Step value


Error 131 when trying to publish a simple EA to the market.
Error 131 when trying to publish a simple EA to the market.
  • 2021.06.10
  • www.mql5.com
I have tried to research similar issue in the forum, and tested a few of them without success...
Reason: