Moving stop loss to x pips away from previous HA bar

Section for discussions related to indicators, use of indicators, and building of trading stategies using indicators.

Moderator: admin

Moving stop loss to x pips away from previous HA bar

Postby nanobyt3 » Fri Mar 03, 2017 4:41 pm

Hi all, :)

I have been developing a strategy in lua for FXCM Trading Station and I'm having problems moving a stop loss to few pips (customizable) away from a previous HeikenAshi bar. I have the following:

Code: Select all
   --Trailing the SL to x PBT pips from the previous bar
   if haveTrades("B") then
         valuemap.PegTypeStop = "O";
         valuemap.PegPriceOffsetPipsStop = iHA.low[period]-PBT;"Moving Stop Loss Higher to ".. tostring(iHA.low[period]-PBT));

PBT is the variable with the number of PIPs away from the low as in this case. the log shows me big number when trying to add the iHA.low[period]+PBT. This number does not seem to be related to price.

Any good link for me to learn how to move the Stop Loss to whatever position I need?

Thank you very much
Posts: 1
Joined: Fri Mar 03, 2017 4:28 pm

Return to Discussions

Who is online

Users browsing this forum: No registered users and 2 guests