
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Gidday dabbler
Thanks for joining in, do you have any ideas as to how to get this working I know its close.
Here is the EA with the changes.
Better, but you still have at least one variable with the same name as the function. I bet that isn't the only problem though.
The Lot Size seems to be switching between 00, 10 so I suspect that has something to do with the Array is that correct?
This is what I have done and its made no difference unfortunately
Don’t despair. It’s getting better even if it is not yet fixed!
The NomalizeDouble() is ok apart from the one on the LOTSIZE. This will be 1 or 2 digits depending on the minimum lotsize increment.
Ok so there is too much error data being created and it is overflowing the simulator journal even for one day’s worth of trades. Answer: comment out the buy orders to halve the data. (I just ANDed the buy test with 0 to make the test guaranteed to fail.
Next, the print function is not putting spaces between the parameters making it almost impossible to read so I added a literal space between each parameter.
Then I was getting invalid stops errors so I figured you meant to use stops in pips but have them in points so i increased the values by 10x to shut that up.
Then I was getting a different error on lotsize so I added this code before the order send functions ...
and sure enough there are loads of lotsize zero being sent.
Over to you. Move the debug print statements to see where the zero lotsize is coming from.
Attached is a mock up EA that has the original EA in it just to see was the out puts would be.
its not optimised or very good for that matter.
if you run a demo you will see the Risk by Optimal F starting at 0.00 in moving to -0.19 or something then up to a positive GBPUSD Daily was the pair and for every win it moves up depending on the size of the win and vice versa for the loss.
I have been trying to use the Risk by Optimal F as the lot size for the EA so if there is a - 0.19 that needs to = the minimum lot size for the broker.
I hope that helps out a little
Ok so bug finding is alot more difficult then first anticipated but from what I can see the zero's are coming from the entire mm script.
but is I move the print around I get a buy order insted of a sell. at 0.01 lots then it reverts back to
2011.12.16 14:58:15 2008.01.15 00:00 Kelly Experiment GBPUSD,Daily: Alert: Error opening SELL order : invalid function parameter value
2011.12.16 14:58:15 2008.01.15 00:00 Kelly Experiment GBPUSD,Daily: GBPUSD 1 0 1.9527 20 1.9562 1.9407 12332151
2011.12.16 14:58:15 2008.01.15 00:00 Kelly Experiment GBPUSD,Daily: OrderSend error 4051
2011.12.16 14:58:15 2008.01.15 00:00 Kelly Experiment GBPUSD,Daily: invalid lots amount for OrderSend function
2011.12.16 14:58:13 2008.01.14 00:00 Kelly Experiment GBPUSD,Daily: Alert: Error opening BUY order : invalid function parameter value
2011.12.16 14:58:13 2008.01.14 00:00 Kelly Experiment GBPUSD,Daily: GBPUSD 1 0 1.9598 20 1.9563 1.9718 12332151
2011.12.16 14:58:13 2008.01.14 00:00 Kelly Experiment GBPUSD,Daily: OrderSend error 4051