Posted By: jari
Stop is set but enterLong() sets a very different stop level - 11/07/22 15:12
I did this in run():
When I did a print of Stop and then do enterLong(), log says:
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!!
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!!