PDA

View Full Version : Stop loss = 1? huh?



Laumamivemo97
03-30-2009 12:31, 12:31 PM
Hi Guys,

You have been very useful but wondering if you could help explain this...

When I conduct my EA, the print command shows me the value for var3 (my stop) is 1. How does this develop this amount?


Here is the output:
Recmax: 1.9859 Recmin: 1.9782 Stop: 1

Im hoping the value to be 50 points then Recmax which would be like 1.9359



==========
Code
==========



int var3 = NormalizeDouble(RectanglePriceMax,Digits)-500*Stage;

OrderSend(Symbol(),OP_BUYLIMIT,1,NormalizeDouble(R ectanglePriceMin,Digits),3,var3,NormalizeDouble(Re ctanglePriceMin,Digits) 500*Stage,Order Sent, 16384,0,Green);


Printing(Recmax:, RectanglePriceMax, Recmin:, RectanglePriceMin, Stop: , var3, This is really for its bullish pattern);

lmislinilis
10-19-2021 17:15, 05:15 PM
Is that a mistake you made posting here or is there really a gap in your code
here : int var3 = NormalizeDouble(RectanglePriceMax,D igits)-500DecisionStage;

its supposed to be Digits...

Laumamivemo97
10-19-2021 18:36, 06:36 PM
Hmm I donno why when I copied it Occurred, but I took out There and put it into notepad and there was N't Any Distances, so retyped it in ... but ran it and got the Exact Same value of 1 ... hmmmm

samasapkm
10-19-2021 19:57, 07:57 PM
Recmax: 1.9859 Recmin: 1.9782 Stop: 1

Im hoping the value to be 50 points less then Recmax which would be like 1.9359

...

int var3 = NormalizeDouble(RectanglePriceMax,Digits)-500*Stage;
Hello, trader346, the error is that you announce var3 as an 'int' but assign a double value to it, so it gets truned to an integer (in this case to '1').

Try this:

dual var3 = NormalizeDouble(RectanglePriceMax,Digits)-500*Point;

Laumamivemo97
10-19-2021 21:18, 09:18 PM
Wicked, thanks so far!