Buy Price and Sell Price settings for rotational trading


I've been trying to figure out how to set custom trade price for rotational trading. I've set those values in the backtester settings as stated by the Manual

But then i find that it's not working as expected or maybe i misunderstood, please help with that.

Here is my backtesting settings and results, i set buy price to be high and sell price to be low for long trades (to mimic worst performance)

Then when i compare entry price with chart, i found it good.

but for exit price it's also the high price ( not low as i stated in the settings)

What could i possibly miss, here is the code (i used code of a previous post here for testing if the code was the problem)


EnableRotationalTrading() ;
SetOption("MaxOpenPositions", 5);
SetOption("WorstRankHeld", 4);
SetPositionSize( 20, spsPercentOfEquity);

PositionScore = 1000 - RSI(2);
AddColumn(PositionScore, "PositionScore");

aThanks in advance,

In general, i found both sides to be following the entry side rule.

so for example, if i set the buyprice to High, the sell price follows high also no matter what value it has.

is that intentional ?


The rotational trading mode uses "buy price" ..... as trade price ....for both entries and exits (long and short)

AFAIU, this means, as confirmed by your findings, that the selected "Buy price" is the ONLY used field to open and close the trades on the rotational-trading mode of the backtester.

As a side note, in the backtester settings, it is also possible to use the "Average" price (also available in formulas as Avg - no abbreviation). It is calculated as (High+Low+Close)/3 - corresponding to the so-called "typical price" as defined in some other trading applications.


Ops, you are totally right.

I don't know why i didn't see 'for both entries and exits' part.

Thank you a lot.