Archive for the ‘Metatrader’ Category
Whittaker COT Index Variant-A
If you are a currency trader it can be quite annoying when you cannot access volume data as you can in other markets. This can be instrumental to ones success if your strategy from another insrument outside of Forex requires some type of volume indicator. Although it is not perfect you can use the futures.
Whittaker Volatility Breakout Indicator
I wanted to share with everyone an indicator that I programmed and I find very useful. It is called the Whittaker Volatility Breakout Indicator or WVBI. The purpose of this indicator is to represent the range of a bar in percentage terms rather than in points. I think the flaw of most traders or programmers.
MT4 strategy opens a new position as soon as an old one is closed
One of the most common mistakes when people start programming automated trading strategies is they do not consider all of the different phases your strategy will be in. For instance, I recently had a friend show me their strategy that was opening a new position as soon as the old one was closed. It didn’t matter.
A function to determine why an order cannot be opened
Here is an example of a function which will display the actual error for why you cannot open a trade in MetaTrader. This is more descriptive then what you get by default. OrderSend(Symbol(),OP_SELL,LOT,Bid,2,SL,TP,”",-1,3); //First you want to send an order if it fails error will = -1 so the code below will kick in if (error==-1).
How to only allow one trade per bar in MetaTrader
When trading in MetaTrader you may find times when you only want to allow one trade to take place per bar. This can be accomplished with the code below. datetime Time0 = 0; //Create a global variable Time0 void start() //This is your start function { if (Time0 != Time[0]) //If the Time0 variable we created.
Using an array to determine a new bar in Metatrader
Recently I had a friend ask me why his array was not accurately portraying the last 30 bars of data. It is important when you create an Array that you are only changing its variable when the bar closes or opens. Otherwise your array would be getting updated during every single tick(or multiple times within.

