Hi everyone, I'm having a bit of trouble getting an accurate placement of my automated sell limit and I hoping someone can identify the source of my problem.
The issue is specifically this: When my sell limit generates, the target amount is usually off by between 0.01 to 0.03 cents.
So for example, if I buy at $10.00, and the program is supposed to set a 0.03 point target for $10.03, the program erroneously generates the sell limit anywhere between 10.01 and over.
Here's a brief example of the problem:
In case it helps, here are some things I noticed while testing that might help shed light on the issue:
1. The sell limit does (at times) target the correct price level (for example $10.03).
2. The sell limit placement seems completely random (that is, never really commits the same erroneous price level twice in a row, such a 10.02, 10.02, etc.).
Any help or a point in the right direction would really be appreciated.
The issue is specifically this: When my sell limit generates, the target amount is usually off by between 0.01 to 0.03 cents.
So for example, if I buy at $10.00, and the program is supposed to set a 0.03 point target for $10.03, the program erroneously generates the sell limit anywhere between 10.01 and over.
Here's a brief example of the problem:
PHP Code:
function preMain(){
//some options
}
function main(some preMain variables){
// Some actons
// Wait conditions for entry
if(conditions){
SellLimitLevel = getMostRecentAsk()+someValue; //try to get ask value
LimitOrderID = Trade.sellLimit(SellLimitLevel, getSymbol()); // sell limit levels seem to have different values with current ask + someValue - I think that this might be where the problem is.
}
}
In case it helps, here are some things I noticed while testing that might help shed light on the issue:
1. The sell limit does (at times) target the correct price level (for example $10.03).
2. The sell limit placement seems completely random (that is, never really commits the same erroneous price level twice in a row, such a 10.02, 10.02, etc.).
Any help or a point in the right direction would really be appreciated.
Comment