Download MetaTrader 5
To add comments, please log in or register
Do you have idle PCs? Connect them to MQL5 Cloud Network and earn money!
Richard Caughell
610
Richard Caughell 2014.10.19 20:27 
Im curious if you are able to alter or eliminate the spread when doing backtesting and for optimization (only using BID price) ?

I have found older coding, but it doesnt seem to work on the 711 Mt4 build, maybe Im doing some wrong ?

Or pointing me in the right direction ? Im trying to develop different EAs for binary options, where spread, doesnt really come into play, for optimization and backtesting for different strategies.

http://prices.mt4i.com/spreadcontroller.aspx
whroeder1
13593
whroeder1 2014.10.20 00:54  
COGSx86: Im curious if you are able to alter or eliminate the spread when doing backtesting
You specify the spread at the start of the run. spreadWhat is the problem?
Richard Caughell
610
Richard Caughell 2014.10.20 02:15  
COGSx86:

Hahaha


 I want to eliminate the spread or set it to 1 on 5 decimal price, the lowest is 2, which turns out to be no where near what I want,

example



BId price is 1.36476 at OPEN on a 30 minute chart, CLOSE for the same candle is 1.36420


however when I run the EA, I get

OPEN Price - 1.36490

CLOSE PRICe - 1.36417


I want my EA to take exact price that is on the candle, for OPEN and CLOSE

Keith Watford
Moderator
7873
Keith Watford 2014.10.20 04:03  
COGSx86:

example



BId price is 1.36476 at OPEN on a 30 minute chart, CLOSE for the same candle is 1.36420


however when I run the EA, I get

OPEN Price - 1.36490

CLOSE PRICe - 1.36417


I want my EA to take exact price that is on the candle, for OPEN and CLOSE


Just over-write it with a 1
Richard Caughell
610
Richard Caughell 2014.10.20 06:07  
GumRai:
Just over-write it with a 1

how do I do that ?

Carl Schreiber
5930
Carl Schreiber 2014.10.20 07:03  
COGSx86:

example

I want my EA to take exact price that is on the candle, for OPEN and CLOSE

The chart shows only bid prices! So if you open and close an order one of them will be the Ask-Price that you don't see on the chart!
Keith Watford
Moderator
7873
Keith Watford 2014.10.20 07:15  
COGSx86:

how do I do that ?


Don't click on the drop down box, click on the spread value and substitute it with a 1.

Unfortunately, you can't set it to zero as it then defaults to the current spread. 

/
To add comments, please log in or register