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

Stuck on a simple issue...

  • I have been racking my brain (still a somewhat newbie to BT) on how to setup this simple strategy:

    You have two sma's (or any indicator really) and you LONG when both are rising (together), you EXIT LONG when either/or are falling. Reverse for SHORT. You SHORT when both are falling (together) and you EXIT SHORT when either/or are rising.

    So you have 3 possible positions: LONG, SHORT OR OUT. I can code a LONG only with an EXIT(OUT) fine, but I cannot figure out how to combine the LONG and SHORT together. I have looked at bt.SIGNAL_LONGSHORT signals, other peoples code and I just can't figure it out. Thanks for any help!!

Log in to reply