Gilgameash
New member
so i have this snippet of code that basically say if my strategy HASN'T gained more than $500 for the day allow any more trades.
when i add "allow_more_trades" as condition to my actual ADDORDER it just doesn't work.
does any one have a clue why that is?
when i add "allow_more_trades" as condition to my actual ADDORDER it just doesn't work.
does any one have a clue why that is?
Code:
def timeopenEntryy = 0930;
input daily_gain = 500;
def FPL_at_timeopenEntry = if SecondsFromTime(timeopenEntryy) == 0 then FPL() else FPL_at_timeopenEntry[1];
def FPL_Line = FPL_at_timeopenEntry;
def s= reference floatingPL();
def threshold = FPL_at_timeopenEntry + daily_gain;
plot LogicPlot = if(s) > threshold then FPL() else Double.NaN;
LogicPlot.SetDefaultColor(Color.GREEN);
def allow_more_trades= !logicplot;