Common Conf-StopPNL
The configuration of stop-profit and stop-loss can be flexibly matched with various selling methods through inactivity sell, fixed/dynamic mode...
Last updated
The configuration of stop-profit and stop-loss can be flexibly matched with various selling methods through inactivity sell, fixed/dynamic mode...
Last updated
price goes up or goes down X%:
goes up, sell price = buy price x (1 + X%)
goes down, sell price = buy price x (1 - X%)
sell Y%:
sell amount mode is "based buy amount":
sell amount = your buy quantity x Y%
sell amount mode is "based hold amount"
sell amount = your current hold quantitiy x Y%
tier mode:
fixed tier:
if sell amount is based buy amount:
for stopProfit tiers: could config 7 tiers at most and sum of Y% must be 100%
for stopLoss tiers: could config 2 tiers at most and sum of Y% must be 100%
if sell amount is based buy hold amount:
for stopProfit tiers: could config 7 tiers at most and at least one tier Y% must be 100%, means sellOut
for stopLoss tiers: could config 2 tiers at most and at least one tier Y% must be 100%, means sellOut
dynamic tier: If the fixed 7tiers could not fit your demand, dynamic tier maybe a better choice
dynamic tier works with these 3 parameters:
price goUp(%)
sell amount(%)
extra tiers(num)
To express the dynamic tier rules more clearly, assume the following configuration:
StopProfit contain 2 tiers:
s1. price goes up 30%, sell 70%
s2. price goes up 70%, sell 10%
dynamic tier parameters:
price goUp(%): 5%
sell amount(%): 7%
extra tiers(num): 10
If sell amount based buy amount:
if sum Y% of stopProfit tiers reached 100%, will not auto generate new tier for you.
if sum Y% of stopProfit tiers less than 100%, will auto generate new tier for you based dynamic tier params until sum Y% reached 100%:
s3. price goes up 5%, sell 7%
s4. price goes up 5%, sell 7%
s5. price goes up 5%, sell 7%
s6. price goes up 5%, sell 5%(not 7% because reached 100%)
if sell amount based hold amount:
no matter sum Y% of stopProfit reached 100% or not, will always generate new tier for you until the num of new tiers reached extra tiers(num) param:
s3. price goes up 5%, sell 7%
s4. price goes up 5%, sell 7%
...
s11. price goes up 5%, sell 7%
s12. price goes up 5%, sell 100%
retraceMethod and PriceRatio(%):
retraceMethod means retracementSellout launch time point:
atBuyLanded: copy trade buy and the transaction landed, auto calc out:
retracementPrice = basePrice x (1 - retracePriceRatio%)
at this moment the basePrice = buyPrice
atStopProfitLanded: when the 1st time stopProfit triggered and tx landed, auto calc out:
retracementPrice = basePrice x (1 - retracePriceRatio%)
at this moment the basePrice = sellPrice
when CA price goes up and greater than basePrice, will auto update basePrice and reCaculate the retracementPrice
when CA price goes down and lower than retracementPrice , will auto trigger retracementSellout.
RetracementSellout brings the fololowing two advantages:
after launched, if price continue goes up, the retracementPrice goes up too, if price goes down and lower than the retracementPrice, auto sell will be triggered. "Dynamic stop loss" relative to the highest price can better lock in profits and reduce losses.
after launched, if price continue goes down and lower than the retracementPrice will trigger sellout. It can be considered as another type of stop loss configuration.
InactivitySell(1st|2nd seconds):
1st inactivitySell seconds: when your buy tx landed, during N seconds there's no other action trigger sell, will auto sell the 1st tier of the StopProfit tiers
if set to 0, will ignore this conf
2nd inactivitySell seconds: when your buy tx landed, and after 1st inactivitySell executed, during N seconds there's no other action trigger sell, will auto sell:
if 2nd inactivity sell mode is "sell 1by1": interval sell one tier of the StopProfit tiers.
if 2nd inactivity sell mode is "sellout all tiers": sellout the tokens you hold at one time.
if set to 0, will ignore this conf
If inactivitySell activated start run but not reached the execution time and stopProfit sell triggered during this time
1st inactivitySell task will auto stopped
2nd inactivitySell task's execution time will be reset to:
current time + seconds of the 2nd inactivitySell you configed