You jestThis is an extremely interesting contribution to ET, so thank you. I too, however, couldn't read the attached file.
You jestThis is an extremely interesting contribution to ET, so thank you. I too, however, couldn't read the attached file.
I was not jesting.You jest
Please tell, what did you gain in knowledge?I was not jesting.
Please stop being so toxic. This is not good for the community.Please tell, what did you gain in knowledge?
Please stop being so toxic. This is not good for the community.
From my very limited knowledge of AmiBroker Formula Language (AFL) and Spanish, I think the logic from the comment for the original code at the end isHere’s the file, I can’t attach it to the original post, I think 24h later it doesn’t allow editing. Thanks for the post piezoe!
if in long trade
if close(intermarketAsset) > SimpleMovingAverage(intermarketAsset, 4)
and close(tradingAsset) > SimpleMovingAverage(tradingAsset, 4)
exit long at next bar open
if in short trade
if close(intermarketAsset) < SimpleMovingAverage(intermarketAsset, 4)
and close(tradingAsset) < SimpleMovingAverage(tradingAsset, 4)
exit short at next bar open
if close(intermarketAsset) < SimpleMovingAverage(intermarketAsset, 4)
and close(tradingAsset) < SimpleMovingAverage(tradingAsset, 4)
enter long tradingAsset at next bar open
if close(intermarketAsset) > SimpleMovingAverage(intermarketAsset, 4)
and close(tradingAsset) > SimpleMovingAverage(tradingAsset, 4)
enter short tradingAsset at next bar open
Toxic because you are caught out talking bs?Please stop being so toxic. This is not good for the community.
Any chance you can post the whole code?From my very limited knowledge of AmiBroker Formula Language (AFL) and Spanish, I think the logic from the comment for the original code at the end is
Code:if in long trade if close(intermarketAsset) > SimpleMovingAverage(intermarketAsset, 4) and close(tradingAsset) > SimpleMovingAverage(tradingAsset, 4) exit long at next bar open if in short trade if close(intermarketAsset) < SimpleMovingAverage(intermarketAsset, 4) and close(tradingAsset) < SimpleMovingAverage(tradingAsset, 4) exit short at next bar open if close(intermarketAsset) < SimpleMovingAverage(intermarketAsset, 4) and close(tradingAsset) < SimpleMovingAverage(tradingAsset, 4) enter long tradingAsset at next bar open if close(intermarketAsset) > SimpleMovingAverage(intermarketAsset, 4) and close(tradingAsset) > SimpleMovingAverage(tradingAsset, 4) enter short tradingAsset at next bar open