Close in profit in multi stategy EA
5件の返信
Hello all…..
please advise…
I am developing a strategy where 4 different strategies (2 long and 2 short) are all working in one EA…. All these strategies are independant of each other, with different magic numbers….. No stop Loss but hegding
As an example the two long strategies go into drawdown as the market falls and obviously the short strategies continue trading against the floating drawdown from the making profit against the drawdown and adding…….
So through the Shorts continuing to trade against the floating drawdown, How do I CLOSE ALL positions when The Account balance exceeds, is greater by 100pips than the floating loss
For example an account Balance £1500 and P&L $-400 I close ALL Positions leaving a Total Account Balance $1100.
But lets say the floating Loss is at $700 I do not want to exit or close positions but wait until it reaches $400
Eamon
0
Hello all…..
please advise…
I am developing a strategy where 4 different strategies (2 long and 2 short) are all working in one EA…. All these strategies are independant of each other, with different magic numbers….. No stop Loss but hegding
As an example the two long strategies go into drawdown as the market falls and obviously the short strategies continue trading against the floating drawdown from the making profit against the drawdown and adding…….
So through the Shorts continuing to trade against the floating drawdown, How do I CLOSE ALL positions when The Account balance exceeds, is greater by 100pips than the floating loss
For example an account Balance £1500 and P&L $-400 I close ALL Positions leaving a Total Account Balance $1100.
But lets say the floating Loss is at $700 I do not want to exit or close positions but wait until it reaches $400
Eamon
you make a variable lets call it “amountexeed”
you make another variable of type bool lets call it y “isexceedamount”
you make another variable call it amountrecovered
On tick if amountProfit() <= amountexceed (-700$ or -200pips)
{
isexceedamount=true
}
now still in ontick function
another function is called
if(isamountexceed == true && (amountProfit amountexceed)){
closeallpositions();
}
thats a pseudocode use it and type such logic
iPhoneの「Tapatalk」から送信
0
Thank you Gentmat,
I understand how to make variables in EA wizard, but I’m do not understand ontick function
When you say “ontick function” are you talking about Costum coding in EA wizard?
0
Thank you Gentmat,
I understand how to make variables in EA wizard, but I’m do not understand ontick function
When you say “ontick function” are you talking about Costum coding in EA wizard?
yes dont bother with ontick . the wizard code inside it.
iPhoneの「Tapatalk」から送信
0
So is costum code needed to do this in EA wizard, or can this be done by simply setting the rules and conditions in EA wizard?
0
こんにちは,
just setup rules as mentioned on a Wizard tab. By default conditions in Wizard are evaluated on each tick (do not check “evaluate rule on bar open …..”)
0
5件の返信を表示中 - 1 - 5件目 (全5件中)