Hi nicholi,
Yes agreed, it is not the intent of the magic numbers to be used like this, but I am unable to find any other way to give each order a unique number that I can refer back to so that number can be used to set the orderopenprice.
for instance, if a position is filled under slippage (so instead of .7273 it gets filled at .7275) and then if that position goes into profit and I set say a stop at breakeven or higher, I want to reopen a pending order at .7273 and not at the price it was actually opened at (in this case .7275). Hence the reason I am giving each order a magic number that is calculated at the init stage.
if there was another way I could give each order a unique number then that might solve my problem
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi All,
Anyone want to take a crack at this?
This code will ask for inputs, so in this case the following were entered
2019.03.11 11:56:18.393 2016.01.04 00:00:00 12th March inputs: Lots=0.01; ProfitTarget=40; UpperLimit=0.85; LowerLimit=0.6; bias=0; StopTrigger=80; SOP=0.7273;
for some reason which for the life of me I cannot work out, some of my orders (these are pending orders by the way) the magic number will come out 1 digit different to the pricelevel, and for other orders it comes out the same
As can be seen from this screenshot of my Journal (attached), some sellstops have different magicnumbers to the pricelevels, others are the same
i am stumped on this one
btw, this is on the AUDUSD chart