How to get orders to buy at lows and sell at highs but code's wrong

How to get orders to buy at lows and sell at highs but code's wrong

Manage alerts

Loading saved threads...

Aissa Ghlib · External communityPost link
External question — Stack Overflow Stack Exchange Author: Aissa Ghlib Original post: https://stackoverflow.com/questions/63752224 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. Trying to get highs of current bar and sending an order when the bid gets there and same for the lows, but this code isn't working and I don't know what's wrong with it. Void OnStart() { double i = High[0]; double l = Low[0]; int a = OrderSend(NULL,OP_SELL,0.04,Bid,5,100,200,NULL,clrNONE); int b = OrderSend(NULL,OP_BUY,0.04,Ask,5,100,200,NULL,clrNONE); if(i==Bid) { a } else(l==Ask) { b }
Quote
Report

Post Reply

Quoted from Forex.com.bd-Editorial External question — Stack Overflow Stack Exchange Author: Aissa Ghlib Source score (net votes, not local likes): 0 Original post: https://stackoverflow.com/questions/63752224 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. Trying to get highs of current bar and sending an order when the bid gets there and same for the lows, but this code isn't working and I don't know what's wrong with it. Void OnStart() { double i = High[0]; double l = Low[0]; int a = OrderSend(NULL,OP_SELL,0.04,Bid,5,100,200,NULL,clrNONE); int b = OrderSend(NULL,OP_BUY,0.04,Ask,5,100,200,NULL,clrNONE); if(i==Bid) { a } else(l==Ask) { b }

Cancel quote

Checking account access…
How to get orders to buy at lows and sell at highs but code's wrong | Forex.com.bd