♥ 0 |
Ive been playing with a strategy that uses MACD, RSI and VWAP to choose entry and exit points. All of the individual parameters work but I cant figure out how to format the SELL_AUTO statement to choose between 3 different possibilities. The character limit wouldnt let me post all of the code so the segment below is where Im having truoble. Thanks def selTrig; if diff < 0 and price is less than VWMA [then] {selTrig = 1; } else if rsi is greater than or equal to 67 and diff crosses below 0 [then] {selTrig = 1; } else {selTrig = 0; } AddOrder(OrderType.BUY_AUTO, diff crosses above 0 and rsi is less than 37 within 6 bars and rsi is greater than or equal to 33 within 1 bars , tickColor = GetColor(0), arrowColor = GetColor(0), name = "MACD+RSI_LE"); AddOrder(OrderType.SELL_AUTO, selTrig = 1, tickColor = GetColor(1), arrowColor = GetColor(1), name = "MACD+RSI_LX");
Marked as spam
|
Please log in to post questions.