stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Pip Factor
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3223
Page 1 of 1
Author:  zTB [ Tue Oct 29, 2013 5:36 am ]
Post subject:  Pip Factor

In the Steve Hopwood Shell auto trading robot code - bare bones found here

http://www.stevehopwoodforex.com/phpBB3 ... ?f=15&t=79

is the very useful pipFactor code found in Lines 371 to 375.

Code: Select all

//Calculating the factor needed to turn pip values into their correct points value to accommodate different Digit size.
//Thanks to Lifesys for providing this code. Coders, you need to briefly turn of Wrap and turn on a mono-spaced font to view this properly and see how easy it is to make changes.
string          pipFactor[]  = {"JPY","XAG","SILVER","BRENT","WTI","XAU","GOLD","SP500","S&P","UK100","WS30","DAX30","DJ30","NAS100","CAC400"};
double          pipFactors[] = { 100,  100,  100,     100,    100,  10,   10,    10,     10,   1,      1,     1,      1,     1,       1};
double          factor;//For pips/points stuff. Set up in int init()
I presently manually trade a number of CFDs. But I am thinking and planning ahead for a time when I may want an EA to assist in trading. Therefore, I think it would be useful if more instruments are added to the above code. I have prepared a list with suggested pipFactors and this in attached as an Excel file.

Any assistance in this matter will be greatly appreciated.

A few days ago I sent a PM to Lifesys, and received a fairly detailed advise below, but because of my ignorance of the finer points of programming I cannot make any sense of it.
I honestly do not know. It is not always that simple, depending on the min. quantities per trade, numb significant digits etc. Pipfactor works well for currencies as we know significant digits but I never traded any of those commodities. Just open a small trade in each and see how such as iExposureTickets copes with your figures.
Z
Author:  milanese [ Tue Oct 29, 2013 7:55 am ]
Post subject:  Re: Pip Factor

:D subscribed :D
All times are UTC Page 1 of 1