Hi all,
I tried to put Stop Loss on yesterday's high but get the message:
"floating-point division by zero" ..someting. And the signal is turn off.
I tryed to use:
if (condition3 and condition4) then begin
sellshort ( "SmiSE" ) 3 contract next bar at market;
setstopcontract;
Set Stop Loss((HighD(1)/entry price)*entry price
end;
Anybody have any suggestions?
Or am I thinking completely wrong?
Thanks!
StopLoss error
- TJ
- Posts: 7740
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2221 times
Hi TJ,
Thank for your answer.
Some of the text is in swedish. All the text is someting like:
-----------------------------------------------------
Message: Error in study "NiC Setup_test2" :: {EXCEPTION}
Floating-point Division by zero
-----------------------------------------------------
Thanks
Thank for your answer.
Some of the text is in swedish. All the text is someting like:
-----------------------------------------------------
Message: Error in study "NiC Setup_test2" :: {EXCEPTION}
Floating-point Division by zero
-----------------------------------------------------
Thanks
- Attachments
-
- error.jpg
- (50.11 KiB) Downloaded 531 times
- TJ
- Posts: 7740
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2221 times
Hi TJ,
Thank for your answer.
Some of the text is in swedish. All the text is someting like:
-----------------------------------------------------
Message: Error in study "NiC Setup_test2" :: {EXCEPTION}
Floating-point Division by zero
-----------------------------------------------------
Thanks
you have to search your code and find any divisions...
make sure the denominator is not zero.
- TJ
- Posts: 7740
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2221 times
...
It seems to work.
Thanks TJ!
you are welcome.
also see this post on SetStopLoss:
http://forum.tssupport.com/viewtopic.php?t=6929