Gamestudio Links
Zorro Links
Newest Posts
SGT_FW
by Aku_Aku. 11/30/26 08:19
Removing outliers from files
by JeyKey II. 11/29/26 10:01
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 12,366 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Stop is set but enterLong() sets a very different stop level #486887
11/07/22 15:12
11/07/22 15:12
Joined: Jan 2021
Posts: 19
J
jari Offline OP
Newbie
jari  Offline OP
Newbie
J

Joined: Jan 2021
Posts: 19
I did this in run():
Code
#define INFINITY_SUBST 1000

function run() {
	.
	.
	.
	Margin = slider(1,2000,100,10000,"Margin Allocated");
	Stop = price(0) / INFINITY_SUBST;
	Risk = Margin / 200.0;
}


When I did a print of Stop and then do enterLong(), log says:
Code
Stop 0.00000002

[xxxxxx::L00101] Long x@0.000019520 Risk 0  at xx:xx:xx
Stop 0.000019500


Why is the 0.00000002 Stop not honoured when enterLong happens?
(basically I want the stop to be practically 0 and let Risk determine the lot size)

Thank you!!

Re: Stop is set but enterLong() sets a very different stop level [Re: jari] #486894
11/08/22 09:51
11/08/22 09:51
Joined: Apr 2008
Posts: 604
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 604
Austria
Your 0.00000002 is a stop distance, not a stop level.

https://zorro-project.com/manual/en/stop.htm

Re: Stop is set but enterLong() sets a very different stop level [Re: Petra] #486898
11/08/22 13:34
11/08/22 13:34
Joined: Jan 2021
Posts: 19
J
jari Offline OP
Newbie
jari  Offline OP
Newbie
J

Joined: Jan 2021
Posts: 19
Hmm just realised that, for Stop, "If the value is less than half the asset price, Zorro assumes that it's a distance, otherwise it's a price level"
i.e. the stop level can't be more than half of asset price

Ref: https://zorro-project.com/manual/en/stop.htm


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1