meatskin2000 1 Posted June 27 Could someone help me set this script to “risk 1R to make 1.25R” so either I lose 1R or profit 1.25R? thx in advance. Short CXL ALLSYMB; $buyprice=Bid; $risk=69; $mystop=price; $pricetostop=$mystop-$buyprice; $target=Bid-$pricetostop-$pricetostop-$pricetostop; $amount=$risk/$pricetostop; ROUND2; StopPrice=$mystop; SShare=$amount; Share=$amount; TogSShare; ROUTE=LIMIT; Price=$buyprice; TIF=DAY+; SELL=Send; TriggerOrder=RT:STOP STOPTYPE:RANGEMKT LowPrice:$target HighPrice:$mystop ACT:BUY QTY:POS TIF:DAY+; Long CXL ALLSYMB; $buyprice=Ask; $risk=69; $mystop=price; $pricetostop=$buyprice-$mystop; $target=3*$pricetostop+Ask; $amount=$risk/$pricetostop; StopPrice=$mystop; StopPrice=ROUND2; SShare=$amount; Share=$amount; TogSShare; ROUTE=LIMIT; Price=$buyprice; Price=ROUND2; TIF=DAY+; BUY=Send; TriggerOrder=RT:STOP STOPTYPE:RANGEMKT LowPrice:$mystop HighPrice:$target ACT:SELL QTY:POS TIF:DAY+; Share this post Link to post Share on other sites
peterB 322 Posted June 27 Long change $target=3*$pricetostop+Ask; to $targettmp=$pricetostop*1.25;$target=$targettmp+Ask; Short change $target=Bid-$pricetostop-$pricetostop-$pricetostop; to $targettmp=$pricetostop*1.25;$target=Bid-$targettmp; i might update the article with this more elegant solution so you can just change 1.25 to whatever number you need. Share this post Link to post Share on other sites