PowerLanguage question. Days since, days within...
PowerLanguage question. Days since, days within...
I have an function that detects MACD Divergences. How do I program in PowerLanguage that if there's a MACD Bearish Divergence WITHTHIN the last 5 days, to not enter a trade ?
- TJ
- Posts: 7739
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1032 times
- Been thanked: 2221 times
Code: Select all
var: condition1 (true);
condition1 = {MACD divergence within last 5 days};
if condition1 = false then
begin
{your strategy code}
end;
- TJ
- Posts: 7739
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1032 times
- Been thanked: 2221 times