Hi everyone!
I have a great code here that I like to share with you in ProRealCode, but I cannot translate it. Anyone who can help?
{Strategy inputs}Inputs: P1 (98), P2 (22), myFraction (1.75), SL(600); {Strategy variables}Vars: myPOI(0), myDistance (0), BO_level (0), EntryCondLong (false); {Point Of Initiation}myPOI = CloseD(1); //Yesterday ́s daily CLOSE {Distance}myDistance = AvgTrueRange(14) * myFraction; {Entry breakout level – calculates WHERE to enter}BO_level = myPOI + myDistance; {Entry condition – calculates WHEN to enter}EntryCondLong = DMIPlus(P1)<= DMIMinus(P2); {Entry order – enter WHEN and WHERE criteria met}If (MarketPosition = 0 or time = SessionEndTime(0,1)) and EntryCondLong then Buy next bar at BO_levelstop; {Exits – Exit on STOPLOSS or AT THE END OF THE DAY}setstoploss(SL);SetExitOnClose;
Cheers!