Hi,
anyone knows how to control Lot Sizes so that it only jumps in
discrete values when the script controls the Lot Sizes with Margin?
Problem: with Dukascopy the asset UKGilt (and some others) only accepts lot sizes of min 100 and multiples of 100, but not f.i. 120.
My script (on a portfolio of 20 elements) controls the Lots by Margin:
Margin = 0.1 * OptimalF * Capital * sqrt(1 + ProfitClosed/Capital);
and the enterLong (short is similar) is like this:
enterLong(0,-priceClose(0),StopL,0,myTrail,myTrailSlope,1, myTrailStep);
enterLong() would be the same.
Is there any elegant way to define the Lot Size, for this specific asset, in steps of 100 other than using a complex if(Asset == "UKGilt") Lots = (some formula containing Margin); ?
At the time being, i suspended this asset from the portfolio because i get some error messages like
UKGilt: can't open 1207@130 (because it is 1207 and not 1200 !)
Thank you for any idea.