♥ 0 |
Hi, I am trying to make a very a basic strategy but I am getting a Expected Double Error on my AddOrder(). I am new to this so my apologies if I made a novice mistake. <pre></pre> # plot 200EMA # Show signal where macd crosses def Value = MovingAverage(averageType, close, fastLength) – MovingAverage(averageType, close, slowLength); def Diff = Value – Avg; def UpSignal = if Diff crosses above ZeroLine then ZeroLine else Double.NaN; # value = fast ; avg = slow plot macd_up_arrow = MACD_bull_cross; def MACD_bear_cross = if # adds label in left corner either ‘uptrend’ or ‘downtrend’ depending on emas # plot a dot where close price is within 1 tick of 200EMA long_ema_bounce_buy.SetPaintingStrategy(PaintingStrategy.BOOLEAN_POINTS); # LONG ONLY ABOVE 200EMA w/ confirming 13EMA <pre></pre>
Marked as spam
|
Private answer
Please make sure you search the forum before posting a new question. This one has already been asked. The answer I provided was intended to cover every square millimeter of the AddOrder() statement. So your particular issue is addressed as well as many others. Check it out here: https://www.hahn-tech.com/ans/noob-tick-naming-issue/ Marked as spam
|
Please log in to post questions.