Break Even - simple solution

It’s worth explaining thoroughly how should be implemented Break Even mention by @Tomasz in closed topic:

In your example:
ApplyStop( stopTypeLoss, stopModePoint, 0, True, False, 0, 0, -1, FloorAmt );
are exactly 9 arguments but according to syntax should be 8. Please do not perceive this as an attack but as looking for simple solution that other customers can reuse in the future. Maybe there is a typo or something is missing in your example. Please elaborate. Thanks in advance.

That is how I read it . In Tomasz’s reply ," activation level for all kind of stops will be added".

1 Like

In this case I’m waiting eagerly for new release of AmiBroker :slight_smile:

It is avaialble in AmIBroker 6.25. Please do not create duplicate topics to ones that were already closed. It just adds work to my already overloaded day.

Here is coding example for version 6.25

Version( 6.25 );

// Example 1:
// Break-Even stop with 10% activation floor amount
// activation amount is last 9th argument
ApplyStop( stopTypeLoss, stopModePercent, 0, True, False, 0, 0, -1, 10 );

// Example 2:
// Break-Even stop with $2 activation floor amount
// activation amount is last 9th argument
ApplyStop( stopTypeLoss, stopModePoint, 0, True, False, 0, 0, -1, 2 );

The above code sample requires AmiBroker 6.25 BETA or higher:

2 Likes