For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See:

Why buy/sell orders are not issued

  • Firs of all thank you for the awesome library, gret job done!

    I'm studying an example with SmaCross strategy from library. I use 10000$ investment cash and PercentSizer = 100 on TSLA stock . What I notice is that at some crossovers the buy order is not issued even though there's enough available cash, please see pic below where the courser is.

    Figure 0_315.png

    If I reduce the PercentSizer to 95, buy/sell orders seems fine. If I understand the sizer well (by def: This sizer returns percents of available cash), there's enough cash to buy many stocks at that point, so why the buy order is not issued?

  • Since nothing is shown except the diagram, here ia the guess - 100% size was calculated based on the bar close price and order issued. Next bar open price was higher, therefore it was not enough cash to by the size and order was cancelled.

  • @ab_trader Thank you, that answers the question.

Log in to reply