SeattleTrader20
New member
Any ideas on how to make sure that my exits are at least 1 day after my entries if +1% profit is reached? Else, hold until 1% is reached? Thank you.
Ruby:
#Static Variables
def discount = 0.99;
#Dynamic Variables
def one_p = open * discount;
def entry_price = one_p;
def sell_price = one_p * 1.01;
def highest_high = high;
def lowest_low = low;
#Trade Signals
AddOrder(OrderType.BUY_AUTO, one_p <= highest_high and one_p >= lowest_low, entry_price[-1]);
AddOrder(OrderType.SELL_TO_CLOSE, one_p <= highest_high and one_p >= lowest_low, sell_price[-1]);