Hello There!
I'm new at coding but have experience on technical analysis. If you can help me to create a algo for my logic it would be great!
There will be two stocks and all money will be invested in these two stocks at all time. Either %1 to %99 or %50 to %50.
If SPY 500 index's macd is over zero line and fast ma crossed above slow than portfolio should be %70 stock A and %30 Stock B
If SPY 500 index's macd is over zero line and fast ma crossed below slow than portfolio should be %50 stock A and %50 Stock B
If SPY 500 index's macd is crossed zero line than portfolio should be %40 stock A and %60 Stock B
If SPY 500 index's macd is crossed zero line and fast moving average is below slow moving average than portfolio should be %30 stock A and %70 Stock B
No re balancing and time frame should be 5 min.
Thank you for your help in advance.