PlusEVTrades
New member
I'm attempting to get a price at the time when my study becomes true. For example, when macd crosses over, can I assign the current "mark" to a variable?
I'd like to use that price for an addorder on a later bar.
I'm not quite sure where to start on code, but lets say for example
:
Something to that effect seems like the logic I'd be using but I'm not sure if I can obtain price.
I'd like to use that price for an addorder on a later bar.
I'm not quite sure where to start on code, but lets say for example
:
Code:
def macdsignal = value crosses above signal line;
def entrytargetprice = price when macdsignal is true;
AddOrder(OrderType.BUY_TO_OPEN, price crosses below entrytargetprice,entrytargetprice,
100,tickcolor = GetColor(0), arrowcolor = GetColor(0), name = "BuyOrder100");
Something to that effect seems like the logic I'd be using but I'm not sure if I can obtain price.