0

I tried to extract it from the manual but it is not clear to me, could not identify which argument of strategy.entry() is the leverage.

strategy.entry(id, direction, qty, limit, stop, oca_name, oca_type, comment, when, alert_message) → void

For the balance portion amount, perhaps I can always calculate it so it can be handled. strategy.position_size? Is this the right approach? And the right function?

And How to specify leverage and portion-of-account-balance in strategy('s code)?

I see that in the strategy settings panel, the amount can specified but what part of the code does this? O' the contrary, I don't see a leverage on this panel.

Strategy Settings Panel

Here's Currency.com's Order Panel I established my approach on.

Currency.com's Order Panel

Vendrel
  • 865
  • 9
  • 19

1 Answers1

1

the first line where you pick indicator/strategy/library

the * 5 is one thing you can do for leverage or you can adjust the qty of your order in your strategy.entry call.. but really leverage has a lot of weird fees and margin requirements plus like a safety/risk fee you can find them on your exchanges fee information..

FFriZz
  • 26
  • 2
  • Oh, it's cool! And how to alter it for the case when the positions' size is based on not qty but equity-percentage? (As we can specify it in the Strategy Settings Panel but I don't find the variable in the code of the Strategy though.) I have just posted another question in this topic. Would you please look into it when you have time, and include this detail into the answer? https://stackoverflow.com/questions/72115590/how-to-set-up-a-strategy-properly-v5 I "can't not" thank it to you. :) – Vendrel May 04 '22 at 15:31