Results in variables processed by formula
-
@jstap said in Results in variables processed by formula:
@duepips nothing, just misses the normalise place sometimes: buy1=(DoubleToString(buy1,2) + DoubleToString(OrderLots(),2));
buy2=(OrderOpenPrice()*OrderLots()+buy2);
buy3=(buy2/buy1);

it does not work
-
@duepips Add another variable, buy4=(DoubleToString(buy,2,2);
-
@jstap said in Results in variables processed by formula:
@duepips Add another variable, buy4=(DoubleToString(buy,2,2);
but the formula is complete! there is some incompatibility problem on the generated code, anyway thanks
-
@duepips Wright the code this way:
buy1=(DoubleToString(buy1,2) + DoubleToString(OrderLots(),2));
buy2=DoubleToString(OrderOpenPrice()*OrderLots()+buy2,2);
buy3=(buy2/buy1); -
@jstap said in Results in variables processed by formula:
@duepips Wright the code this way:
buy1=(DoubleToString(buy1,2) + DoubleToString(OrderLots(),2));
buy2=DoubleToString(OrderOpenPrice()*OrderLots()+buy2,2);
buy3=(buy2/buy1);not work, lots not load
-
@duepips Worked for me.
-
-
@duepips what's not working, test each line and variable separately, let me know if something isn't working.
-
@jstap said in Results in variables processed by formula:
what's not working, test each line and variable separately, let me know if something isn't working.
it doesn't load anything, you see the data on the graph
-
@duepips Do you mean the comment on chart? Check each element separately, if it doesn't work say what's not working and add the latest shared link.
-
@jstap said in Results in variables processed by formula:
@duepips Do you mean the comment on chart? Check each element separately, if it doesn't work say what's not working and add the latest shared link.
the problem lies in the fxdreema code that when there are many example positions: 10 positions of 0.01 Buy and 9 of 0.01 Sell instead of writing the difference between Buy and Sell of 0.01 sometimes writes 0.0090000000002 or 0.01000000002, the problem lies in the fxdreema code or in meatatrader
-
@duepips Use the bucket of trades to get all combined values, then DoubleToString if result needs normalised.
-
@jstap said in Results in variables processed by formula:
@duepips Use the bucket of trades to get all combined values, then DoubleToString if result needs normalised.

I've already tried the bucket block too, I don't know what else to try -
@duepips Using bucket is much easier, tell me what block is responsible to this value, add the latest link so what's causing this can be assessed.
-
@jstap said in Results in variables processed by formula:
@duepips Using bucket is much easier, tell me what block is responsible to this value, add the latest link so what's causing this can be assessed.
this bucket https://fxdreema.com/shared/vE1cP0egc creates the same error, instead of 0.02 (the difference of the lots between buy and sell) write 0.0199999999999999

-
@duepips Project wouldn't load.
-
@jstap said in Results in variables processed by formula:
@duepips Project wouldn't load.
try now i fixed the link
-
@duepips Am not sure what you are doing, strip this back so you are trying to only get results into 1 variable, once you have the lots into a variable the code is the same as I showed before.
-
@jstap said in Results in variables processed by formula:
Am not sure what you are doing, strip this back so you are trying to only get results into 1 variable, once you have the lots into a variable the code is the same as I showed before.
this: https://fxdreema.com/shared/SlN4bBvdb
I'm doing the buy lots minus the sell lots using the formula, the correct calculation is: (0.03 - 0.01 = 0.02) the result of the formula instead gives 0.019999999999999997

-
@duepips Try and add this:

