This board has been archived, no new registrations are allowed. Please come join us on our discord!

[Safety] pshai's Stop-Loss

General discussion about the C# Script Indicators, Safeties and Insurances
User avatar
pshai
King of Scripts
Posts: 284
Joined: Fri Mar 18, 2016 11:33 am

[Safety] pshai's Stop-Loss

Postby pshai » Thu Oct 12, 2017 2:52 am

Hey everyone!

I have been holding to do this forum post for too long... Well, now it's over!
Also, I don't think I need to explain anything for this script. It's pretty straight forward. Just set your stop-loss percentage and you are good to go. The stop-loss price is calculated from the last buy price and you wont see its line in the charts until your bot has made a buy trade and switched to "Bought". Also I have no idea if this works in margin/leverage, so I wouldn't advice that - but it knows how to use LastLongPrice.

Image

DA SETTINGS:
  • Stop Loss
    - A percentage value of how much you are willing to lose (this time you input the exact value "3" if you want your stop-loss to be 3% away!). Stop-loss price is calculated from your bots last buy price:

    Code: Select all

    stopLossPrice = lastBuy * (1 - stopLossPrc / 100)


DOWNLOAD
pshaisStopLoss.zip
(1.45 KiB) Downloaded 82 times



Extract this zip to your ScriptSafeties folder:

Code: Select all

C:\Users\_YOUR_USERNAME_\Documents\HTS\ScriptSafeties




Happy trading,
~pshai
~Thou shall profit if thou art patient.~

Check out my kingdom for custom scripts for trade bots here!

StuntmanMike
Registered User
Posts: 21
Joined: Thu Jun 08, 2017 5:12 pm

Re: [Safety] pshai's Stop-Loss

Postby StuntmanMike » Wed Oct 25, 2017 12:12 pm

Can you add an Option where the Bot Deactivates after the stop-loss is triggered ? Would be very helpfull. cause your Saftie ignores the Insurance 'Disable on Loss'


Return to “C# Script Indicators, Safeties and Insurances”

Who is online

Users browsing this forum: No registered users and 4 guests