Here’s the code we created in the video. You can use to to test different bar sizes / markets and even modify for yourself!
Just copy the code and paste it into the Powerlanguage Editor in MultiCharts.
For help with MultiCharts find my free guide HERE
// 3 day trade idea
Input: DaysInTrade(0), // Exit after X amount of bars (days) in trade - Use a value > 0
BailoutExit(0), // Exit if in profit - use 1 to switch on
StopLoss(0); // Stop loss (in pips)
// Long Entry
If close < close[1] and close[1] < close[2] and close[2] < close[3] then Buy this bar on close;
// Short Entry
If close > close[1] and close[1] > close[2] and close[2] > close[3] then sellshort this bar on close;
// Exit after X days in trade
If DaysInTrade > 0 and barssinceentry >= DaysInTrade then begin
Sell this bar on close;
buytocover this bar on close;
End;
// Bailout exit
If BailoutExit = 1 and openpositionprofit > 0 then begin
Sell this bar on close;
buytocover this bar on close;
End;
// Set a stop loss
setstopcontract;
If StopLoss > 0 then setstoploss(stoploss);