Optuma Forums › Optuma Scripting › Composite Modeling › Reply To: Composite Modeling
December 31, 2021 at 2:52 am
#67053
- Topics: 7
- Replies: 5
- Posts: 12
One more thing:
Hi,
Working on a different model that includes Keltner channels and Bollinger Bands. I need to set bull +1 and bear -1 conditions on crosses above and below the upper and lower band and channel lines. Here’s what I have now (I pretty sure it incorrect as the compiler won’t accept it).
1 2 3 |
// BOLLINGER BANDS (125,1) BULLISH (+1) ON UPPER BAND CROSS, BEARISH (-1) ON LOWER BAND CROSS BB1=BB(BARS=125, STDDEV=1.000000); // TO SETUP BULL BEAR PARAMETERS BB2=BB1 CrossesAbove BB(BARS=125, STDDEV=1.000000); BB3=BB1 CrossesBelow BB(DEFAULT=LowerLine, BARS=125, STDDEV=1.000000); // TO SETUP SWITCH AND IF STATEMENT BB4=SWITCH(BB2,BB3) RES2=IF(BB4==1,1,-1); |
My question is, is there dot notation that can be used to delineate the upper and lower channels and bands or is there another way?